Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to install Graphviz #1545

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NathanielBlairStahn
Copy link
Contributor

@NathanielBlairStahn NathanielBlairStahn commented Nov 4, 2024

Add instructions to install Graphviz on the "Contributing New Documentation" page. This PR is a follow-up to #1544, which, once merged, will require Graphviz to be installed when building the docs.

Note: Instead of having everyone install Graphviz on their own in a platform-dependent way as described here, it would probably be better to use conda to install it. Then the same method would work across platforms, and we could include an installation script in the repo that could do the installations automatically. Here's the JIRA ticket for creating such a script: https://jira.ihme.washington.edu/browse/SSCI-2000

Until that's accomplished, people should follow the instructions in this PR to manually install Graphviz on their own.

@NathanielBlairStahn NathanielBlairStahn added the infrastructure Updates to doc build dependencies and automation. label Nov 4, 2024
@zmbc
Copy link
Collaborator

zmbc commented Nov 4, 2024

Hm... I should have thought of this earlier, but we could also add graphviz to our existing conda create line above this section (make it analogous to Python) 🤔

But maybe it is good to have these instructions anyway since people might want to do this without conda, and the instructions themselves look good to me!

@NathanielBlairStahn
Copy link
Contributor Author

If it would work to include it in the conda environment, it seems like that would be more straightforward in terms of getting people up and running with the docs as quickly as possible. Perhaps I (or someone else) should test that method, and if it works, we should revise this PR accordingly. We could still include a note indicating that you can install Graphviz outside of the conda environment if you want.

@NathanielBlairStahn
Copy link
Contributor Author

Oh, and also, we should probably include a link to https://edotor.net/ or another tool to easily generate Graphviz graphs from code.

Copy link
Member

@aflaxman aflaxman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without graphviz installed, I was able to build the docs and get just one subtle warning

writing output... [100%] onboarding_resources/index
WARNING: dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting
generating indices... genindex done
writing additional pages... search done
copying images... [ 17%] model_design/vivarium_model_components/risk_factors/population_attributable_fraction/PAF_intuitive_diagram.scopying images... [ 17%] model_design/vivarium_model_components/risk_factors/population_attributable_fraction/darrow_confounding_figucopying images... [ 65%] models/concept_models/vivarium_nutrition_optimization/pregnancies/nutrition_optimization_pregnancy_concept_mcopying images... [ 86%] models/intervention_models/wasting_treatment/ethiopia_wasting_treatment/flow_chart_management_of_acute_malnucopying images... [100%] onboarding_resources/computing/putty_3.png
copying downloadable files... [  2%] model_design/vivarium_model_components/risk_factors/risk_correlation/Why_is_getting_the_paf_righcopying downloadable files... [ 12%] models/concept_models/vivarium_census_synthdata/non_reference_person_move_relationship_proportiocopying downloadable files... [ 47%] models/concept_models/vivarium_swissre_stomachcancer/precancer_states_and_hpylori_memo_28dec2020copying downloadable files... [ 56%] models/intervention_models/maternal_malaria_prevention_therapy/who_guidance_positive_pregnancy_2copying downloadable files... [ 73%] models/intervention_models/wasting_treatment/compas_trial_wasting_treatment/04_South Asia_CMAM_Ecopying downloadable files... [ 76%] models/other_models/hemoglobin_anemia_and_iron_deficiency/risk_effects/or_to_rr_test_calculationcopying downloadable files... [ 97%] models/risk_exposures/child_growth_failure/wasting/wasting_state_exposure/WASTING CALIBRATION.docopying downloadable files... [100%] models/risk_exposures/maternal_bmi_hgb/relative_risk_calculation.xlsx
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.

The HTML pages are in build/html.

After calling mamba install graphviz, it didn't think there was anything to change, but when I removed all of the build and did make html again, it succeeded without warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Updates to doc build dependencies and automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants