vivarium-public-health 3.0.3__tar.gz → 3.0.4__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.github/workflows/build.yml +3 -2
  2. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.gitignore +3 -0
  3. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/CHANGELOG.rst +7 -2
  4. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/Jenkinsfile +14 -12
  5. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/Makefile +15 -4
  6. {vivarium_public_health-3.0.3/src/vivarium_public_health.egg-info → vivarium_public_health-3.0.4}/PKG-INFO +1 -1
  7. vivarium_public_health-3.0.4/docs/source/api_reference/results/simple_cause.rst +1 -0
  8. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/tutorials/risk_exposure.rst +21 -7
  9. vivarium_public_health-3.0.4/src/vivarium_public_health/_version.py +1 -0
  10. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/disease/state.py +24 -19
  11. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/mslt/delay.py +13 -5
  12. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/mslt/disease.py +35 -14
  13. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/mslt/intervention.py +12 -9
  14. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/mslt/observer.py +56 -17
  15. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/mslt/population.py +7 -10
  16. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/plugins/parser.py +29 -80
  17. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/population/add_new_birth_cohorts.py +8 -9
  18. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/population/base_population.py +0 -5
  19. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/population/data_transformations.py +1 -8
  20. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/population/mortality.py +3 -3
  21. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/columns.py +1 -1
  22. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/disability.py +85 -11
  23. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/disease.py +125 -2
  24. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/mortality.py +78 -2
  25. vivarium_public_health-3.0.4/src/vivarium_public_health/results/observer.py +213 -0
  26. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/risk.py +66 -5
  27. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/simple_cause.py +8 -2
  28. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/stratification.py +39 -14
  29. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/risks/base_risk.py +14 -16
  30. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/risks/data_transformations.py +3 -1
  31. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/risks/distributions.py +0 -1
  32. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/risks/effect.py +31 -29
  33. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/risks/implementations/low_birth_weight_and_short_gestation.py +51 -30
  34. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/treatment/scale_up.py +6 -10
  35. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/treatment/therapeutic_inertia.py +3 -1
  36. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4/src/vivarium_public_health.egg-info}/PKG-INFO +1 -1
  37. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health.egg-info/SOURCES.txt +1 -0
  38. vivarium_public_health-3.0.3/src/vivarium_public_health/_version.py +0 -1
  39. vivarium_public_health-3.0.3/src/vivarium_public_health/results/observer.py +0 -78
  40. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.bandit +0 -0
  41. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.flake8 +0 -0
  42. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.gitattributes +0 -0
  43. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.github/CODEOWNERS +0 -0
  44. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.github/pull_request_template.md +0 -0
  45. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.github/workflows/deploy.yml +0 -0
  46. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.pylintrc +0 -0
  47. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.readthedocs.yml +0 -0
  48. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/.zenodo.json +0 -0
  49. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/CODE_OF_CONDUCT.rst +0 -0
  50. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/CONTRIBUTING.rst +0 -0
  51. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/LICENSE.txt +0 -0
  52. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/MANIFEST.in +0 -0
  53. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/README.rst +0 -0
  54. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/Makefile +0 -0
  55. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/nitpick-exceptions +0 -0
  56. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/_static/style.css +0 -0
  57. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/_templates/layout.html +0 -0
  58. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/disease/index.rst +0 -0
  59. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/disease/model.rst +0 -0
  60. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/disease/models.rst +0 -0
  61. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/disease/special_disease.rst +0 -0
  62. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/disease/state.rst +0 -0
  63. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/disease/transition.rst +0 -0
  64. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/index.rst +0 -0
  65. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/mslt/delay.rst +0 -0
  66. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/mslt/disease.rst +0 -0
  67. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/mslt/index.rst +0 -0
  68. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/mslt/intervention.rst +0 -0
  69. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/mslt/magic_wand_components.rst +0 -0
  70. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/mslt/observer.rst +0 -0
  71. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/mslt/population.rst +0 -0
  72. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/plugins/index.rst +0 -0
  73. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/plugins/parser.rst +0 -0
  74. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/population/add_new_birth_cohorts.rst +0 -0
  75. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/population/base_population.rst +0 -0
  76. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/population/data_transformations.rst +0 -0
  77. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/population/index.rst +0 -0
  78. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/population/mortality.rst +0 -0
  79. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/results/disability.rst +0 -0
  80. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/results/disease.rst +0 -0
  81. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/results/index.rst +0 -0
  82. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/results/mortality.rst +0 -0
  83. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/results/observer.rst +0 -0
  84. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/results/risk.rst +0 -0
  85. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/results/stratification.rst +0 -0
  86. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/risks/base_risk.rst +0 -0
  87. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/risks/data_transformations.rst +0 -0
  88. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/risks/distributions.rst +0 -0
  89. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/risks/effect.rst +0 -0
  90. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/risks/implementations/index.rst +0 -0
  91. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/risks/implementations/low_birth_weight_and_short_gestation.rst +0 -0
  92. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/risks/index.rst +0 -0
  93. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/treatment/index.rst +0 -0
  94. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/treatment/magic_wand.rst +0 -0
  95. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/treatment/scale_up.rst +0 -0
  96. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/treatment/therapeutic_inertia.rst +0 -0
  97. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/api_reference/utilities.rst +0 -0
  98. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/conf.py +0 -0
  99. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/index.rst +0 -0
  100. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/docs/source/tutorials/index.rst +0 -0
  101. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/pyproject.toml +0 -0
  102. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/setup.cfg +0 -0
  103. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/setup.py +0 -0
  104. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/__about__.py +0 -0
  105. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/__init__.py +0 -0
  106. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/disease/__init__.py +0 -0
  107. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/disease/model.py +0 -0
  108. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/disease/models.py +0 -0
  109. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/disease/special_disease.py +0 -0
  110. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/disease/transition.py +0 -0
  111. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/mslt/__init__.py +0 -0
  112. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/mslt/magic_wand_components.py +0 -0
  113. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/plugins/__init__.py +0 -0
  114. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/population/__init__.py +0 -0
  115. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/results/__init__.py +0 -0
  116. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/risks/__init__.py +0 -0
  117. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/risks/implementations/__init__.py +0 -0
  118. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/treatment/__init__.py +0 -0
  119. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/treatment/magic_wand.py +0 -0
  120. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health/utilities.py +0 -0
  121. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health.egg-info/dependency_links.txt +0 -0
  122. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health.egg-info/not-zip-safe +0 -0
  123. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health.egg-info/requires.txt +0 -0
  124. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/src/vivarium_public_health.egg-info/top_level.txt +0 -0
  125. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/__init__.py +0 -0
  126. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/conftest.py +0 -0
  127. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/disease/__init__.py +0 -0
  128. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/disease/test_disease.py +0 -0
  129. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/disease/test_special_disease.py +0 -0
  130. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/mock_artifact.py +0 -0
  131. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/plugins/__init__.py +0 -0
  132. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/plugins/test_parser.py +0 -0
  133. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/population/__init__.py +0 -0
  134. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/population/conftest.py +0 -0
  135. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/population/test_add_new_birth_cohort.py +0 -0
  136. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/population/test_base_population.py +0 -0
  137. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/population/test_data_transformations.py +0 -0
  138. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/population/test_mortality.py +0 -0
  139. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/results/__init__.py +0 -0
  140. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/results/test_categorical_risk_observer.py +0 -0
  141. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/results/test_disability.py +0 -0
  142. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/results/test_disability_observer.py +0 -0
  143. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/results/test_disease_observer.py +0 -0
  144. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/results/test_mortality_observer.py +0 -0
  145. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/results/test_stratification.py +0 -0
  146. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/risks/__init__.py +0 -0
  147. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/risks/conftest.py +0 -0
  148. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/risks/test_base_risk.py +0 -0
  149. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/risks/test_data_transformations.py +0 -0
  150. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/risks/test_distributions.py +0 -0
  151. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/risks/test_effect.py +0 -0
  152. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/risks/test_low_birth_weight_and_short_gestation.py +0 -0
  153. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/test_utilities.py +0 -0
  154. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/tests/treatment/__init__.py +0 -0
  155. {vivarium_public_health-3.0.3 → vivarium_public_health-3.0.4}/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
@@ -112,3 +112,6 @@ src/vivarium_public_health/_version.py
112
112
 
113
113
  # FuzzyChecker diagnostics csv
114
114
  tests/proportion_test_diagnostics.csv
115
+
116
+ # macOS
117
+ *.DS_Store
@@ -1,10 +1,15 @@
1
- **3.0.3- 08/20/24**
1
+ **3.0.4 - 08/28/24**
2
+
3
+ - Strengthen results docstrings and clean up others throughout
4
+ - Add mention of NonLogLinearRiskEffect class to risk exposure tutorial
5
+
6
+ **3.0.3 - 08/20/24**
2
7
 
3
8
  - Use external script to find matching dependency branches
4
9
  - Fix bug when excluding all but one causes of disability from results
5
10
  - Update FertilityAgeSpecificRates for new data format of age specific fertility rates
6
11
 
7
- **3.0.2- 08/19/24**
12
+ **3.0.2 - 08/19/24**
8
13
 
9
14
  - Parameterize the script to find matching dependency branches
10
15
 
@@ -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 \"ARGS=${GIT_BRANCH}\""
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
- slackSend channel: "#${params.SLACK_TO}",
208
- message: ":x: JOB FAILURE: $JOB_NAME - $BUILD_ID\n\n${BUILD_URL}console\n\n<!channel>",
209
- teamDomain: "ihme",
210
- tokenCredentialId: "slack"
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
- @echo "Checking if the vivarium repository has the branch $(GIT_BRANCH)..."
61
- @$(eval BRANCH_EXISTS=$(shell curl -s https://api.github.com/repos/ihmeuw/vivarium/branches | grep -q '"name": "$(GIT_BRANCH)"' && echo "yes" || echo "no"))
62
- @if [ "$(BRANCH_EXISTS)" = "yes" ]; then \
63
- pip install git+https://github.com/ihmeuw/vivarium@${GIT_BRANCH}; \
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
3
+ Version: 3.0.4
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 two components for modeling the impact
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` and
20
- :class:`~vivarium_public_health.risks.effect.RiskEffect` components
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 two components.
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` component.
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.4"
@@ -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 : pandas.Timestamp
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
- map from transition type to the function to pull that transition's data
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
- map from transition type to the function to pull that transition's data
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 : `engine.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 : `pandas.DataFrame`
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
- Parameters
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
- Parameters
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
- Interventions that modify an acute disease incidence rate.
135
- Note that this intervention will simply modify both the disability rate
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
  ##############