vivarium-public-health 3.0.3__tar.gz → 3.0.5__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.github/workflows/build.yml +3 -2
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.gitignore +3 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/CHANGELOG.rst +13 -2
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/Jenkinsfile +14 -12
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/Makefile +15 -4
- {vivarium_public_health-3.0.3/src/vivarium_public_health.egg-info → vivarium_public_health-3.0.5}/PKG-INFO +1 -1
- vivarium_public_health-3.0.5/docs/source/api_reference/results/simple_cause.rst +1 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/tutorials/risk_exposure.rst +21 -7
- vivarium_public_health-3.0.5/src/vivarium_public_health/_version.py +1 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/disease/state.py +24 -19
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/mslt/delay.py +13 -5
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/mslt/disease.py +35 -14
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/mslt/intervention.py +12 -9
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/mslt/observer.py +56 -17
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/mslt/population.py +7 -10
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/plugins/parser.py +29 -80
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/population/add_new_birth_cohorts.py +8 -9
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/population/base_population.py +0 -5
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/population/data_transformations.py +1 -8
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/population/mortality.py +3 -3
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/results/columns.py +1 -1
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/results/disability.py +89 -15
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/results/disease.py +128 -5
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/results/mortality.py +82 -6
- vivarium_public_health-3.0.5/src/vivarium_public_health/results/observer.py +223 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/results/risk.py +66 -5
- vivarium_public_health-3.0.5/src/vivarium_public_health/results/simple_cause.py +43 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/results/stratification.py +39 -14
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/risks/base_risk.py +14 -16
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/risks/data_transformations.py +3 -1
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/risks/distributions.py +0 -1
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/risks/effect.py +31 -29
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/risks/implementations/low_birth_weight_and_short_gestation.py +51 -30
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/treatment/scale_up.py +6 -10
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/treatment/therapeutic_inertia.py +3 -1
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5/src/vivarium_public_health.egg-info}/PKG-INFO +1 -1
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health.egg-info/SOURCES.txt +1 -0
- vivarium_public_health-3.0.3/src/vivarium_public_health/_version.py +0 -1
- vivarium_public_health-3.0.3/src/vivarium_public_health/results/observer.py +0 -78
- vivarium_public_health-3.0.3/src/vivarium_public_health/results/simple_cause.py +0 -18
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.bandit +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.flake8 +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.gitattributes +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.github/CODEOWNERS +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.github/pull_request_template.md +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.github/workflows/deploy.yml +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.pylintrc +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.readthedocs.yml +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/.zenodo.json +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/CODE_OF_CONDUCT.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/CONTRIBUTING.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/LICENSE.txt +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/MANIFEST.in +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/README.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/Makefile +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/nitpick-exceptions +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/_static/style.css +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/_templates/layout.html +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/disease/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/disease/model.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/disease/models.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/disease/special_disease.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/disease/state.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/disease/transition.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/mslt/delay.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/mslt/disease.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/mslt/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/mslt/intervention.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/mslt/magic_wand_components.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/mslt/observer.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/mslt/population.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/plugins/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/plugins/parser.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/population/add_new_birth_cohorts.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/population/base_population.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/population/data_transformations.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/population/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/population/mortality.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/results/disability.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/results/disease.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/results/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/results/mortality.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/results/observer.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/results/risk.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/results/stratification.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/risks/base_risk.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/risks/data_transformations.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/risks/distributions.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/risks/effect.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/risks/implementations/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/risks/implementations/low_birth_weight_and_short_gestation.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/risks/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/treatment/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/treatment/magic_wand.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/treatment/scale_up.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/treatment/therapeutic_inertia.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/api_reference/utilities.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/conf.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/docs/source/tutorials/index.rst +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/pyproject.toml +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/setup.cfg +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/setup.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/__about__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/disease/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/disease/model.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/disease/models.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/disease/special_disease.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/disease/transition.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/mslt/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/mslt/magic_wand_components.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/plugins/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/population/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/results/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/risks/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/risks/implementations/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/treatment/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/treatment/magic_wand.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health/utilities.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health.egg-info/dependency_links.txt +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health.egg-info/not-zip-safe +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health.egg-info/requires.txt +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/src/vivarium_public_health.egg-info/top_level.txt +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/conftest.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/disease/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/disease/test_disease.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/disease/test_special_disease.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/mock_artifact.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/plugins/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/plugins/test_parser.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/population/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/population/conftest.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/population/test_add_new_birth_cohort.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/population/test_base_population.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/population/test_data_transformations.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/population/test_mortality.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/results/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/results/test_categorical_risk_observer.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/results/test_disability.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/results/test_disability_observer.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/results/test_disease_observer.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/results/test_mortality_observer.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/results/test_stratification.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/risks/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/risks/conftest.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/risks/test_base_risk.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/risks/test_data_transformations.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/risks/test_distributions.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/risks/test_effect.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/risks/test_low_birth_weight_and_short_gestation.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/test_utilities.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tests/treatment/__init__.py +0 -0
- {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.5}/tox.ini +0 -0
@@ -51,8 +51,9 @@ jobs:
|
|
51
51
|
cat ../vivarium_build_utils/install_dependency_branch.sh
|
52
52
|
echo ""
|
53
53
|
echo "----------------------------------------"
|
54
|
-
sh ../vivarium_build_utils/install_dependency_branch.sh layered_config_tree ${branch_name}
|
55
|
-
sh ../vivarium_build_utils/install_dependency_branch.sh vivarium ${branch_name}
|
54
|
+
sh ../vivarium_build_utils/install_dependency_branch.sh layered_config_tree ${branch_name} github
|
55
|
+
sh ../vivarium_build_utils/install_dependency_branch.sh vivarium ${branch_name} github
|
56
|
+
sh ../vivarium_build_utils/install_dependency_branch.sh risk_distributions ${branch_name} github
|
56
57
|
- name: print environment values
|
57
58
|
run: |
|
58
59
|
cat $GITHUB_ENV
|
@@ -1,10 +1,21 @@
|
|
1
|
-
**3.0.
|
1
|
+
**3.0.5 - 08/29/24**
|
2
|
+
|
3
|
+
- Add missing results module-level docstrings
|
4
|
+
- Strengthen the SimpleCause docstring
|
5
|
+
- Rename the SimpleCause class method
|
6
|
+
|
7
|
+
**3.0.4 - 08/28/24**
|
8
|
+
|
9
|
+
- Strengthen results docstrings and clean up others throughout
|
10
|
+
- Add mention of NonLogLinearRiskEffect class to risk exposure tutorial
|
11
|
+
|
12
|
+
**3.0.3 - 08/20/24**
|
2
13
|
|
3
14
|
- Use external script to find matching dependency branches
|
4
15
|
- Fix bug when excluding all but one causes of disability from results
|
5
16
|
- Update FertilityAgeSpecificRates for new data format of age specific fertility rates
|
6
17
|
|
7
|
-
**3.0.2- 08/19/24**
|
18
|
+
**3.0.2 - 08/19/24**
|
8
19
|
|
9
20
|
- Parameterize the script to find matching dependency branches
|
10
21
|
|
@@ -52,9 +52,6 @@ pipeline {
|
|
52
52
|
script {
|
53
53
|
// Use the name of the branch in the build name
|
54
54
|
currentBuild.displayName = "#${BUILD_NUMBER} ${GIT_BRANCH}"
|
55
|
-
|
56
|
-
// Tell BitBucket that a build has started.
|
57
|
-
notifyBitbucket()
|
58
55
|
}
|
59
56
|
}
|
60
57
|
}
|
@@ -139,7 +136,7 @@ pipeline {
|
|
139
136
|
|
140
137
|
stage("Install Package") {
|
141
138
|
steps {
|
142
|
-
sh "${ACTIVATE} && make install
|
139
|
+
sh "${ACTIVATE} && make install"
|
143
140
|
}
|
144
141
|
}
|
145
142
|
|
@@ -198,16 +195,21 @@ pipeline {
|
|
198
195
|
sh "rm -rf ${CONDA_ENV_PATH}"
|
199
196
|
// Delete the workspace directory.
|
200
197
|
deleteDir()
|
201
|
-
// Tell BitBucket whether the build succeeded or failed.
|
202
|
-
script {
|
203
|
-
notifyBitbucket()
|
204
|
-
}
|
205
198
|
}
|
206
199
|
failure {
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
200
|
+
script {
|
201
|
+
if (env.BRANCH == "main") {
|
202
|
+
channelName = "simsci-ci-status"
|
203
|
+
} else {
|
204
|
+
channelName = "simsci-ci-status-test"
|
205
|
+
}
|
206
|
+
}
|
207
|
+
// TODO: DM the developer instead of the slack channel
|
208
|
+
echo "This build failed on ${GIT_BRANCH}. Sending a failure message to Slack."
|
209
|
+
slackSend channel: "#${channelName}",
|
210
|
+
message: ":x: JOB FAILURE: $JOB_NAME - $BUILD_ID\n\n${BUILD_URL}console\n\n<!channel>",
|
211
|
+
teamDomain: "ihme",
|
212
|
+
tokenCredentialId: "slack"
|
211
213
|
}
|
212
214
|
success {
|
213
215
|
script {
|
@@ -57,11 +57,22 @@ build-env: # Make a new conda environment
|
|
57
57
|
install: # Install setuptools, install this package in editable mode
|
58
58
|
pip install --upgrade pip setuptools
|
59
59
|
pip install -e .[DEV]
|
60
|
-
@
|
61
|
-
|
62
|
-
@if [
|
63
|
-
|
60
|
+
@cd ..
|
61
|
+
@echo "----------------------------------------"
|
62
|
+
@if [ ! -d "vivarium_build_utils" ]; then \
|
63
|
+
# Clone the build utils repo if it doesn't exist. \
|
64
|
+
git clone https://github.com/ihmeuw/vivarium_build_utils.git; \
|
65
|
+
else \
|
66
|
+
echo "vivarium_build_utils already exists. Skipping clone."; \
|
64
67
|
fi
|
68
|
+
@echo "Contents of install_dependency_branch.sh"
|
69
|
+
@echo "----------------------------------------"
|
70
|
+
@cat vivarium_build_utils/install_dependency_branch.sh
|
71
|
+
@echo ""
|
72
|
+
@echo "----------------------------------------"
|
73
|
+
@sh vivarium_build_utils/install_dependency_branch.sh vivarium ${GIT_BRANCH} jenkins
|
74
|
+
@sh vivarium_build_utils/install_dependency_branch.sh layered_config_tree ${GIT_BRANCH} jenkins
|
75
|
+
@sh vivarium_build_utils/install_dependency_branch.sh risk_distributions ${GIT_BRANCH} jenkins
|
65
76
|
|
66
77
|
format: setup.py pyproject.toml $(MAKE_SOURCES) # Run the code formatter and import sorter
|
67
78
|
black $(LOCATIONS)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: vivarium_public_health
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.5
|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
.. automodule:: vivarium_public_health.results.simple_cause
|
@@ -2,13 +2,16 @@
|
|
2
2
|
Non-standard Risk Exposure and Effect Models
|
3
3
|
============================================
|
4
4
|
|
5
|
-
:mod:`vivarium_public_health` provides
|
5
|
+
:mod:`vivarium_public_health` provides three components for modeling the impact
|
6
6
|
of some health attributes on others:
|
7
7
|
|
8
8
|
- :class:`~vivarium_public_health.risks.base_risk.Risk`: Model of the
|
9
9
|
underlying exposure based on a continuous or categorical distribution.
|
10
10
|
- :class:`~vivarium_public_health.risks.effect.RiskEffect`: Model of the
|
11
11
|
impact of different exposure levels on another health attribute.
|
12
|
+
- :class:`~vivarium_public_health.risks.effect.NonLogLinearRiskEffect`:
|
13
|
+
Special-case risk effect model where the risk factors are parameterized
|
14
|
+
by exposure levels.
|
12
15
|
|
13
16
|
The standard model is to think of exposure to environmental, metabolic, and
|
14
17
|
behavioral risk factors and their impact on disease incidence rates. However,
|
@@ -16,10 +19,11 @@ we've found many situations to extend this model to other attributes, such as
|
|
16
19
|
interventions and their impacts on other risks, diseases, or mortality itself.
|
17
20
|
|
18
21
|
In order to support these extended models, we've made the
|
19
|
-
:class:`~vivarium_public_health.risks.base_risk.Risk
|
20
|
-
:class:`~vivarium_public_health.risks.effect.RiskEffect
|
22
|
+
:class:`~vivarium_public_health.risks.base_risk.Risk`,
|
23
|
+
:class:`~vivarium_public_health.risks.effect.RiskEffect`, and
|
24
|
+
:class:`~vivarium_public_health.risks.effect.NonLogLinearRiskEffect` components
|
21
25
|
configurable. This tutorial explains the various configuration options you can
|
22
|
-
use with these
|
26
|
+
use with these components.
|
23
27
|
|
24
28
|
.. contents:
|
25
29
|
:local:
|
@@ -29,7 +33,7 @@ Exposure Models
|
|
29
33
|
---------------
|
30
34
|
|
31
35
|
We model exposure using the
|
32
|
-
:class:`~vivarium_public_health.risks.base_risk.Risk` component.
|
36
|
+
:class:`~vivarium_public_health.risks.base_risk.Risk` or component.
|
33
37
|
Consider its configuration options:
|
34
38
|
|
35
39
|
- ``"exposure"``: This option represents the exposure data source. It defaults
|
@@ -217,12 +221,22 @@ Effect Models
|
|
217
221
|
-------------
|
218
222
|
|
219
223
|
Non-standard effect models can **only** be used with dichotomous exposure
|
220
|
-
models (models where someone is either exposed or not exposed. The available
|
224
|
+
models (models where someone is either exposed or not exposed). The available
|
221
225
|
configuration options all correspond to generating a relative risk for
|
222
226
|
the exposed population from a set of parameters.
|
223
227
|
|
224
228
|
We model exposure effects using the
|
225
|
-
:class:`~vivarium_public_health.risks.effect.RiskEffect`
|
229
|
+
:class:`~vivarium_public_health.risks.effect.RiskEffect` or
|
230
|
+
:class:`~vivarium_public_health.risks.effect.NonLogLinearRiskEffect` components.
|
231
|
+
|
232
|
+
For this tutorial, we'll focus on the ``RiskEffect`` component. The
|
233
|
+
``NonLogLinearRiskEffect`` component is a special case of the ``RiskEffect``
|
234
|
+
component where the risk factors are parameterized by exposure levels.
|
235
|
+
|
236
|
+
.. todo::
|
237
|
+
|
238
|
+
Add details on how to use the ``NonLogLinearRiskEffect`` component.
|
239
|
+
|
226
240
|
Let's look at its configuration options:
|
227
241
|
|
228
242
|
- ``"relative_risk"``: Option for specifying a relative risk value directly.
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "3.0.5"
|
@@ -103,9 +103,8 @@ class BaseDiseaseState(State):
|
|
103
103
|
----------
|
104
104
|
index
|
105
105
|
An iterable of integer labels for the simulants.
|
106
|
-
event_time
|
106
|
+
event_time
|
107
107
|
The time at which this transition occurs.
|
108
|
-
|
109
108
|
"""
|
110
109
|
pop = self.population_view.get(index)
|
111
110
|
pop[self.event_time_column] = event_time
|
@@ -141,13 +140,13 @@ class BaseDiseaseState(State):
|
|
141
140
|
The end state after the transition.
|
142
141
|
|
143
142
|
get_data_functions
|
144
|
-
|
143
|
+
Map from transition type to the function to pull that transition's data.
|
145
144
|
triggered
|
145
|
+
The trigger for the transition
|
146
146
|
|
147
147
|
|
148
148
|
Returns
|
149
149
|
-------
|
150
|
-
RateTransition
|
151
150
|
The created transition object.
|
152
151
|
"""
|
153
152
|
transition = RateTransition(self, output, get_data_functions, triggered)
|
@@ -157,7 +156,7 @@ class BaseDiseaseState(State):
|
|
157
156
|
def add_proportion_transition(
|
158
157
|
self,
|
159
158
|
output: "BaseDiseaseState",
|
160
|
-
get_data_functions: Dict[str, Callable] = None,
|
159
|
+
get_data_functions: Optional[Dict[str, Callable]] = None,
|
161
160
|
triggered=Trigger.NOT_TRIGGERED,
|
162
161
|
) -> ProportionTransition:
|
163
162
|
"""Builds a ProportionTransition from this state to the given state.
|
@@ -166,13 +165,13 @@ class BaseDiseaseState(State):
|
|
166
165
|
----------
|
167
166
|
output
|
168
167
|
The end state after the transition.
|
169
|
-
|
170
168
|
get_data_functions
|
171
|
-
|
169
|
+
Map from transition type to the function to pull that transition's data.
|
170
|
+
triggered
|
171
|
+
The trigger for the transition.
|
172
172
|
|
173
173
|
Returns
|
174
174
|
-------
|
175
|
-
RateTransition
|
176
175
|
The created transition object.
|
177
176
|
"""
|
178
177
|
if "proportion" not in get_data_functions:
|
@@ -302,8 +301,8 @@ class DiseaseState(BaseDiseaseState):
|
|
302
301
|
allow_self_transition: bool = False,
|
303
302
|
side_effect_function: Optional[Callable] = None,
|
304
303
|
cause_type: str = "cause",
|
305
|
-
get_data_functions: Dict[str, Callable] = None,
|
306
|
-
cleanup_function: Callable = None,
|
304
|
+
get_data_functions: Optional[Dict[str, Callable]] = None,
|
305
|
+
cleanup_function: Optional[Callable] = None,
|
307
306
|
):
|
308
307
|
"""
|
309
308
|
Parameters
|
@@ -312,14 +311,16 @@ class DiseaseState(BaseDiseaseState):
|
|
312
311
|
The name of this state.
|
313
312
|
allow_self_transition
|
314
313
|
Whether this state allows simulants to remain in the state for
|
315
|
-
multiple time-steps
|
314
|
+
multiple time-steps.
|
316
315
|
side_effect_function
|
317
316
|
A function to be called when this state is entered.
|
318
317
|
cause_type
|
319
318
|
The type of cause represented by this state. Either "cause" or "sequela".
|
320
319
|
get_data_functions
|
321
320
|
A dictionary containing a mapping to functions to retrieve data for
|
322
|
-
various state attributes
|
321
|
+
various state attributes.
|
322
|
+
cleanup_function
|
323
|
+
The cleanup function.
|
323
324
|
"""
|
324
325
|
super().__init__(
|
325
326
|
state_id,
|
@@ -344,7 +345,7 @@ class DiseaseState(BaseDiseaseState):
|
|
344
345
|
|
345
346
|
Parameters
|
346
347
|
----------
|
347
|
-
builder
|
348
|
+
builder
|
348
349
|
Interface to several simulation tools.
|
349
350
|
"""
|
350
351
|
super().setup(builder)
|
@@ -506,9 +507,9 @@ class DiseaseState(BaseDiseaseState):
|
|
506
507
|
----------
|
507
508
|
index
|
508
509
|
An iterable of integer labels for the simulants.
|
509
|
-
event_time
|
510
|
+
event_time
|
510
511
|
The time at which this transition occurs.
|
511
|
-
population_view
|
512
|
+
population_view
|
512
513
|
A view of the internal state of the simulation.
|
513
514
|
"""
|
514
515
|
eligible_index = self._filter_for_transition_eligibility(index, event_time)
|
@@ -528,7 +529,6 @@ class DiseaseState(BaseDiseaseState):
|
|
528
529
|
|
529
530
|
Returns
|
530
531
|
-------
|
531
|
-
`pandas.Series`
|
532
532
|
An iterable of disability weights indexed by the provided `index`.
|
533
533
|
"""
|
534
534
|
disability_weight = pd.Series(0.0, index=index)
|
@@ -555,8 +555,12 @@ class DiseaseState(BaseDiseaseState):
|
|
555
555
|
----------
|
556
556
|
index
|
557
557
|
An iterable of integer labels for the simulants.
|
558
|
-
rates_df
|
558
|
+
rates_df
|
559
|
+
A DataFrame of mortality rates.
|
559
560
|
|
561
|
+
Returns
|
562
|
+
-------
|
563
|
+
The modified DataFrame of mortality rates.
|
560
564
|
"""
|
561
565
|
rate = self.excess_mortality_rate(index, skip_post_processor=True)
|
562
566
|
rates_df[self.state_id] = rate
|
@@ -599,17 +603,18 @@ class DiseaseState(BaseDiseaseState):
|
|
599
603
|
infected_at = current_time - pd.to_timedelta(infected_at, unit="D")
|
600
604
|
return infected_at
|
601
605
|
|
602
|
-
def _filter_for_transition_eligibility(self, index, event_time):
|
606
|
+
def _filter_for_transition_eligibility(self, index, event_time) -> pd.Index:
|
603
607
|
"""Filter out all simulants who haven't been in the state for the prescribed dwell time.
|
604
608
|
|
605
609
|
Parameters
|
606
610
|
----------
|
607
611
|
index
|
608
612
|
An iterable of integer labels for the simulants.
|
613
|
+
event_time
|
614
|
+
The time at which this transition occurs.
|
609
615
|
|
610
616
|
Returns
|
611
617
|
-------
|
612
|
-
pd.Index
|
613
618
|
A filtered index of the simulants.
|
614
619
|
"""
|
615
620
|
population = self.population_view.get(index, query='alive == "alive"')
|
@@ -19,8 +19,7 @@ from vivarium.framework.population import SimulantData
|
|
19
19
|
|
20
20
|
|
21
21
|
class DelayedRisk(Component):
|
22
|
-
"""
|
23
|
-
A delayed risk represents an exposure whose impact takes time to come into
|
22
|
+
"""A delayed risk represents an exposure whose impact takes time to come into
|
24
23
|
effect (e.g., smoking uptake and cessation).
|
25
24
|
|
26
25
|
The data required by this component are:
|
@@ -320,8 +319,7 @@ class DelayedRisk(Component):
|
|
320
319
|
########################
|
321
320
|
|
322
321
|
def on_initialize_simulants(self, pop_data: SimulantData) -> None:
|
323
|
-
"""
|
324
|
-
Define the initial distribution of the population across the bins, in
|
322
|
+
"""Define the initial distribution of the population across the bins, in
|
325
323
|
both the BAU and the intervention scenario.
|
326
324
|
"""
|
327
325
|
# Set all bins to zero, in order to create the required columns.
|
@@ -364,7 +362,6 @@ class DelayedRisk(Component):
|
|
364
362
|
- New exposures
|
365
363
|
- Cessation of exposure
|
366
364
|
- Increased duration of time since exposure
|
367
|
-
|
368
365
|
"""
|
369
366
|
if self.clock().year == self.start_year:
|
370
367
|
return
|
@@ -540,6 +537,17 @@ def pivot_load(builder: Builder, entity_key: str) -> pd.DataFrame:
|
|
540
537
|
Performs a long to wide conversion if dataframe has an index column
|
541
538
|
named 'measure'.
|
542
539
|
|
540
|
+
Parameters
|
541
|
+
----------
|
542
|
+
builder
|
543
|
+
The builder object for the simulation.
|
544
|
+
entity_key
|
545
|
+
The key for the entity to be loaded.
|
546
|
+
|
547
|
+
Returns
|
548
|
+
-------
|
549
|
+
pd.DataFrame
|
550
|
+
The loaded data and potentially pivoted data.
|
543
551
|
"""
|
544
552
|
data = builder.data.load(entity_key)
|
545
553
|
|
@@ -19,7 +19,8 @@ from vivarium.framework.population import SimulantData
|
|
19
19
|
|
20
20
|
|
21
21
|
class AcuteDisease(Component):
|
22
|
-
"""
|
22
|
+
"""This component characterises an acute disease.
|
23
|
+
|
23
24
|
An acute disease has a sufficiently short duration, relative to the
|
24
25
|
time-step size, that it is not meaningful to talk about prevalence.
|
25
26
|
Instead, it simply contributes an excess mortality rate, and/or a
|
@@ -32,10 +33,18 @@ class AcuteDisease(Component):
|
|
32
33
|
|
33
34
|
where `<disease>` is the name as provided to the constructor.
|
34
35
|
|
35
|
-
|
36
|
+
Attributes
|
36
37
|
----------
|
37
38
|
disease
|
38
39
|
The disease name (referred to as `<disease>` here).
|
40
|
+
excess_mortality
|
41
|
+
The excess mortality rate for the disease.
|
42
|
+
int_excess_mortality
|
43
|
+
The excess mortality rate for the disease in the intervention scenario.
|
44
|
+
disability_rate
|
45
|
+
The years lost due to disability (YLD) rate for the disease.
|
46
|
+
int_disability_rate
|
47
|
+
The YLD rate for the disease in the intervention scenario.
|
39
48
|
|
40
49
|
"""
|
41
50
|
|
@@ -77,16 +86,14 @@ class AcuteDisease(Component):
|
|
77
86
|
##################################
|
78
87
|
|
79
88
|
def mortality_adjustment(self, index, mortality_rate):
|
80
|
-
"""
|
81
|
-
Adjust the all-cause mortality rate in the intervention scenario, to
|
89
|
+
"""Adjust the all-cause mortality rate in the intervention scenario, to
|
82
90
|
account for any change in prevalence (relative to the BAU scenario).
|
83
91
|
"""
|
84
92
|
delta = self.int_excess_mortality(index) - self.excess_mortality(index)
|
85
93
|
return mortality_rate + delta
|
86
94
|
|
87
95
|
def disability_adjustment(self, index, yld_rate):
|
88
|
-
"""
|
89
|
-
Adjust the years lost due to disability (YLD) rate in the intervention
|
96
|
+
"""Adjust the years lost due to disability (YLD) rate in the intervention
|
90
97
|
scenario, to account for any change in prevalence (relative to the BAU
|
91
98
|
scenario).
|
92
99
|
"""
|
@@ -106,10 +113,28 @@ class Disease(Component):
|
|
106
113
|
|
107
114
|
where `<disease>` is the name as provided to the constructor.
|
108
115
|
|
109
|
-
|
116
|
+
Attributes
|
110
117
|
----------
|
111
118
|
disease
|
112
119
|
The disease name (referred to as `<disease>` here).
|
120
|
+
clock
|
121
|
+
The simulation clock.
|
122
|
+
start_year
|
123
|
+
The simulation start year.
|
124
|
+
simplified_equations
|
125
|
+
Whether to use simplified equations for the disease model.
|
126
|
+
incidence
|
127
|
+
The incidence rate for the disease.
|
128
|
+
incidence_intervention
|
129
|
+
The incidence rate for the disease in the intervention scenario.
|
130
|
+
remission
|
131
|
+
The remission rate for the disease.
|
132
|
+
excess_mortality
|
133
|
+
The excess mortality rate for the disease.
|
134
|
+
disability_rate
|
135
|
+
The years lost due to disability (YLD) rate for the disease.
|
136
|
+
initial_prevalence
|
137
|
+
The initial prevalence of the disease.
|
113
138
|
|
114
139
|
"""
|
115
140
|
|
@@ -231,9 +256,7 @@ class Disease(Component):
|
|
231
256
|
self.population_view.update(pop)
|
232
257
|
|
233
258
|
def on_time_step_prepare(self, event: Event) -> None:
|
234
|
-
"""
|
235
|
-
Update the disease status for both the BAU and intervention scenarios.
|
236
|
-
"""
|
259
|
+
"""Update the disease status for both the BAU and intervention scenarios."""
|
237
260
|
# Do not update the disease status in the first year, the initial data
|
238
261
|
# describe the disease state at the end of the year.
|
239
262
|
if self.clock().year == self.start_year:
|
@@ -356,8 +379,7 @@ class Disease(Component):
|
|
356
379
|
##################################
|
357
380
|
|
358
381
|
def mortality_adjustment(self, index, mortality_rate):
|
359
|
-
"""
|
360
|
-
Adjust the all-cause mortality rate in the intervention scenario, to
|
382
|
+
"""Adjust the all-cause mortality rate in the intervention scenario, to
|
361
383
|
account for any change in disease prevalence (relative to the BAU
|
362
384
|
scenario).
|
363
385
|
"""
|
@@ -387,8 +409,7 @@ class Disease(Component):
|
|
387
409
|
return mortality_rate + delta
|
388
410
|
|
389
411
|
def disability_adjustment(self, index, yld_rate):
|
390
|
-
"""
|
391
|
-
Adjust the years lost due to disability (YLD) rate in the intervention
|
412
|
+
"""Adjust the years lost due to disability (YLD) rate in the intervention
|
392
413
|
scenario, to account for any change in disease prevalence (relative to
|
393
414
|
the BAU scenario).
|
394
415
|
"""
|
@@ -100,9 +100,9 @@ class ModifyDiseaseRate(Component):
|
|
100
100
|
|
101
101
|
|
102
102
|
class ModifyDiseaseIncidence(ModifyDiseaseRate):
|
103
|
-
"""
|
104
|
-
Interventions that modify a disease incidence rate, based on a PIF lookup
|
103
|
+
"""Interventions that modify a disease incidence rate, based on a PIF lookup
|
105
104
|
table.
|
105
|
+
|
106
106
|
"""
|
107
107
|
|
108
108
|
def __init__(self, intervention: str, disease: str):
|
@@ -110,9 +110,9 @@ class ModifyDiseaseIncidence(ModifyDiseaseRate):
|
|
110
110
|
|
111
111
|
|
112
112
|
class ModifyDiseaseMortality(ModifyDiseaseRate):
|
113
|
-
"""
|
114
|
-
Interventions that modify a disease fatality rate, based on a PIF lookup
|
113
|
+
"""Interventions that modify a disease fatality rate, based on a PIF lookup
|
115
114
|
table.
|
115
|
+
|
116
116
|
"""
|
117
117
|
|
118
118
|
def __init__(self, intervention: str, disease: str):
|
@@ -120,9 +120,9 @@ class ModifyDiseaseMortality(ModifyDiseaseRate):
|
|
120
120
|
|
121
121
|
|
122
122
|
class ModifyDiseaseMorbidity(ModifyDiseaseRate):
|
123
|
-
"""
|
124
|
-
Interventions that modify a disease disability rate, based on a PIF lookup
|
123
|
+
"""Interventions that modify a disease disability rate, based on a PIF lookup
|
125
124
|
table.
|
125
|
+
|
126
126
|
"""
|
127
127
|
|
128
128
|
def __init__(self, intervention: str, disease: str):
|
@@ -130,10 +130,13 @@ class ModifyDiseaseMorbidity(ModifyDiseaseRate):
|
|
130
130
|
|
131
131
|
|
132
132
|
class ModifyAcuteDiseaseIncidence(Component):
|
133
|
-
"""
|
134
|
-
|
135
|
-
|
133
|
+
"""Interventions that modify an acute disease incidence rate.
|
134
|
+
|
135
|
+
Notes
|
136
|
+
-----
|
137
|
+
This intervention will simply modify both the disability rate
|
136
138
|
and the mortality rate for the chosen acute disease.
|
139
|
+
|
137
140
|
"""
|
138
141
|
|
139
142
|
##############
|