vivarium-public-health 3.2.2__tar.gz → 4.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/CHANGELOG.rst +4 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/PKG-INFO +1 -1
- vivarium_public_health-4.0.0/src/vivarium_public_health/_version.py +1 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/risks/implementations/low_birth_weight_and_short_gestation.py +3 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health.egg-info/PKG-INFO +1 -1
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health.egg-info/SOURCES.txt +0 -1
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/test_low_birth_weight_and_short_gestation.py +55 -4
- vivarium_public_health-3.2.2/.github/workflows/build.yml +0 -26
- vivarium_public_health-3.2.2/src/vivarium_public_health/_version.py +0 -1
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.bandit +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.flake8 +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.gitattributes +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.github/CODEOWNERS +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.github/pull_request_template.md +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.github/workflows/deploy.yml +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.gitignore +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.pylintrc +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.readthedocs.yml +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.zenodo.json +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/CODE_OF_CONDUCT.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/CONTRIBUTING.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/Jenkinsfile +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/LICENSE.txt +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/MANIFEST.in +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/Makefile +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/README.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/Makefile +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/nitpick-exceptions +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/_static/style.css +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/_templates/layout.html +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/disease/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/disease/model.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/disease/models.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/disease/special_disease.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/disease/state.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/disease/transition.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/mslt/delay.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/mslt/disease.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/mslt/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/mslt/intervention.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/mslt/magic_wand_components.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/mslt/observer.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/mslt/population.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/plugins/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/plugins/parser.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/population/add_new_birth_cohorts.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/population/base_population.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/population/data_transformations.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/population/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/population/mortality.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/disability.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/disease.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/mortality.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/observer.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/risk.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/simple_cause.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/results/stratification.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/risks/base_risk.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/risks/data_transformations.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/risks/distributions.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/risks/effect.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/risks/implementations/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/risks/implementations/low_birth_weight_and_short_gestation.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/risks/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/treatment/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/treatment/magic_wand.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/treatment/scale_up.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/treatment/therapeutic_inertia.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/utilities.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/conf.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/tutorials/index.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/tutorials/risk_exposure.rst +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/pyproject.toml +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/python_versions.json +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/setup.cfg +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/setup.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/__about__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/disease/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/disease/exceptions.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/disease/model.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/disease/models.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/disease/special_disease.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/disease/state.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/disease/transition.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/mslt/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/mslt/delay.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/mslt/disease.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/mslt/intervention.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/mslt/magic_wand_components.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/mslt/observer.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/mslt/population.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/plugins/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/plugins/parser.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/population/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/population/add_new_birth_cohorts.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/population/base_population.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/population/data_transformations.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/population/mortality.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/columns.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/disability.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/disease.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/mortality.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/observer.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/risk.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/simple_cause.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/results/stratification.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/risks/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/risks/base_risk.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/risks/data_transformations.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/risks/distributions.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/risks/effect.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/risks/implementations/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/treatment/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/treatment/magic_wand.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/treatment/scale_up.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/treatment/therapeutic_inertia.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/utilities.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health.egg-info/dependency_links.txt +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health.egg-info/not-zip-safe +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health.egg-info/requires.txt +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health.egg-info/top_level.txt +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/conftest.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/data/rr_interpolator.csv +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/disease/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/disease/test_disease.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/disease/test_special_disease.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/mock_artifact.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/plugins/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/plugins/test_parser.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/population/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/population/conftest.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/population/test_add_new_birth_cohort.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/population/test_base_population.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/population/test_data_transformations.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/population/test_mortality.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_categorical_risk_observer.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_disability.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_disability_observer.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_disease_observer.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_mortality_observer.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_stratification.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/conftest.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/test_base_risk.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/test_data_transformations.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/test_distributions.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/test_effect.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/test_utilities.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/treatment/__init__.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/treatment/test_scale_up.py +0 -0
- {vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: vivarium_public_health
|
3
|
-
Version:
|
3
|
+
Version: 4.0.0
|
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
|
+
__version__ = "4.0.0"
|
@@ -202,6 +202,9 @@ class LBWSGRisk(Risk):
|
|
202
202
|
@property
|
203
203
|
def configuration_defaults(self) -> dict[str, Any]:
|
204
204
|
configuration_defaults = super().configuration_defaults
|
205
|
+
configuration_defaults[self.name]["data_sources"][
|
206
|
+
"exposure"
|
207
|
+
] = f"{self.risk}.birth_exposure"
|
205
208
|
configuration_defaults[self.name]["distribution_type"] = "lbwsg"
|
206
209
|
return configuration_defaults
|
207
210
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: vivarium_public_health
|
3
|
-
Version:
|
3
|
+
Version: 4.0.0
|
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
|
@@ -41,9 +41,7 @@ def test_parsing_lbwsg_descriptions(description, expected_weight_values, expecte
|
|
41
41
|
assert age_interval.right == expected_age_values[1]
|
42
42
|
|
43
43
|
|
44
|
-
def test_lbwsg_risk_effect_rr_pipeline(
|
45
|
-
base_config, base_plugins, mocker, mock_rr_interpolators
|
46
|
-
):
|
44
|
+
def test_lbwsg_risk_effect_rr_pipeline(base_config, base_plugins, mock_rr_interpolators):
|
47
45
|
|
48
46
|
risk = LBWSGRisk()
|
49
47
|
lbwsg_effect = LBWSGRiskEffect("cause.test_cause.cause_specific_mortality_rate")
|
@@ -63,7 +61,7 @@ def test_lbwsg_risk_effect_rr_pipeline(
|
|
63
61
|
|
64
62
|
# Add data dict to add to artifact
|
65
63
|
data = {
|
66
|
-
f"{risk.name}.
|
64
|
+
f"{risk.name}.birth_exposure": exposure,
|
67
65
|
f"{risk.name}.relative_risk": rr_data,
|
68
66
|
f"{risk.name}.population_attributable_fraction": 0,
|
69
67
|
f"{risk.name}.categories": categories,
|
@@ -122,6 +120,59 @@ def test_lbwsg_risk_effect_rr_pipeline(
|
|
122
120
|
assert (actual_rr == 1.0).all()
|
123
121
|
|
124
122
|
|
123
|
+
def test_use_birth_exposure(base_config, base_plugins, mock_rr_interpolators):
|
124
|
+
risk = LBWSGRisk()
|
125
|
+
lbwsg_effect = LBWSGRiskEffect("cause.test_cause.cause_specific_mortality_rate")
|
126
|
+
|
127
|
+
# Add mock data to artifact
|
128
|
+
categories = {
|
129
|
+
"cat81": "Neonatal preterm and LBWSG (estimation years) - [28, 30) wks, [2500, 3000) g",
|
130
|
+
"cat82": "Neonatal preterm and LBWSG (estimation years) - [28, 30) wks, [3000, 3500) g",
|
131
|
+
}
|
132
|
+
# Create exposure with matching demograph index as age_bins
|
133
|
+
age_bins = make_age_bins()
|
134
|
+
ages = age_bins.drop(columns="age_group_name")
|
135
|
+
# Have to match age bins and rr data to make age intervals
|
136
|
+
rr_data = make_categorical_data(ages)
|
137
|
+
# Format birth exposure data
|
138
|
+
exposure = pd.DataFrame(
|
139
|
+
{
|
140
|
+
"sex": ["Male", "Female", "Male", "Female"],
|
141
|
+
"year_start": [2021, 2021, 2021, 2021],
|
142
|
+
"year_end": [2022, 2022, 2022, 2022],
|
143
|
+
"parameter": ["cat81", "cat81", "cat82", "cat82"],
|
144
|
+
"value": [0.75, 0.75, 0.25, 0.25],
|
145
|
+
}
|
146
|
+
)
|
147
|
+
|
148
|
+
# Add data dict to add to artifact
|
149
|
+
data = {
|
150
|
+
f"{risk.name}.birth_exposure": exposure,
|
151
|
+
f"{risk.name}.relative_risk": rr_data,
|
152
|
+
f"{risk.name}.population_attributable_fraction": 0,
|
153
|
+
f"{risk.name}.categories": categories,
|
154
|
+
f"{risk.name}.relative_risk_interpolator": mock_rr_interpolators,
|
155
|
+
}
|
156
|
+
|
157
|
+
# Only have neontal age groups
|
158
|
+
age_start = 0.0
|
159
|
+
age_end = 1.0
|
160
|
+
base_config.update(
|
161
|
+
{
|
162
|
+
"population": {
|
163
|
+
"initialization_age_start": age_start,
|
164
|
+
"initialization_age_max": age_end,
|
165
|
+
}
|
166
|
+
}
|
167
|
+
)
|
168
|
+
sim = _setup_risk_effect_simulation(base_config, base_plugins, risk, lbwsg_effect, data)
|
169
|
+
pop = sim.get_population()
|
170
|
+
|
171
|
+
# Assert LBWSG birth exposure columns were created
|
172
|
+
assert "birth_weight_exposure" in pop.columns
|
173
|
+
assert "gestational_age_exposure" in pop.columns
|
174
|
+
|
175
|
+
|
125
176
|
def make_categorical_data(data: pd.DataFrame) -> pd.DataFrame:
|
126
177
|
# Takes age gropus and adds sex, years, categories, and values
|
127
178
|
dfs = []
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
# - invoked on push, pull_request, manual trigger, or schedule
|
3
|
-
# - test under at least 3 versions of python
|
4
|
-
# -----------------------------------------------------------------------------
|
5
|
-
name: build
|
6
|
-
on:
|
7
|
-
push:
|
8
|
-
pull_request:
|
9
|
-
workflow_dispatch:
|
10
|
-
schedule:
|
11
|
-
- cron: "0 8 * * *"
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
build:
|
15
|
-
strategy:
|
16
|
-
matrix:
|
17
|
-
python-version: ["3.10", "3.11"]
|
18
|
-
uses:
|
19
|
-
ihmeuw/vivarium_build_utils/.github/workflows/build.yml@main
|
20
|
-
with:
|
21
|
-
dependencies: "layered_config_tree,vivarium"
|
22
|
-
skip_mypy: true
|
23
|
-
python_version: ${{ matrix.python-version }}
|
24
|
-
secrets:
|
25
|
-
NOTIFY_EMAIL: ${{ secrets.NOTIFY_EMAIL }}
|
26
|
-
NOTIFY_PASSWORD: ${{ secrets.NOTIFY_PASSWORD }}
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "3.2.2"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/.github/pull_request_template.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/_templates/layout.html
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/api_reference/index.rst
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/docs/source/tutorials/index.rst
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/src/vivarium_public_health/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/data/rr_interpolator.csv
RENAMED
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/disease/test_special_disease.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/population/test_mortality.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_disability.py
RENAMED
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_disease_observer.py
RENAMED
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/results/test_stratification.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/risks/test_distributions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{vivarium_public_health-3.2.2 → vivarium_public_health-4.0.0}/tests/treatment/test_scale_up.py
RENAMED
File without changes
|
File without changes
|