vivarium-public-health 2.3.3__tar.gz → 3.0.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- vivarium_public_health-3.0.1/.bandit +2 -0
- vivarium_public_health-3.0.1/.flake8 +46 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.github/workflows/build.yml +17 -17
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.gitignore +3 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/CHANGELOG.rst +25 -0
- vivarium_public_health-3.0.1/Jenkinsfile +229 -0
- vivarium_public_health-3.0.1/Makefile +93 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/PKG-INFO +12 -2
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/nitpick-exceptions +6 -2
- vivarium_public_health-3.0.1/docs/source/api_reference/results/disability.rst +1 -0
- vivarium_public_health-3.0.1/docs/source/api_reference/results/disease.rst +1 -0
- {vivarium_public_health-2.3.3/docs/source/api_reference/metrics → vivarium_public_health-3.0.1/docs/source/api_reference/results}/index.rst +2 -2
- vivarium_public_health-3.0.1/docs/source/api_reference/results/mortality.rst +1 -0
- vivarium_public_health-3.0.1/docs/source/api_reference/results/observer.rst +1 -0
- vivarium_public_health-3.0.1/docs/source/api_reference/results/risk.rst +1 -0
- vivarium_public_health-3.0.1/docs/source/api_reference/results/stratification.rst +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/conf.py +1 -0
- vivarium_public_health-3.0.1/get_upstream_branch.sh +40 -0
- vivarium_public_health-3.0.1/pyproject.toml +21 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/setup.py +12 -2
- vivarium_public_health-3.0.1/src/vivarium_public_health/_version.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/disease/model.py +23 -21
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/disease/models.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/disease/special_disease.py +40 -41
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/disease/state.py +42 -125
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/disease/transition.py +70 -27
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/mslt/delay.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/mslt/disease.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/mslt/intervention.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/mslt/magic_wand_components.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/mslt/observer.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/mslt/population.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/plugins/parser.py +61 -31
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/population/add_new_birth_cohorts.py +2 -3
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/population/base_population.py +2 -1
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/population/mortality.py +83 -80
- {vivarium_public_health-2.3.3/src/vivarium_public_health/metrics → vivarium_public_health-3.0.1/src/vivarium_public_health/results}/__init__.py +2 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/results/columns.py +22 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/results/disability.py +187 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/results/disease.py +222 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/results/mortality.py +186 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/results/observer.py +78 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/results/risk.py +138 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/results/simple_cause.py +18 -0
- {vivarium_public_health-2.3.3/src/vivarium_public_health/metrics → vivarium_public_health-3.0.1/src/vivarium_public_health/results}/stratification.py +10 -8
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/risks/__init__.py +1 -2
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/risks/base_risk.py +134 -29
- vivarium_public_health-3.0.1/src/vivarium_public_health/risks/data_transformations.py +252 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/risks/distributions.py +491 -0
- vivarium_public_health-3.0.1/src/vivarium_public_health/risks/effect.py +510 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/risks/implementations/low_birth_weight_and_short_gestation.py +61 -89
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/treatment/magic_wand.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/treatment/scale_up.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/treatment/therapeutic_inertia.py +1 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/utilities.py +17 -2
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health.egg-info/PKG-INFO +12 -2
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health.egg-info/SOURCES.txt +31 -25
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health.egg-info/requires.txt +11 -1
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/conftest.py +17 -7
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/disease/test_disease.py +19 -8
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/disease/test_special_disease.py +1 -3
- {vivarium_public_health-2.3.3/src/vivarium_public_health/testing → vivarium_public_health-3.0.1/tests}/mock_artifact.py +21 -29
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/plugins/test_parser.py +50 -20
- vivarium_public_health-3.0.1/tests/population/conftest.py +71 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/population/test_add_new_birth_cohort.py +5 -6
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/population/test_base_population.py +36 -98
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/population/test_data_transformations.py +1 -1
- vivarium_public_health-3.0.1/tests/population/test_mortality.py +220 -0
- vivarium_public_health-3.0.1/tests/results/test_categorical_risk_observer.py +207 -0
- vivarium_public_health-3.0.1/tests/results/test_disability_observer.py +355 -0
- vivarium_public_health-3.0.1/tests/results/test_disease_observer.py +321 -0
- vivarium_public_health-3.0.1/tests/results/test_mortality_observer.py +268 -0
- {vivarium_public_health-2.3.3/tests/metrics → vivarium_public_health-3.0.1/tests/results}/test_stratification.py +6 -6
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/risks/conftest.py +53 -38
- vivarium_public_health-3.0.1/tests/risks/test_base_risk.py +346 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/risks/test_data_transformations.py +6 -43
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/risks/test_effect.py +147 -4
- vivarium_public_health-3.0.1/tests/risks/test_low_birth_weight_and_short_gestation.py +34 -0
- vivarium_public_health-2.3.3/src/vivarium_public_health/testing/utils.py → vivarium_public_health-3.0.1/tests/test_utilities.py +56 -9
- vivarium_public_health-2.3.3/docs/source/api_reference/metrics/disability.rst +0 -1
- vivarium_public_health-2.3.3/docs/source/api_reference/metrics/disease.rst +0 -1
- vivarium_public_health-2.3.3/docs/source/api_reference/metrics/mortality.rst +0 -1
- vivarium_public_health-2.3.3/docs/source/api_reference/metrics/risk.rst +0 -1
- vivarium_public_health-2.3.3/docs/source/api_reference/metrics/stratification.rst +0 -1
- vivarium_public_health-2.3.3/docs/source/api_reference/testing/index.rst +0 -11
- vivarium_public_health-2.3.3/docs/source/api_reference/testing/mock_artifact.rst +0 -1
- vivarium_public_health-2.3.3/docs/source/api_reference/testing/utils.rst +0 -1
- vivarium_public_health-2.3.3/pyproject.toml +0 -13
- vivarium_public_health-2.3.3/src/vivarium_public_health/_version.py +0 -1
- vivarium_public_health-2.3.3/src/vivarium_public_health/metrics/disability.py +0 -118
- vivarium_public_health-2.3.3/src/vivarium_public_health/metrics/disease.py +0 -136
- vivarium_public_health-2.3.3/src/vivarium_public_health/metrics/mortality.py +0 -144
- vivarium_public_health-2.3.3/src/vivarium_public_health/metrics/risk.py +0 -110
- vivarium_public_health-2.3.3/src/vivarium_public_health/risks/data_transformations.py +0 -513
- vivarium_public_health-2.3.3/src/vivarium_public_health/risks/distributions.py +0 -321
- vivarium_public_health-2.3.3/src/vivarium_public_health/risks/effect.py +0 -209
- vivarium_public_health-2.3.3/tests/metrics/test_categorical_risk_observer.py +0 -110
- vivarium_public_health-2.3.3/tests/metrics/test_disability_observer.py +0 -214
- vivarium_public_health-2.3.3/tests/metrics/test_disease_observer.py +0 -198
- vivarium_public_health-2.3.3/tests/metrics/test_mortality_observer.py +0 -206
- vivarium_public_health-2.3.3/tests/population/conftest.py +0 -6
- vivarium_public_health-2.3.3/tests/risks/test_base_risk.py +0 -48
- vivarium_public_health-2.3.3/tests/test_utilities.py +0 -43
- vivarium_public_health-2.3.3/tests/treatment/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.gitattributes +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.github/CODEOWNERS +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.github/pull_request_template.md +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.github/workflows/deploy.yml +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.pylintrc +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.readthedocs.yml +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/.zenodo.json +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/CODE_OF_CONDUCT.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/CONTRIBUTING.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/LICENSE.txt +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/MANIFEST.in +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/README.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/Makefile +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/_static/style.css +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/_templates/layout.html +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/disease/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/disease/model.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/disease/models.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/disease/special_disease.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/disease/state.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/disease/transition.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/mslt/delay.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/mslt/disease.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/mslt/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/mslt/intervention.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/mslt/magic_wand_components.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/mslt/observer.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/mslt/population.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/plugins/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/plugins/parser.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/population/add_new_birth_cohorts.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/population/base_population.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/population/data_transformations.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/population/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/population/mortality.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/risks/base_risk.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/risks/data_transformations.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/risks/distributions.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/risks/effect.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/risks/implementations/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/risks/implementations/low_birth_weight_and_short_gestation.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/risks/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/treatment/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/treatment/magic_wand.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/treatment/scale_up.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/treatment/therapeutic_inertia.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/api_reference/utilities.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/tutorials/index.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/docs/source/tutorials/risk_exposure.rst +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/setup.cfg +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/__about__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/disease/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/mslt/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/plugins/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/population/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/population/data_transformations.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/risks/implementations/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health/treatment/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health.egg-info/dependency_links.txt +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health.egg-info/not-zip-safe +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/src/vivarium_public_health.egg-info/top_level.txt +0 -0
- {vivarium_public_health-2.3.3/src/vivarium_public_health/testing → vivarium_public_health-3.0.1/tests}/__init__.py +0 -0
- {vivarium_public_health-2.3.3/tests → vivarium_public_health-3.0.1/tests/disease}/__init__.py +0 -0
- {vivarium_public_health-2.3.3/tests/disease → vivarium_public_health-3.0.1/tests/plugins}/__init__.py +0 -0
- {vivarium_public_health-2.3.3/tests/metrics → vivarium_public_health-3.0.1/tests/population}/__init__.py +0 -0
- {vivarium_public_health-2.3.3/tests/plugins → vivarium_public_health-3.0.1/tests/results}/__init__.py +0 -0
- {vivarium_public_health-2.3.3/tests/metrics → vivarium_public_health-3.0.1/tests/results}/test_disability.py +0 -0
- {vivarium_public_health-2.3.3/tests/population → vivarium_public_health-3.0.1/tests/risks}/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tests/risks/test_distributions.py +0 -0
- {vivarium_public_health-2.3.3/tests/risks → vivarium_public_health-3.0.1/tests/treatment}/__init__.py +0 -0
- {vivarium_public_health-2.3.3 → vivarium_public_health-3.0.1}/tox.ini +0 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
[flake8]
|
2
|
+
# Use the following flake8 plugins:
|
3
|
+
# ANN : flake8-annotations
|
4
|
+
# B,B9 : flake8-bugbear
|
5
|
+
# BLK : flake8-black
|
6
|
+
# C : mccabe code complexity
|
7
|
+
# D : flake8-docstrings
|
8
|
+
# DAR : darglint. Not currently in use because it was too slow.
|
9
|
+
# F : pyflakes
|
10
|
+
# I : flake8-isort
|
11
|
+
# S : flake8-bandit
|
12
|
+
# W,E : pycodestyle (pep8) warnings and errors
|
13
|
+
select = ANN,B,B9,BLK,C,D,E,F,I,S,W
|
14
|
+
|
15
|
+
# Ignore these flake8 errors across the board.
|
16
|
+
extend-ignore =
|
17
|
+
# Missing type annotation for self
|
18
|
+
ANN101,
|
19
|
+
# Missing type annotation for cls
|
20
|
+
ANN102,
|
21
|
+
# Missing type annotation for special method
|
22
|
+
ANN204,
|
23
|
+
# Missing docstring in public module
|
24
|
+
D100,
|
25
|
+
# Missing docstring in public package
|
26
|
+
D104,
|
27
|
+
# Colons should not have whitespace before them (needed for black)
|
28
|
+
E203,
|
29
|
+
# Line break before binary operator (needed for black)
|
30
|
+
W503,
|
31
|
+
|
32
|
+
# Only use strict docstring linting in the api/ or cli/ directory. Unfortunately it's not
|
33
|
+
# possible to enable only those directories, so instead we disable strict docstring linting
|
34
|
+
# everywhere else.
|
35
|
+
# Also allow unused imports in __init__ files.
|
36
|
+
per-file-ignores =
|
37
|
+
tests/**:D105,D106,D107,D205,D207,D208,D212,D214,D215,D301,D4,S101,E266
|
38
|
+
src/vivarium/lib/**:D105,D106,D107,D205,D207,D208,D212,D214,D215,D301,D4
|
39
|
+
**/__init__.py:F401
|
40
|
+
|
41
|
+
# Function complexity and line length
|
42
|
+
max-complexity = 10
|
43
|
+
max-line-length = 95
|
44
|
+
|
45
|
+
# Docstrings
|
46
|
+
docstring-convention = google
|
@@ -21,6 +21,8 @@ jobs:
|
|
21
21
|
shell: bash -le {0}
|
22
22
|
steps:
|
23
23
|
- uses: actions/checkout@v3
|
24
|
+
with:
|
25
|
+
fetch-depth: 0
|
24
26
|
- name: Set up Python ${{ matrix.python-version }}
|
25
27
|
uses: actions/setup-python@v4
|
26
28
|
with:
|
@@ -32,35 +34,33 @@ jobs:
|
|
32
34
|
else
|
33
35
|
echo "branch_name=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
34
36
|
fi
|
37
|
+
- name: Update pip
|
38
|
+
run: |
|
39
|
+
python -m pip install --upgrade pip
|
40
|
+
- name: Install dependencies
|
41
|
+
run: |
|
42
|
+
pip install .[dev]
|
43
|
+
git checkout ${branch_name}
|
35
44
|
- name: check for upstream branch
|
36
45
|
run: |
|
37
|
-
|
38
|
-
echo "upstream_exist=true" >> $GITHUB_ENV
|
39
|
-
else
|
40
|
-
echo "upstream_exist=false" >> $GITHUB_ENV
|
41
|
-
fi
|
46
|
+
sh get_upstream_branch.sh ${branch_name}
|
42
47
|
- name: print environment values
|
43
48
|
run: |
|
44
49
|
cat $GITHUB_ENV
|
45
|
-
- name:
|
46
|
-
|
47
|
-
python -m pip install --upgrade pip
|
48
|
-
- name: Retrieve upstream branch if exists
|
49
|
-
if: env.upstream_exist == 'true'
|
50
|
+
- name: Retrieve vivarium branch
|
51
|
+
if: env.vivarium_branch_name != 'main'
|
50
52
|
run: |
|
51
|
-
echo "Cloning upstream branch: ${
|
52
|
-
|
53
|
+
echo "Cloning upstream branch: ${vivarium_branch_name}"
|
54
|
+
pushd ..
|
55
|
+
git clone --branch=${vivarium_branch_name} https://github.com/ihmeuw/vivarium.git
|
53
56
|
pushd vivarium
|
54
57
|
pip install .
|
55
|
-
popd
|
56
|
-
- name: Install dependencies
|
57
|
-
run: |
|
58
|
-
pip install .[dev]
|
58
|
+
popd && popd
|
59
59
|
- name: Lint
|
60
60
|
run: |
|
61
61
|
pip install black==22.3.0 isort
|
62
|
-
black . --check --diff
|
63
62
|
isort . --check --verbose --only-modified --diff
|
63
|
+
black . --check --diff
|
64
64
|
- name: Test
|
65
65
|
run: |
|
66
66
|
if "${{ github.event_name == 'schedule' }}"; then
|
@@ -1,3 +1,28 @@
|
|
1
|
+
**3.0.1 - 08/19/24**
|
2
|
+
|
3
|
+
- Fix bug in build script when the upstream vivarium branch should be main
|
4
|
+
|
5
|
+
**3.0.0 - 08/13/24**
|
6
|
+
|
7
|
+
Breaking changes:
|
8
|
+
- Update components to use new Vivarium lookup table configuration
|
9
|
+
- Update Observers to use new Vivarium results interface classes and methods
|
10
|
+
- Change the "all_causes" disability weight pipeline from "disability_weight" to "all_causes.disability_weight"
|
11
|
+
|
12
|
+
Major changes:
|
13
|
+
- Refactor risk components to standardize/simplify risk exposure distributions
|
14
|
+
- Enable the setting of CSMR using a causes configuration parser
|
15
|
+
- Implement a PublicHealthObserver to help enforce the existence of "measure", "entity_type", "sub_entity", and "entity" columns in the results
|
16
|
+
- Refactor Risk component to create exposure column in state table
|
17
|
+
- Add support for non-loglinear relative risks
|
18
|
+
|
19
|
+
Other changes:
|
20
|
+
- Use external layered-config-tree package instead of Vivarium ConfigTree class
|
21
|
+
- Install matching upstream branches in github builds
|
22
|
+
- Stop writing seed and draw columns to the results
|
23
|
+
- Automatically run Jenkins builds on push or pull request
|
24
|
+
- Various other minor updates
|
25
|
+
|
1
26
|
**2.3.3 - 06/17/24**
|
2
27
|
|
3
28
|
- Hotfix pin numpy below 2.0
|
@@ -0,0 +1,229 @@
|
|
1
|
+
pipeline_name="vivarium_public_health"
|
2
|
+
conda_env_name="${pipeline_name}-${BUILD_NUMBER}"
|
3
|
+
conda_env_path="/tmp/${conda_env_name}"
|
4
|
+
// defaults for conda and pip are a local directory /svc-simsci for improved speed.
|
5
|
+
// In the past, we used /ihme/code/* on the NFS (which is slower)
|
6
|
+
shared_path="/svc-simsci"
|
7
|
+
|
8
|
+
|
9
|
+
pipeline {
|
10
|
+
// This agent runs as svc-simsci on node simsci-slurm-sbuild-p01.
|
11
|
+
// It has access to standard IHME filesystems and singularity
|
12
|
+
agent { label "svc-simsci" }
|
13
|
+
|
14
|
+
options {
|
15
|
+
// Keep 100 old builds.
|
16
|
+
buildDiscarder logRotator(numToKeepStr: "100")
|
17
|
+
|
18
|
+
// Wait 60 seconds before starting the build.
|
19
|
+
// If another commit enters the build queue in this time, the first build will be discarded.
|
20
|
+
quietPeriod(60)
|
21
|
+
|
22
|
+
// Fail immediately if any part of a parallel stage fails
|
23
|
+
parallelsAlwaysFailFast()
|
24
|
+
}
|
25
|
+
|
26
|
+
parameters {
|
27
|
+
booleanParam(
|
28
|
+
name: "DEPLOY_OVERRIDE",
|
29
|
+
defaultValue: false,
|
30
|
+
description: "Whether to deploy despite building a non-default branch. Builds of the default branch are always deployed."
|
31
|
+
)
|
32
|
+
booleanParam(
|
33
|
+
name: "IS_CRON",
|
34
|
+
defaultValue: true,
|
35
|
+
description: "Indicates a recurring build. Used to skip deployment steps."
|
36
|
+
)
|
37
|
+
string(
|
38
|
+
name: "SLACK_TO",
|
39
|
+
defaultValue: "simsci-ci-status",
|
40
|
+
description: "The Slack channel to send messages to."
|
41
|
+
)
|
42
|
+
booleanParam(
|
43
|
+
name: "DEBUG",
|
44
|
+
defaultValue: false,
|
45
|
+
description: "Used as needed for debugging purposes."
|
46
|
+
)
|
47
|
+
}
|
48
|
+
|
49
|
+
stages {
|
50
|
+
stage("Initialization") {
|
51
|
+
steps {
|
52
|
+
script {
|
53
|
+
// Use the name of the branch in the build name
|
54
|
+
currentBuild.displayName = "#${BUILD_NUMBER} ${GIT_BRANCH}"
|
55
|
+
|
56
|
+
// Tell BitBucket that a build has started.
|
57
|
+
notifyBitbucket()
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
stage("Python version matrix") {
|
63
|
+
// we don't want to go to deployment if any of the matrix branches fail
|
64
|
+
failFast true
|
65
|
+
matrix {
|
66
|
+
// customWorkspace setting must be ran within a node
|
67
|
+
agent {
|
68
|
+
node {
|
69
|
+
label "svc-simsci"
|
70
|
+
}
|
71
|
+
}
|
72
|
+
axes {
|
73
|
+
axis {
|
74
|
+
// parallelize by python minor version
|
75
|
+
name 'PYTHON_VERSION'
|
76
|
+
values "3.10", "3.11"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
environment {
|
81
|
+
// Get the branch being built and strip everything but the text after the last "/"
|
82
|
+
BRANCH = sh(script: "echo ${GIT_BRANCH} | rev | cut -d '/' -f1 | rev", returnStdout: true).trim()
|
83
|
+
TIMESTAMP = sh(script: 'date', returnStdout: true)
|
84
|
+
// Specify the path to the .condarc file via environment variable.
|
85
|
+
// This file configures the shared conda package cache.
|
86
|
+
CONDARC = "${shared_path}/miniconda3/.condarc"
|
87
|
+
CONDA_BIN_PATH = "${shared_path}/miniconda3/bin"
|
88
|
+
// Specify conda env by build number so that we don't have collisions if builds from
|
89
|
+
// different branches happen concurrently.
|
90
|
+
PYTHON_DEPLOY_VERSION = "3.11"
|
91
|
+
CONDA_ENV_NAME = "${conda_env_name}"
|
92
|
+
CONDA_ENV_PATH = "${conda_env_path}_${PYTHON_VERSION}"
|
93
|
+
// Set the Pip cache.
|
94
|
+
XDG_CACHE_HOME = "${shared_path}/pip-cache"
|
95
|
+
// Jenkins commands run in separate processes, so need to activate the environment every
|
96
|
+
// time we run pip, poetry, etc.
|
97
|
+
ACTIVATE = "source ${CONDA_BIN_PATH}/activate ${CONDA_ENV_PATH} &> /dev/null"
|
98
|
+
}
|
99
|
+
|
100
|
+
stages {
|
101
|
+
stage("Debug Info") {
|
102
|
+
steps {
|
103
|
+
echo "Jenkins pipeline run timestamp: ${TIMESTAMP}"
|
104
|
+
// Display parameters used.
|
105
|
+
echo """Parameters:
|
106
|
+
DEPLOY_OVERRIDE: ${params.DEPLOY_OVERRIDE}"""
|
107
|
+
|
108
|
+
// Display environment variables from Jenkins.
|
109
|
+
echo """Environment:
|
110
|
+
ACTIVATE: '${ACTIVATE}'
|
111
|
+
BUILD_NUMBER: '${BUILD_NUMBER}'
|
112
|
+
BRANCH: '${BRANCH}'
|
113
|
+
CONDARC: '${CONDARC}'
|
114
|
+
CONDA_BIN_PATH: '${CONDA_BIN_PATH}'
|
115
|
+
CONDA_ENV_NAME: '${CONDA_ENV_NAME}'
|
116
|
+
CONDA_ENV_PATH: '${CONDA_ENV_PATH}'
|
117
|
+
GIT_BRANCH: '${GIT_BRANCH}'
|
118
|
+
JOB_NAME: '${JOB_NAME}'
|
119
|
+
WORKSPACE: '${WORKSPACE}'
|
120
|
+
XDG_CACHE_HOME: '${XDG_CACHE_HOME}'"""
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
stage("Build Environment") {
|
125
|
+
environment {
|
126
|
+
// Command for activating the base environment. Activating the base environment sets
|
127
|
+
// the correct path to the conda binary which is used to create a new conda env.
|
128
|
+
ACTIVATE_BASE = "source ${CONDA_BIN_PATH}/activate &> /dev/null"
|
129
|
+
}
|
130
|
+
steps {
|
131
|
+
// The env should have been cleaned out after the last build, but delete it again
|
132
|
+
// here just to be safe.
|
133
|
+
sh "rm -rf ${CONDA_ENV_PATH}"
|
134
|
+
sh "${ACTIVATE_BASE} && make build-env PYTHON_VERSION=${PYTHON_VERSION}"
|
135
|
+
// open permissions for test users to create file in workspace
|
136
|
+
sh "chmod 777 ${WORKSPACE}"
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
stage("Install Package") {
|
141
|
+
steps {
|
142
|
+
sh "${ACTIVATE} && make install \"ARGS=${GIT_BRANCH}\""
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
// Quality Checks
|
147
|
+
stage("Format") {
|
148
|
+
steps {
|
149
|
+
sh "${ACTIVATE} && make format"
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
// stage("Lint") {
|
154
|
+
// steps {
|
155
|
+
// sh "${ACTIVATE} && make lint"
|
156
|
+
// }
|
157
|
+
// }
|
158
|
+
|
159
|
+
// Tests
|
160
|
+
// removable, if passwords can be exported to env. securely without bash indirection
|
161
|
+
stage("Run Integration Tests") {
|
162
|
+
steps {
|
163
|
+
sh "${ACTIVATE} && make integration"
|
164
|
+
publishHTML([
|
165
|
+
allowMissing: true,
|
166
|
+
alwaysLinkToLastBuild: false,
|
167
|
+
keepAll: true,
|
168
|
+
reportDir: "output/htmlcov_integration",
|
169
|
+
reportFiles: "index.html",
|
170
|
+
reportName: "Coverage Report - Integration tests",
|
171
|
+
reportTitles: ''
|
172
|
+
])
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
// Build
|
177
|
+
stage('Build and Deploy') {
|
178
|
+
when {
|
179
|
+
expression { "${PYTHON_DEPLOY_VERSION}" == "${PYTHON_VERSION}" }
|
180
|
+
}
|
181
|
+
stages {
|
182
|
+
stage("Build Docs") {
|
183
|
+
steps {
|
184
|
+
sh "${ACTIVATE} && make build-doc"
|
185
|
+
}
|
186
|
+
}
|
187
|
+
stage("Build Package") {
|
188
|
+
steps {
|
189
|
+
sh "${ACTIVATE} && make build-package"
|
190
|
+
}
|
191
|
+
}
|
192
|
+
} // stages within build and deploy
|
193
|
+
} // build and deploy stage
|
194
|
+
} // stages bracket within Python matrix
|
195
|
+
post {
|
196
|
+
always {
|
197
|
+
sh "${ACTIVATE} && make clean"
|
198
|
+
sh "rm -rf ${CONDA_ENV_PATH}"
|
199
|
+
// Delete the workspace directory.
|
200
|
+
deleteDir()
|
201
|
+
// Tell BitBucket whether the build succeeded or failed.
|
202
|
+
script {
|
203
|
+
notifyBitbucket()
|
204
|
+
}
|
205
|
+
}
|
206
|
+
failure {
|
207
|
+
slackSend channel: "#${params.SLACK_TO}",
|
208
|
+
message: ":x: JOB FAILURE: $JOB_NAME - $BUILD_ID\n\n${BUILD_URL}console\n\n<!channel>",
|
209
|
+
teamDomain: "ihme",
|
210
|
+
tokenCredentialId: "slack"
|
211
|
+
}
|
212
|
+
success {
|
213
|
+
script {
|
214
|
+
if (params.DEBUG) {
|
215
|
+
echo 'Debug is enabled. Sending a success message to Slack.'
|
216
|
+
slackSend channel: "#${params.SLACK_TO}",
|
217
|
+
message: ":white_check_mark: (debugging) JOB SUCCESS: $JOB_NAME - $BUILD_ID\n\n${BUILD_URL}console",
|
218
|
+
teamDomain: "ihme",
|
219
|
+
tokenCredentialId: "slack"
|
220
|
+
} else {
|
221
|
+
echo 'Debug is not enabled. No success message will be sent to Slack.'
|
222
|
+
}
|
223
|
+
}
|
224
|
+
}
|
225
|
+
} // post bracket
|
226
|
+
} // Python matrix bracket
|
227
|
+
} // Python matrix stage bracket
|
228
|
+
} // stages bracket
|
229
|
+
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
SHELL := /bin/bash
|
2
|
+
this_makefile := $(lastword $(MAKEFILE_LIST)) # Used to automatically list targets
|
3
|
+
.DEFAULT_GOAL := list # If someone runs "make", run "make list"
|
4
|
+
|
5
|
+
# Source files to format, lint, and type check.
|
6
|
+
LOCATIONS=src tests
|
7
|
+
|
8
|
+
# Unless overridden, build conda environment using the package name.
|
9
|
+
PACKAGE_NAME = vivarium_public_health
|
10
|
+
SAFE_NAME = $(shell python -c "from pkg_resources import safe_name; print(safe_name(\"$(PACKAGE_NAME)\"))")
|
11
|
+
|
12
|
+
setup_file = $(shell find -name setup.py)
|
13
|
+
version_line = $(shell grep "version = " ${setup_file})
|
14
|
+
PACKAGE_VERSION = $(shell echo ${version_line} | cut -d "=" -f 2 | xargs)
|
15
|
+
|
16
|
+
# Use this URL to pull IHME Python packages and deploy this package to PyPi.
|
17
|
+
IHME_PYPI := https://artifactory.ihme.washington.edu/artifactory/api/pypi/pypi-shared/
|
18
|
+
|
19
|
+
# If CONDA_ENV_PATH is set (from a Jenkins build), use the -p flag when making Conda env in
|
20
|
+
# order to make env at specific path. Otherwise, make a named env at the default path using
|
21
|
+
# the -n flag.
|
22
|
+
PYTHON_VERSION ?= 3.11
|
23
|
+
CONDA_ENV_NAME ?= ${PACKAGE_NAME}_py${PYTHON_VERSION}
|
24
|
+
CONDA_ENV_CREATION_FLAG = $(if $(CONDA_ENV_PATH),-p ${CONDA_ENV_PATH},-n ${CONDA_ENV_NAME})
|
25
|
+
|
26
|
+
# These are the doc and source code files in this repo.
|
27
|
+
# When one of these files changes, it means that Make targets need to run again.
|
28
|
+
MAKE_SOURCES := $(shell find . -type d -name "*" ! -path "./.git*" ! -path "./.vscode" ! -path "./output" ! -path "./output/*" ! -path "./archive" ! -path "./dist" ! -path "./output/htmlcov*" ! -path "**/.pytest_cache*" ! -path "**/__pycache__" ! -path "./output/docs_build*" ! -path "./.pytype*" ! -path "." ! -path "./src/${PACKAGE_NAME}/legacy*" ! -path ./.history ! -path "./.history/*" ! -path "./src/${PACKAGE_NAME}.egg-info" ! -path ./.idea ! -path "./.idea/*" )
|
29
|
+
|
30
|
+
|
31
|
+
# Phony targets don't produce artifacts.
|
32
|
+
.PHONY: .list-targets build-env clean debug deploy-doc deploy-package full help install list quick
|
33
|
+
|
34
|
+
# List of Make targets is generated dynamically. To add description of target, use a # on the target definition.
|
35
|
+
list help: debug .list-targets
|
36
|
+
|
37
|
+
.list-targets: # Print available Make targets
|
38
|
+
@echo
|
39
|
+
@echo "Make targets:"
|
40
|
+
@grep -i "^[a-zA-Z][a-zA-Z0-9_ \.\-]*: .*[#].*" ${this_makefile} | sort | sed 's/:.*#/ : /g' | column -t -s:
|
41
|
+
@echo
|
42
|
+
|
43
|
+
debug: # Print debug information (environment variables)
|
44
|
+
@echo "'make' invoked with these environment variables:"
|
45
|
+
@echo "CONDA_ENV_NAME: ${CONDA_ENV_NAME}"
|
46
|
+
@echo "IHME_PYPI: ${IHME_PYPI}"
|
47
|
+
@echo "LOCATIONS: ${LOCATIONS}"
|
48
|
+
@echo "PACKAGE_NAME: ${PACKAGE_NAME}"
|
49
|
+
@echo "PACKAGE_VERSION: ${PACKAGE_VERSION}"
|
50
|
+
@echo "PYPI_ARTIFACTORY_CREDENTIALS_USR: ${PYPI_ARTIFACTORY_CREDENTIALS_USR} "
|
51
|
+
@echo "Make sources: ${MAKE_SOURCES}"
|
52
|
+
|
53
|
+
build-env: # Make a new conda environment
|
54
|
+
@[ "${CONDA_ENV_NAME}" ] && echo "" > /dev/null || ( echo "CONDA_ENV_NAME is not set"; exit 1 )
|
55
|
+
conda create ${CONDA_ENV_CREATION_FLAG} python=${PYTHON_VERSION} --yes
|
56
|
+
|
57
|
+
install: # Install setuptools, install this package in editable mode
|
58
|
+
pip install --upgrade pip setuptools
|
59
|
+
pip install -e .[DEV]
|
60
|
+
@echo "Checking if the vivarium repository has the branch $(GIT_BRANCH)..."
|
61
|
+
@$(eval BRANCH_EXISTS=$(shell curl -s https://api.github.com/repos/ihmeuw/vivarium/branches | grep -q '"name": "$(GIT_BRANCH)"' && echo "yes" || echo "no"))
|
62
|
+
@if [ "$(BRANCH_EXISTS)" = "yes" ]; then \
|
63
|
+
pip install git+https://github.com/ihmeuw/vivarium@${GIT_BRANCH}; \
|
64
|
+
fi
|
65
|
+
|
66
|
+
format: setup.py pyproject.toml $(MAKE_SOURCES) # Run the code formatter and import sorter
|
67
|
+
black $(LOCATIONS)
|
68
|
+
isort $(LOCATIONS)
|
69
|
+
@echo "Ignore, Created by Makefile, `date`" > $@
|
70
|
+
|
71
|
+
lint: .flake8 .bandit $(MAKE_SOURCES) # Run the code linter and package security vulnerability checker
|
72
|
+
-flake8 $(LOCATIONS)
|
73
|
+
-safety check
|
74
|
+
@echo "Ignore, Created by Makefile, `date`" > $@
|
75
|
+
|
76
|
+
integration: $(MAKE_SOURCES) # Run the end-to-end tests
|
77
|
+
export COVERAGE_FILE=./output/.coverage.integration
|
78
|
+
pytest --runslow tests --cov --cov-report term --cov-report html:./output/htmlcov_integration
|
79
|
+
@echo "Ignore, Created by Makefile, `date`" > $@
|
80
|
+
|
81
|
+
build-doc: $(MAKE_SOURCES) # Build the Sphinx docs
|
82
|
+
$(MAKE) -C docs/ html
|
83
|
+
@echo "Ignore, Created by Makefile, `date`" > $@
|
84
|
+
|
85
|
+
build-package: $(MAKE_SOURCES) # Build the package as a pip wheel
|
86
|
+
pip install build
|
87
|
+
python -m build
|
88
|
+
@echo "Ignore, Created by Makefile, `date`" > $@
|
89
|
+
|
90
|
+
clean: # Delete build artifacts and do any custom cleanup such as spinning down services
|
91
|
+
@rm -rf format lint build-doc build-package integration .pytest_cache
|
92
|
+
@rm -rf dist output
|
93
|
+
$(shell find . -type f -name '*py[co]' -delete -o -type d -name __pycache__ -delete)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: vivarium_public_health
|
3
|
-
Version:
|
3
|
+
Version: 3.0.1
|
4
4
|
Summary: Components for modelling diseases, risks, and interventions with ``vivarium``
|
5
5
|
Home-page: https://github.com/ihmeuw/vivarium_public_health
|
6
6
|
Author: The vivarium developers
|
@@ -26,21 +26,26 @@ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
26
26
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
27
27
|
Classifier: Topic :: Software Development :: Libraries
|
28
28
|
License-File: LICENSE.txt
|
29
|
-
Requires-Dist: vivarium>=
|
29
|
+
Requires-Dist: vivarium>=3.0.0
|
30
|
+
Requires-Dist: layered_config_tree>=1.0.1
|
30
31
|
Requires-Dist: loguru
|
31
32
|
Requires-Dist: numpy<2.0.0
|
32
33
|
Requires-Dist: pandas
|
33
34
|
Requires-Dist: scipy
|
34
35
|
Requires-Dist: tables
|
35
36
|
Requires-Dist: risk_distributions>=2.0.11
|
37
|
+
Requires-Dist: pyarrow
|
36
38
|
Provides-Extra: docs
|
37
39
|
Requires-Dist: sphinx<7.0; extra == "docs"
|
38
40
|
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
39
41
|
Requires-Dist: sphinx-click; extra == "docs"
|
42
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
40
43
|
Requires-Dist: IPython; extra == "docs"
|
41
44
|
Requires-Dist: matplotlib; extra == "docs"
|
42
45
|
Provides-Extra: test
|
46
|
+
Requires-Dist: vivarium_testing_utils; extra == "test"
|
43
47
|
Requires-Dist: pytest; extra == "test"
|
48
|
+
Requires-Dist: pytest-cov; extra == "test"
|
44
49
|
Requires-Dist: pytest-mock; extra == "test"
|
45
50
|
Requires-Dist: hypothesis; extra == "test"
|
46
51
|
Requires-Dist: pyyaml; extra == "test"
|
@@ -48,12 +53,17 @@ Provides-Extra: dev
|
|
48
53
|
Requires-Dist: sphinx<7.0; extra == "dev"
|
49
54
|
Requires-Dist: sphinx-rtd-theme; extra == "dev"
|
50
55
|
Requires-Dist: sphinx-click; extra == "dev"
|
56
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "dev"
|
51
57
|
Requires-Dist: IPython; extra == "dev"
|
52
58
|
Requires-Dist: matplotlib; extra == "dev"
|
59
|
+
Requires-Dist: vivarium_testing_utils; extra == "dev"
|
53
60
|
Requires-Dist: pytest; extra == "dev"
|
61
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
54
62
|
Requires-Dist: pytest-mock; extra == "dev"
|
55
63
|
Requires-Dist: hypothesis; extra == "dev"
|
56
64
|
Requires-Dist: pyyaml; extra == "dev"
|
65
|
+
Requires-Dist: black==22.3.0; extra == "dev"
|
66
|
+
Requires-Dist: isort; extra == "dev"
|
57
67
|
|
58
68
|
Vivarium Public Health
|
59
69
|
======================
|
@@ -9,13 +9,17 @@ py:class pandas._libs.interval.Interval
|
|
9
9
|
py:class pandas.core.frame.DataFrame
|
10
10
|
py:class pandas.core.series.Series
|
11
11
|
py:class pandas.core.generic.PandasObject
|
12
|
+
# layered-config-tree
|
13
|
+
py:class layered_config_tree.main.LayeredConfigTree
|
12
14
|
|
13
|
-
# TODO: Need to revisit this. Nitpicking here to avoid failing builds on 3.
|
15
|
+
# TODO: Need to revisit this. Nitpicking here to avoid failing builds on 3.9 in LBWSGRisk
|
14
16
|
py:class PopulationView
|
15
17
|
py:class Logger
|
18
|
+
py:class pd.DataFrame
|
19
|
+
py:class LayeredConfigTree
|
16
20
|
# TODO: Need to revisit this. Nitpicking here to avoid failing everywhere
|
17
21
|
py:class Builder
|
18
22
|
py:class SimulantData
|
19
23
|
py:class Event
|
20
24
|
py:class LookupTable
|
21
|
-
py:class Pipeline
|
25
|
+
py:class Pipeline
|
@@ -0,0 +1 @@
|
|
1
|
+
.. automodule:: vivarium_public_health.results.disability
|
@@ -0,0 +1 @@
|
|
1
|
+
.. automodule:: vivarium_public_health.results.disease
|
@@ -1,8 +1,8 @@
|
|
1
1
|
================================
|
2
|
-
Simulation Observers and
|
2
|
+
Simulation Observers and Results
|
3
3
|
================================
|
4
4
|
|
5
|
-
.. automodule:: vivarium_public_health.
|
5
|
+
.. automodule:: vivarium_public_health.results
|
6
6
|
|
7
7
|
.. toctree::
|
8
8
|
:maxdepth: 2
|
@@ -0,0 +1 @@
|
|
1
|
+
.. automodule:: vivarium_public_health.results.mortality
|
@@ -0,0 +1 @@
|
|
1
|
+
.. automodule:: vivarium_public_health.results.observer
|
@@ -0,0 +1 @@
|
|
1
|
+
.. automodule:: vivarium_public_health.results.risk
|
@@ -0,0 +1 @@
|
|
1
|
+
.. automodule:: vivarium_public_health.results.stratification
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Define variables
|
4
|
+
branch_name=$1
|
5
|
+
|
6
|
+
vivarium_branch_name='main'
|
7
|
+
branch_name_to_check=${branch_name}
|
8
|
+
iterations=0
|
9
|
+
|
10
|
+
while [ "$branch_name_to_check" != "$vivarium_branch_name" ] && [ $iterations -lt 20 ]
|
11
|
+
do
|
12
|
+
echo "Checking for vivarium branch: '${branch_name_to_check}'"
|
13
|
+
if
|
14
|
+
git ls-remote --exit-code \
|
15
|
+
--heads https://github.com/ihmeuw/vivarium.git ${branch_name_to_check} == "0"
|
16
|
+
then
|
17
|
+
vivarium_branch_name=${branch_name_to_check}
|
18
|
+
echo "Found matching branch: ${vivarium_branch_name}"
|
19
|
+
else
|
20
|
+
echo "Could not find upstream branch '${branch_name_to_check}'. Finding parent branch."
|
21
|
+
branch_name_to_check="$( \
|
22
|
+
git show-branch -a \
|
23
|
+
| grep '\*' \
|
24
|
+
| grep -v `git rev-parse --abbrev-ref HEAD` \
|
25
|
+
| head -n1 \
|
26
|
+
| sed 's/[^\[]*//' \
|
27
|
+
| awk 'match($0, /\[[a-zA-Z0-9\/.-]+\]/) { print substr( $0, RSTART+1, RLENGTH-2 )}' \
|
28
|
+
| sed 's/^origin\///' \
|
29
|
+
)"
|
30
|
+
if [ -z "$branch_name_to_check" ]; then
|
31
|
+
echo "Could not find upstream branch. Will use released version."
|
32
|
+
branch_name_to_check="main"
|
33
|
+
fi
|
34
|
+
echo "Checking out branch: ${branch_name_to_check}"
|
35
|
+
git checkout ${branch_name_to_check}
|
36
|
+
iterations=$((iterations+1))
|
37
|
+
fi
|
38
|
+
done
|
39
|
+
echo "vivarium_branch_name=${vivarium_branch_name}" >> $GITHUB_ENV
|
40
|
+
git checkout ${branch_name}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
[tool.black]
|
2
|
+
line_length = 94
|
3
|
+
|
4
|
+
[tool.isort]
|
5
|
+
line_length = 94
|
6
|
+
profile = "black"
|
7
|
+
known_third_party = ["vivarium"]
|
8
|
+
multi_line_output = 3 # Vertical Hanging Indent, see https://pypi.org/project/isort/
|
9
|
+
|
10
|
+
[tool.pytest.ini_options]
|
11
|
+
testpaths = ["tests/"]
|
12
|
+
|
13
|
+
[build-system]
|
14
|
+
requires = ["setuptools"]
|
15
|
+
build-backend = "setuptools.build_meta"
|
16
|
+
|
17
|
+
[tool.coverage.run]
|
18
|
+
source = ["vivarium_public_health"]
|
19
|
+
|
20
|
+
[tool.coverage.report]
|
21
|
+
show_missing = true
|