vivarium-public-health 3.1.5__tar.gz → 3.2.1__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.
Files changed (161) hide show
  1. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.readthedocs.yml +4 -4
  2. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/CHANGELOG.rst +8 -0
  3. vivarium_public_health-3.2.1/Jenkinsfile +4 -0
  4. vivarium_public_health-3.2.1/Makefile +13 -0
  5. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/PKG-INFO +2 -2
  6. vivarium_public_health-3.2.1/python_versions.json +1 -0
  7. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/setup.py +28 -1
  8. vivarium_public_health-3.2.1/src/vivarium_public_health/_version.py +1 -0
  9. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/risks/effect.py +2 -2
  10. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/risks/implementations/low_birth_weight_and_short_gestation.py +10 -13
  11. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health.egg-info/PKG-INFO +2 -2
  12. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health.egg-info/SOURCES.txt +2 -0
  13. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health.egg-info/requires.txt +1 -1
  14. vivarium_public_health-3.2.1/tests/data/rr_interpolator.csv +51 -0
  15. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/risks/conftest.py +8 -0
  16. vivarium_public_health-3.2.1/tests/risks/test_low_birth_weight_and_short_gestation.py +142 -0
  17. vivarium_public_health-3.1.5/Jenkinsfile +0 -2
  18. vivarium_public_health-3.1.5/Makefile +0 -104
  19. vivarium_public_health-3.1.5/src/vivarium_public_health/_version.py +0 -1
  20. vivarium_public_health-3.1.5/tests/risks/test_low_birth_weight_and_short_gestation.py +0 -34
  21. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.bandit +0 -0
  22. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.flake8 +0 -0
  23. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.gitattributes +0 -0
  24. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.github/CODEOWNERS +0 -0
  25. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.github/pull_request_template.md +0 -0
  26. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.github/workflows/build.yml +0 -0
  27. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.github/workflows/deploy.yml +0 -0
  28. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.gitignore +0 -0
  29. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.pylintrc +0 -0
  30. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/.zenodo.json +0 -0
  31. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/CODE_OF_CONDUCT.rst +0 -0
  32. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/CONTRIBUTING.rst +0 -0
  33. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/LICENSE.txt +0 -0
  34. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/MANIFEST.in +0 -0
  35. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/README.rst +0 -0
  36. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/Makefile +0 -0
  37. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/nitpick-exceptions +0 -0
  38. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/_static/style.css +0 -0
  39. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/_templates/layout.html +0 -0
  40. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/disease/index.rst +0 -0
  41. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/disease/model.rst +0 -0
  42. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/disease/models.rst +0 -0
  43. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/disease/special_disease.rst +0 -0
  44. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/disease/state.rst +0 -0
  45. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/disease/transition.rst +0 -0
  46. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/index.rst +0 -0
  47. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/mslt/delay.rst +0 -0
  48. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/mslt/disease.rst +0 -0
  49. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/mslt/index.rst +0 -0
  50. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/mslt/intervention.rst +0 -0
  51. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/mslt/magic_wand_components.rst +0 -0
  52. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/mslt/observer.rst +0 -0
  53. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/mslt/population.rst +0 -0
  54. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/plugins/index.rst +0 -0
  55. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/plugins/parser.rst +0 -0
  56. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/population/add_new_birth_cohorts.rst +0 -0
  57. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/population/base_population.rst +0 -0
  58. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/population/data_transformations.rst +0 -0
  59. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/population/index.rst +0 -0
  60. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/population/mortality.rst +0 -0
  61. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/disability.rst +0 -0
  62. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/disease.rst +0 -0
  63. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/index.rst +0 -0
  64. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/mortality.rst +0 -0
  65. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/observer.rst +0 -0
  66. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/risk.rst +0 -0
  67. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/simple_cause.rst +0 -0
  68. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/results/stratification.rst +0 -0
  69. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/risks/base_risk.rst +0 -0
  70. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/risks/data_transformations.rst +0 -0
  71. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/risks/distributions.rst +0 -0
  72. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/risks/effect.rst +0 -0
  73. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/risks/implementations/index.rst +0 -0
  74. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/risks/implementations/low_birth_weight_and_short_gestation.rst +0 -0
  75. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/risks/index.rst +0 -0
  76. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/treatment/index.rst +0 -0
  77. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/treatment/magic_wand.rst +0 -0
  78. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/treatment/scale_up.rst +0 -0
  79. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/treatment/therapeutic_inertia.rst +0 -0
  80. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/api_reference/utilities.rst +0 -0
  81. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/conf.py +0 -0
  82. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/index.rst +0 -0
  83. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/tutorials/index.rst +0 -0
  84. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/docs/source/tutorials/risk_exposure.rst +0 -0
  85. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/pyproject.toml +0 -0
  86. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/setup.cfg +0 -0
  87. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/__about__.py +0 -0
  88. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/__init__.py +0 -0
  89. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/disease/__init__.py +0 -0
  90. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/disease/exceptions.py +0 -0
  91. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/disease/model.py +0 -0
  92. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/disease/models.py +0 -0
  93. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/disease/special_disease.py +0 -0
  94. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/disease/state.py +0 -0
  95. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/disease/transition.py +0 -0
  96. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/mslt/__init__.py +0 -0
  97. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/mslt/delay.py +0 -0
  98. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/mslt/disease.py +0 -0
  99. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/mslt/intervention.py +0 -0
  100. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/mslt/magic_wand_components.py +0 -0
  101. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/mslt/observer.py +0 -0
  102. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/mslt/population.py +0 -0
  103. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/plugins/__init__.py +0 -0
  104. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/plugins/parser.py +0 -0
  105. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/population/__init__.py +0 -0
  106. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/population/add_new_birth_cohorts.py +0 -0
  107. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/population/base_population.py +0 -0
  108. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/population/data_transformations.py +0 -0
  109. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/population/mortality.py +0 -0
  110. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/__init__.py +0 -0
  111. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/columns.py +0 -0
  112. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/disability.py +0 -0
  113. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/disease.py +0 -0
  114. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/mortality.py +0 -0
  115. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/observer.py +0 -0
  116. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/risk.py +0 -0
  117. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/simple_cause.py +0 -0
  118. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/results/stratification.py +0 -0
  119. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/risks/__init__.py +0 -0
  120. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/risks/base_risk.py +0 -0
  121. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/risks/data_transformations.py +0 -0
  122. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/risks/distributions.py +0 -0
  123. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/risks/implementations/__init__.py +0 -0
  124. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/treatment/__init__.py +0 -0
  125. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/treatment/magic_wand.py +0 -0
  126. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/treatment/scale_up.py +0 -0
  127. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/treatment/therapeutic_inertia.py +0 -0
  128. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health/utilities.py +0 -0
  129. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health.egg-info/dependency_links.txt +0 -0
  130. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health.egg-info/not-zip-safe +0 -0
  131. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/src/vivarium_public_health.egg-info/top_level.txt +0 -0
  132. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/__init__.py +0 -0
  133. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/conftest.py +0 -0
  134. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/disease/__init__.py +0 -0
  135. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/disease/test_disease.py +0 -0
  136. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/disease/test_special_disease.py +0 -0
  137. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/mock_artifact.py +0 -0
  138. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/plugins/__init__.py +0 -0
  139. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/plugins/test_parser.py +0 -0
  140. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/population/__init__.py +0 -0
  141. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/population/conftest.py +0 -0
  142. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/population/test_add_new_birth_cohort.py +0 -0
  143. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/population/test_base_population.py +0 -0
  144. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/population/test_data_transformations.py +0 -0
  145. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/population/test_mortality.py +0 -0
  146. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/results/__init__.py +0 -0
  147. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/results/test_categorical_risk_observer.py +0 -0
  148. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/results/test_disability.py +0 -0
  149. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/results/test_disability_observer.py +0 -0
  150. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/results/test_disease_observer.py +0 -0
  151. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/results/test_mortality_observer.py +0 -0
  152. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/results/test_stratification.py +0 -0
  153. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/risks/__init__.py +0 -0
  154. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/risks/test_base_risk.py +0 -0
  155. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/risks/test_data_transformations.py +0 -0
  156. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/risks/test_distributions.py +0 -0
  157. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/risks/test_effect.py +0 -0
  158. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/test_utilities.py +0 -0
  159. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/treatment/__init__.py +0 -0
  160. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tests/treatment/test_scale_up.py +0 -0
  161. {vivarium_public_health-3.1.5 → vivarium_public_health-3.2.1}/tox.ini +0 -0
@@ -1,6 +1,10 @@
1
1
  # This is the version for the readthedocs configuration. Version 2 ignores
2
2
  # web-based configuration and uses everything from this file.
3
3
  version: 2
4
+ # Doc builds will fail if there are any warnings
5
+ sphinx:
6
+ configuration: docs/source/conf.py
7
+ fail_on_warning: true
4
8
 
5
9
  # Configure the python version and environment construction run before
6
10
  # docs are built.
@@ -15,7 +19,3 @@ python:
15
19
  path: .
16
20
  extra_requirements:
17
21
  - docs
18
-
19
- # Doc builds will fail if there are any warnings
20
- sphinx:
21
- fail_on_warning: true
@@ -1,3 +1,11 @@
1
+ **3.2.1 - 1/30/25**
2
+
3
+ - Get python versions from python_versions.json
4
+
5
+ **3.2.0 - 1/15/25**
6
+
7
+ - Bugfix: Fix bug in LBWSGRiskEffect where relative risk pipeline was not properly created
8
+
1
9
  **3.1.5 - 01/14/25**
2
10
 
3
11
  - Bugfix: Vivarium InteractiveContext no longer returns int
@@ -0,0 +1,4 @@
1
+ @Library("vivarium_build_utils") _
2
+ reusable_pipeline(scheduled_branches: ["main"],
3
+ upstream_repos: ["vivarium", "layered_config_tree", "risk_distributions"],
4
+ )
@@ -0,0 +1,13 @@
1
+ # Check if we're running in Jenkins
2
+ ifdef JENKINS_URL
3
+ # Files are already in workspace from shared library
4
+ MAKE_INCLUDES := .
5
+ else
6
+ # For local dev, search in parent directory
7
+ MAKE_INCLUDES := ../vivarium_build_utils/resources/makefiles
8
+ endif
9
+
10
+ PACKAGE_NAME = vivarium_public_health
11
+
12
+ include $(MAKE_INCLUDES)/base.mk
13
+ include $(MAKE_INCLUDES)/test.mk
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: vivarium_public_health
3
- Version: 3.1.5
3
+ Version: 3.2.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
@@ -63,7 +63,7 @@ Requires-Dist: pytest-mock; extra == "dev"
63
63
  Requires-Dist: hypothesis; extra == "dev"
64
64
  Requires-Dist: pyyaml; extra == "dev"
65
65
  Requires-Dist: black==22.3.0; extra == "dev"
66
- Requires-Dist: isort; extra == "dev"
66
+ Requires-Dist: isort==5.13.2; extra == "dev"
67
67
  Dynamic: author
68
68
  Dynamic: author-email
69
69
  Dynamic: classifier
@@ -0,0 +1 @@
1
+ ["3.10", "3.11"]
@@ -1,8 +1,35 @@
1
1
  #!/usr/bin/env python
2
+ import json
2
3
  import os
4
+ import sys
3
5
 
6
+ from packaging.version import parse
4
7
  from setuptools import find_packages, setup
5
8
 
9
+ with open("python_versions.json", "r") as f:
10
+ supported_python_versions = json.load(f)
11
+
12
+ python_versions = [parse(v) for v in supported_python_versions]
13
+ min_version = min(python_versions)
14
+ max_version = max(python_versions)
15
+ if not (
16
+ min_version <= parse(".".join([str(v) for v in sys.version_info[:2]])) <= max_version
17
+ ):
18
+ py_version = ".".join([str(v) for v in sys.version_info[:3]])
19
+ # NOTE: Python 3.5 does not support f-strings
20
+ error = (
21
+ "\n--------------------------------------------\n"
22
+ "Error: Vivarium Public Health runs under python {min_version}-{max_version}.\n"
23
+ "You are running python {py_version}.\n".format(
24
+ min_version=min_version.base_version,
25
+ max_version=max_version.base_version,
26
+ py_version=py_version,
27
+ )
28
+ + "--------------------------------------------\n"
29
+ )
30
+ print(error, file=sys.stderr)
31
+ sys.exit(1)
32
+
6
33
  if __name__ == "__main__":
7
34
  base_dir = os.path.dirname(__file__)
8
35
  src_dir = os.path.join(base_dir, "src")
@@ -48,7 +75,7 @@ if __name__ == "__main__":
48
75
 
49
76
  lint_requirements = [
50
77
  "black==22.3.0",
51
- "isort",
78
+ "isort==5.13.2",
52
79
  ]
53
80
 
54
81
  setup(
@@ -0,0 +1 @@
1
+ __version__ = "3.2.1"
@@ -114,7 +114,7 @@ class RiskEffect(Component):
114
114
  self.exposure = self.get_risk_exposure(builder)
115
115
 
116
116
  self._relative_risk_source = self.get_relative_risk_source(builder)
117
- self.relative_risk = self.get_relative_risk(builder)
117
+ self.relative_risk = self.get_relative_risk_pipeline(builder)
118
118
 
119
119
  self.register_target_modifier(builder)
120
120
  self.register_paf_modifier(builder)
@@ -297,7 +297,7 @@ class RiskEffect(Component):
297
297
 
298
298
  return generate_relative_risk
299
299
 
300
- def get_relative_risk(self, builder: Builder) -> Pipeline:
300
+ def get_relative_risk_pipeline(self, builder: Builder) -> Pipeline:
301
301
  return builder.value.register_value_producer(
302
302
  f"{self.risk.name}_on_{self.target.name}.relative_risk",
303
303
  self._relative_risk_source,
@@ -361,18 +361,11 @@ class LBWSGRiskEffect(RiskEffect):
361
361
  paf_data = builder.data.load(paf_key)
362
362
  return paf_data, builder.data.value_columns()(paf_key)
363
363
 
364
- def get_target_modifier(
365
- self, builder: Builder
366
- ) -> Callable[[pd.Index, pd.Series], pd.Series]:
367
- def adjust_target(index: pd.Index, target: pd.Series) -> pd.Series:
368
- return target * self.relative_risk(index)
369
-
370
- return adjust_target
371
-
372
364
  def register_target_modifier(self, builder: Builder) -> None:
373
365
  builder.value.register_value_modifier(
374
366
  self.target_pipeline_name,
375
- modifier=self.target_modifier,
367
+ modifier=self.adjust_target,
368
+ component=self,
376
369
  requires_values=[self.relative_risk_pipeline_name],
377
370
  )
378
371
 
@@ -392,11 +385,12 @@ class LBWSGRiskEffect(RiskEffect):
392
385
  for age_start in exposed_age_group_starts
393
386
  }
394
387
 
395
- def get_relative_risk(self, builder: Builder) -> Pipeline:
388
+ def get_relative_risk_pipeline(self, builder: Builder) -> Pipeline:
396
389
  return builder.value.register_value_producer(
397
390
  self.relative_risk_pipeline_name,
398
- source=self.get_relative_risk_source,
399
- requires_columns=["age"] + self.rr_column_names,
391
+ source=self._relative_risk_source,
392
+ component=self,
393
+ required_resources=["age"] + self.rr_column_names,
400
394
  )
401
395
 
402
396
  def get_interpolator(self, builder: Builder) -> pd.Series:
@@ -469,7 +463,7 @@ class LBWSGRiskEffect(RiskEffect):
469
463
  # Pipeline sources and modifiers #
470
464
  ##################################
471
465
 
472
- def get_relative_risk_source(self, index: pd.Index) -> pd.Series:
466
+ def _get_relative_risk(self, index: pd.Index) -> pd.Series:
473
467
  pop = self.population_view.get(index)
474
468
  relative_risk = pd.Series(1.0, index=index, name=self.relative_risk_pipeline_name)
475
469
 
@@ -479,3 +473,6 @@ class LBWSGRiskEffect(RiskEffect):
479
473
  age_group_mask, self.relative_risk_column_name(age_group)
480
474
  ]
481
475
  return relative_risk
476
+
477
+ def get_relative_risk_source(self, builder: Builder) -> Callable[[pd.Index], pd.Series]:
478
+ return self._get_relative_risk
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: vivarium_public_health
3
- Version: 3.1.5
3
+ Version: 3.2.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
@@ -63,7 +63,7 @@ Requires-Dist: pytest-mock; extra == "dev"
63
63
  Requires-Dist: hypothesis; extra == "dev"
64
64
  Requires-Dist: pyyaml; extra == "dev"
65
65
  Requires-Dist: black==22.3.0; extra == "dev"
66
- Requires-Dist: isort; extra == "dev"
66
+ Requires-Dist: isort==5.13.2; extra == "dev"
67
67
  Dynamic: author
68
68
  Dynamic: author-email
69
69
  Dynamic: classifier
@@ -14,6 +14,7 @@ MANIFEST.in
14
14
  Makefile
15
15
  README.rst
16
16
  pyproject.toml
17
+ python_versions.json
17
18
  setup.py
18
19
  tox.ini
19
20
  .github/CODEOWNERS
@@ -124,6 +125,7 @@ tests/__init__.py
124
125
  tests/conftest.py
125
126
  tests/mock_artifact.py
126
127
  tests/test_utilities.py
128
+ tests/data/rr_interpolator.csv
127
129
  tests/disease/__init__.py
128
130
  tests/disease/test_disease.py
129
131
  tests/disease/test_special_disease.py
@@ -22,7 +22,7 @@ pytest-mock
22
22
  hypothesis
23
23
  pyyaml
24
24
  black==22.3.0
25
- isort
25
+ isort==5.13.2
26
26
 
27
27
  [docs]
28
28
  sphinx<7.0