hpvsim 2.2.0__tar.gz → 2.2.4__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 (168) hide show
  1. hpvsim-2.2.4/.github/workflows/pypi_release.yaml +37 -0
  2. {hpvsim-2.2.0 → hpvsim-2.2.4}/CHANGELOG.rst +26 -1
  3. {hpvsim-2.2.0/hpvsim.egg-info → hpvsim-2.2.4}/PKG-INFO +4 -1
  4. {hpvsim-2.2.0 → hpvsim-2.2.4}/README.rst +3 -0
  5. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/analysis.py +4 -2
  6. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/calibration.py +2 -1
  7. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/loaders.py +2 -0
  8. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/hiv.py +10 -10
  9. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/immunity.py +1 -1
  10. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/interventions.py +9 -11
  11. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/people.py +1 -0
  12. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/sim.py +2 -2
  13. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/version.py +2 -2
  14. {hpvsim-2.2.0 → hpvsim-2.2.4/hpvsim.egg-info}/PKG-INFO +4 -1
  15. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim.egg-info/SOURCES.txt +1 -0
  16. hpvsim-2.2.4/tests/baseline.json +60 -0
  17. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/benchmark.json +3 -3
  18. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_sim.py +0 -1
  19. hpvsim-2.2.0/tests/baseline.json +0 -60
  20. {hpvsim-2.2.0 → hpvsim-2.2.4}/.github/workflows/tests.yaml +0 -0
  21. {hpvsim-2.2.0 → hpvsim-2.2.4}/.gitignore +0 -0
  22. {hpvsim-2.2.0 → hpvsim-2.2.4}/.readthedocs.yaml +0 -0
  23. {hpvsim-2.2.0 → hpvsim-2.2.4}/CODE_OF_CONDUCT.rst +0 -0
  24. {hpvsim-2.2.0 → hpvsim-2.2.4}/LICENSE +0 -0
  25. {hpvsim-2.2.0 → hpvsim-2.2.4}/MANIFEST.in +0 -0
  26. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/Makefile +0 -0
  27. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/README.md +0 -0
  28. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_static/theme_overrides.css +0 -0
  29. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_templates/custom-class-template.rst +0 -0
  30. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_templates/custom-function-template.rst +0 -0
  31. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_templates/custom-module-template.rst +0 -0
  32. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_templates/footer_end.html +0 -0
  33. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_templates/footer_start.html +0 -0
  34. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_templates/navbar-side.html +0 -0
  35. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/_templates/page.html +0 -0
  36. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/api/index.rst +0 -0
  37. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/build_docs +0 -0
  38. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/conf.py +0 -0
  39. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/images/favicon.ico +0 -0
  40. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/images/idm-logo-transparent.png +0 -0
  41. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/index.html +0 -0
  42. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/index.rst +0 -0
  43. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/overview.rst +0 -0
  44. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/requirements.txt +0 -0
  45. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/robots.txt +0 -0
  46. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/README.rst +0 -0
  47. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/clean_outputs +0 -0
  48. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/example_cancer_cases.csv +0 -0
  49. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/nigeria_cancer_cases.csv +0 -0
  50. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/nigeria_cancer_types.csv +0 -0
  51. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/south_africa_age_pyramid.csv +0 -0
  52. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/tut_analyzers.ipynb +0 -0
  53. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/tut_calibration.ipynb +0 -0
  54. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/tut_interventions.ipynb +0 -0
  55. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/tut_intro.ipynb +0 -0
  56. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/tut_people.ipynb +0 -0
  57. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/tut_plotting.ipynb +0 -0
  58. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials/tut_running.ipynb +0 -0
  59. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/tutorials.rst +0 -0
  60. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/variables.txt +0 -0
  61. {hpvsim-2.2.0 → hpvsim-2.2.4}/docs/whats-new.rst +0 -0
  62. {hpvsim-2.2.0 → hpvsim-2.2.4}/examples/t05_screen_algorithms.py +0 -0
  63. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/__init__.py +0 -0
  64. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/base.py +0 -0
  65. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/__init__.py +0 -0
  66. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/downloaders.py +0 -0
  67. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/products_dx.csv +0 -0
  68. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/products_tx.csv +0 -0
  69. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/products_txvx.csv +0 -0
  70. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/products_vx.csv +0 -0
  71. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/test_downloaders.py +0 -0
  72. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/data/test_loaders.py +0 -0
  73. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/defaults.py +0 -0
  74. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/misc.py +0 -0
  75. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/parameters.py +0 -0
  76. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/plotting.py +0 -0
  77. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/population.py +0 -0
  78. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/regression/pars_v0.2.6.json +0 -0
  79. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/regression/pars_v0.2.9.json +0 -0
  80. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/regression/pars_v0.3.0.json +0 -0
  81. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/regression/pars_v0.3.1.json +0 -0
  82. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/run.py +0 -0
  83. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/settings.py +0 -0
  84. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim/utils.py +0 -0
  85. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim.egg-info/dependency_links.txt +0 -0
  86. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim.egg-info/requires.txt +0 -0
  87. {hpvsim-2.2.0 → hpvsim-2.2.4}/hpvsim.egg-info/top_level.txt +0 -0
  88. {hpvsim-2.2.0 → hpvsim-2.2.4}/pyproject.toml +0 -0
  89. {hpvsim-2.2.0 → hpvsim-2.2.4}/setup.cfg +0 -0
  90. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/.coveragerc +0 -0
  91. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/README.rst +0 -0
  92. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/benchmark_profile.py +0 -0
  93. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/check_coverage +0 -0
  94. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/check_hiv_data.py +0 -0
  95. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/hpv_test_pars.csv +0 -0
  96. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/multiscale_concept1.py +0 -0
  97. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/multiscale_concept2.py +0 -0
  98. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/multiscale_concept3.py +0 -0
  99. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/multiscale_test.df +0 -0
  100. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/mysql_hpvsim_test.py +0 -0
  101. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/mysql_test.py +0 -0
  102. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/network_dx.py +0 -0
  103. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/plot_nathx.py +0 -0
  104. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/setup_mysql +0 -0
  105. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_cancer_dysp.py +0 -0
  106. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_dt.py +0 -0
  107. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_hiv.py +0 -0
  108. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_latency.py +0 -0
  109. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_logistic.py +0 -0
  110. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_merge_scens.py +0 -0
  111. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_multiscale.py +0 -0
  112. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_multiscale_pars.py +0 -0
  113. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_networks.py +0 -0
  114. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_new_progs.py +0 -0
  115. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_parameter_exploration.py +0 -0
  116. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_popgrowth.py +0 -0
  117. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_popscale.py +0 -0
  118. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_sampler.py +0 -0
  119. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/test_txvx.py +0 -0
  120. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/devtests/tut_parameter_exploration.ipynb +0 -0
  121. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/hpvsim_v1.2.2.yml +0 -0
  122. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/pytest.ini +0 -0
  123. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/requirements.txt +0 -0
  124. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/run_tests +0 -0
  125. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/simple.py +0 -0
  126. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_analysis.py +0 -0
  127. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_baselines.py +0 -0
  128. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_calibration.py +0 -0
  129. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/RSA_data.csv +0 -0
  130. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/art_coverage_south_africa.csv +0 -0
  131. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/australia_age_pyramid.csv +0 -0
  132. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/hiv_incidence_south_africa.csv +0 -0
  133. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/india_cancer_cases.csv +0 -0
  134. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/india_cancer_deaths.csv +0 -0
  135. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/india_cancer_types.csv +0 -0
  136. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/india_cin_types.csv +0 -0
  137. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/india_data.csv +0 -0
  138. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/india_hpv_data.csv +0 -0
  139. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/india_hpv_prevalence.csv +0 -0
  140. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/kenya_age_pyramid.csv +0 -0
  141. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/kenya_cancer_incidence.csv +0 -0
  142. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/kenya_cancer_mortality.csv +0 -0
  143. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/kenya_data.csv +0 -0
  144. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/param_space.csv +0 -0
  145. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/param_space_filled.csv +0 -0
  146. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_age_pyramid.csv +0 -0
  147. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_art_coverage_by_age_females.csv +0 -0
  148. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_art_coverage_by_age_males.csv +0 -0
  149. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_cancer_data_2020.csv +0 -0
  150. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_cancer_data_hiv_2020.csv +0 -0
  151. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_cancer_incidence_by_age_no_hiv.csv +0 -0
  152. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_cancer_incidence_by_age_with_hiv.csv +0 -0
  153. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_female_hiv_mortality.csv +0 -0
  154. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_hpv_data.csv +0 -0
  155. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_male_hiv_mortality.csv +0 -0
  156. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_target_data.csv +0 -0
  157. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_type_distribution_cancer.csv +0 -0
  158. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/south_africa_type_distribution_high_grade_lesion.csv +0 -0
  159. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/tanzania_age_pyramid.csv +0 -0
  160. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/tanzania_data.csv +0 -0
  161. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/test_tx_assigner.csv +0 -0
  162. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/test_via.csv +0 -0
  163. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data/test_via_triage.csv +0 -0
  164. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_data.py +0 -0
  165. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_event_schedule.py +0 -0
  166. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_interventions.py +0 -0
  167. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/test_run.py +0 -0
  168. {hpvsim-2.2.0 → hpvsim-2.2.4}/tests/update_baseline +0 -0
@@ -0,0 +1,37 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ name: Build and publish
11
+ runs-on: ubuntu-latest
12
+
13
+ permissions:
14
+ id-token: write
15
+ contents: read
16
+
17
+ environment:
18
+ name: pypi
19
+ url: https://pypi.org/project/hpvsim/
20
+
21
+ steps:
22
+ - name: Check out repository
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: '3.x'
29
+
30
+ - name: Install build backend
31
+ run: python -m pip install build
32
+
33
+ - name: Build sdist and wheel
34
+ run: python -m build
35
+
36
+ - name: Publish
37
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -8,11 +8,36 @@ All notable changes to the codebase are documented in this file. Changes that ma
8
8
  :local:
9
9
  :depth: 1
10
10
 
11
+
12
+ Version 2.2.4 (2025-08-20)
13
+ ---------------------------
14
+ - Fixes a bug in analyzer results for cancer by age and HIV status
15
+ - *Github info* PR `687 <https://github.com/starsimhub/hpvsim_orig/pull/687>`__
16
+
17
+
18
+ Version 2.2.3 (2025-06-27)
19
+ ---------------------------
20
+ - Small bugfixes and changes to HIV module parameterization
21
+ - *Github info* PR `685 <https://github.com/starsimhub/hpvsim_orig/pull/685>`__
22
+
23
+
24
+ Version 2.2.2 (2025-06-20)
25
+ ---------------------------
26
+ - Bugfix to allow running simulations beyond 2100
27
+ - *Github info* PR `681 <https://github.com/starsimhub/hpvsim_orig/pull/681>`__
28
+
29
+
30
+ Version 2.2.1 (2025-05-29)
31
+ ---------------------------
32
+ - Bugfix for running calibrations to prevent interventions being reinitialized
33
+ - *Github info* PR `678 <https://github.com/starsimhub/hpvsim_orig/pull/678>`__
34
+
35
+
11
36
  Version 2.2.0 (2025-05-23)
12
37
  ---------------------------
13
38
  - Refresh results: ensure all main results are populated, remove cancer detection results, and fix bug with HPV prevalence calculations
14
39
  - Updates to docs
15
- - *Github info* PR `653 <https://github.com/starsimhub/hpvsim_orig/pull/673>`__
40
+ - *Github info* PR `673 <https://github.com/starsimhub/hpvsim_orig/pull/673>`__
16
41
 
17
42
 
18
43
  Version 2.1.0 (2025-03-25)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hpvsim
3
- Version: 2.2.0
3
+ Version: 2.2.4
4
4
  Summary: HPVsim: Human Papillomavirus Simulator
5
5
  Author: Robyn Stuart, Jamie Cohen, Cliff Kerr, Romesh Abeysuriya, Mariah Boudreau, Daniel Klein, Hao Hu
6
6
  Maintainer-email: HPVsim Team <info@hpvsim.org>
@@ -31,6 +31,9 @@ Dynamic: license-file
31
31
  Human papillomavirus simulator (HPVsim)
32
32
  =======================================
33
33
 
34
+ .. image:: https://badgen.net/pypi/v/hpvsim/?color=blue
35
+ :target: https://pypi.org/project/hpvsim
36
+
34
37
  .. image:: https://github.com/institutefordiseasemodeling/hpvsim/actions/workflows/tests.yaml/badge.svg
35
38
  :target: https://github.com/institutefordiseasemodeling/hpvsim/actions/workflows/tests.yaml
36
39
  :alt: pipeline status
@@ -1,6 +1,9 @@
1
1
  Human papillomavirus simulator (HPVsim)
2
2
  =======================================
3
3
 
4
+ .. image:: https://badgen.net/pypi/v/hpvsim/?color=blue
5
+ :target: https://pypi.org/project/hpvsim
6
+
4
7
  .. image:: https://github.com/institutefordiseasemodeling/hpvsim/actions/workflows/tests.yaml/badge.svg
5
8
  :target: https://github.com/institutefordiseasemodeling/hpvsim/actions/workflows/tests.yaml
6
9
  :alt: pipeline status
@@ -785,9 +785,9 @@ class age_results(Analyzer):
785
785
  if rdict.result_type == 'flow':
786
786
  if not rdict.by_genotype: # Results across all genotypes
787
787
  if rdict.by_hiv:
788
- if rdict.hiv_attr:
788
+ if rdict.hiv_attr == 'with':
789
789
  inds = ((ppl[rdict.date_attr] == sim.t) * (ppl[rdict.attr]) * (ppl['hiv'])).nonzero()[-1]
790
- else:
790
+ elif rdict.hiv_attr == 'no':
791
791
  inds = ((ppl[rdict.date_attr] == sim.t) * (ppl[rdict.attr]) * (~ppl['hiv'])).nonzero()[-1]
792
792
  else:
793
793
  inds = ((ppl[rdict.date_attr] == sim.t) * (ppl[rdict.attr])).nonzero()[-1]
@@ -1111,6 +1111,7 @@ class age_causal_infection(Analyzer):
1111
1111
  if self.start_year is None:
1112
1112
  self.start_year = sim['start']
1113
1113
  self.age_causal = []
1114
+ self.age_cin = []
1114
1115
  self.age_cancer = []
1115
1116
  self.dwelltime = dict()
1116
1117
  for state in ['precin', 'cin', 'total']:
@@ -1127,6 +1128,7 @@ class age_causal_infection(Analyzer):
1127
1128
  cin_time = (sim.t - date_cin) * sim['dt']
1128
1129
  total_time = (sim.t - date_exposed) * sim['dt']
1129
1130
  self.age_causal += (current_age - total_time).tolist()
1131
+ self.age_cin += (current_age - cin_time).tolist()
1130
1132
  self.age_cancer += current_age.tolist()
1131
1133
  self.dwelltime['precin'] += hpv_time.tolist()
1132
1134
  self.dwelltime['cin'] += cin_time.tolist()
@@ -133,7 +133,7 @@ class Calibration(sc.prettyobj):
133
133
  self.sim['analyzers'] += [ar]
134
134
  if hiv_pars is not None:
135
135
  self.sim['model_hiv'] = True # if calibrating HIV parameters, make sure model is running HIV
136
- self.sim.initialize()
136
+ self.sim.initialize(init_intvs=False)
137
137
  if self.sim['model_hiv']:
138
138
  self.sim.results = sc.mergedicts(self.sim.results, self.sim.hivsim.results)
139
139
  for rkey in sim_results.keys():
@@ -715,6 +715,7 @@ class Calibration(sc.prettyobj):
715
715
  # Set title and labels
716
716
  ax.set_xlabel('Age group')
717
717
  ax.set_title(f'{self.result_args[resname].name}, {date}')
718
+ sc.setylim(data=[ydata, modeldf['values']], ax=ax)
718
719
  ax.legend()
719
720
  ax.set_xticks(x, age_labels[resname], rotation=45)
720
721
  plot_count += 1
@@ -314,6 +314,8 @@ def get_birth_rates(location=None):
314
314
  raise ValueError(errormsg) from E
315
315
 
316
316
  raw_df = map_entries(birth_rate_data, location)
317
+ raw_df = raw_df.dropna()
317
318
  df = sc.dataframe(raw_df).reset_index().rename(columns={'Time':'year', 'CBR':'cbr'})
319
+
318
320
  return df
319
321
 
@@ -45,15 +45,11 @@ class HIVsim(hpb.ParsObj):
45
45
  "rel_reactivation_prob": 3, # Unused for now
46
46
  "model_hiv_death": True, # whether or not to model HIV mortality. Typically only set to False for testing purposes
47
47
  "time_to_hiv_death_shape": 2, # shape parameter for weibull distribution, based on https://royalsocietypublishing.org/action/downloadSupplement?doi=10.1098%2Frsif.2013.0613&file=rsif20130613supp1.pdf
48
- "time_to_hiv_death_scale": lambda a: 21.182
49
- - 0.2717
50
- * a, # scale parameter for weibull distribution, based on https://royalsocietypublishing.org/action/downloadSupplement?doi=10.1098%2Frsif.2013.0613&file=rsif20130613supp1.pdf
48
+ "time_to_hiv_death_scale_pars": dict(m=21.182, b=-0.2717), # scale parameter for weibull distribution, based on https://royalsocietypublishing.org/action/downloadSupplement?doi=10.1098%2Frsif.2013.0613&file=rsif20130613supp1.pdf
51
49
  "hiv_death_adj": 1,
52
50
  "cd4_start": dict(dist="normal", par1=594, par2=20),
53
- "cd4_trajectory": lambda f: (24.363 - 16.672 * f)
54
- ** 2, # based on https://docs.idmod.org/projects/emod-hiv/en/latest/hiv-model-healthcare-systems.html?highlight=art#art-s-impact-on-cd4-count
55
- "cd4_reconstitution": lambda m: 15.584 * m
56
- - 0.2113 * m**2, # growth in CD4 count following ART initiation
51
+ "cd4_pars": dict(m=24.363, b=-16.672), # based on https://docs.idmod.org/projects/emod-hiv/en/latest/hiv-model-healthcare-systems.html?highlight=art#art-s-impact-on-cd4-count
52
+ "cd4_reconstitution_pars": dict(b1=15.584, b2=-0.2113), # growth in CD4 count following ART initiation
57
53
  "art_failure_prob": 0.0, # Percentage of people on ART who will fail treatment
58
54
  "dt_art": 1.0, # Timestep for art updates (in years)
59
55
  }
@@ -63,7 +59,9 @@ class HIVsim(hpb.ParsObj):
63
59
  self.init_results(sim)
64
60
 
65
61
  y = np.linspace(0, 1, 101)
66
- cd4_decline = self["hiv_pars"]["cd4_trajectory"](y)
62
+ # Calculate the CD4 trajectory based on the parameters
63
+ m, b = self["hiv_pars"]["cd4_pars"]["m"], self["hiv_pars"]["cd4_pars"]["b"]
64
+ cd4_decline = m + b* y # CD4 decline trajectory
67
65
  self.cd4_decline_diff = np.diff(cd4_decline)
68
66
  sim.pars["hiv_pars"]["mortality_rates"] = self.pars["mortality_rates"]
69
67
  return
@@ -235,7 +233,8 @@ class HIVsim(hpb.ParsObj):
235
233
  shape = self["hiv_pars"]["time_to_hiv_death_shape"]
236
234
  dt = people.pars["dt"]
237
235
  if self["hiv_pars"]["model_hiv_death"]:
238
- scale = self["hiv_pars"]["time_to_hiv_death_scale"](people.age[inds])
236
+ m, b = self["hiv_pars"]["time_to_hiv_death_scale_pars"]["m"], self["hiv_pars"]["time_to_hiv_death_scale_pars"]["b"]
237
+ scale = m + b*people.age[inds]
239
238
  adjust = self["hiv_pars"]["hiv_death_adj"]
240
239
  scale = np.maximum(scale, 0)
241
240
  time_to_hiv_death = adjust * weibull_min.rvs(
@@ -300,7 +299,8 @@ class HIVsim(hpb.ParsObj):
300
299
  # Now take care of people successfully on ART (CD4 reconstitutes)
301
300
  mpy = 12
302
301
  months_on_ART = (people.t - people.date_art[art_success_inds]) * mpy
303
- cd4_change = self["hiv_pars"]["cd4_reconstitution"](months_on_ART)
302
+ b1, b2 = self["hiv_pars"]["cd4_reconstitution_pars"]["b1"], self["hiv_pars"]["cd4_reconstitution_pars"]["b2"]
303
+ cd4_change = b1*months_on_ART + b2*months_on_ART**2
304
304
  cd4_change[cd4_change < 0] = 0
305
305
  people.cd4[art_success_inds] += cd4_change
306
306
 
@@ -212,7 +212,7 @@ def check_immunity(people):
212
212
  Now suppose we have 3 people, whose immunity levels are
213
213
 
214
214
  people.nab_imm = np.array([[0.9, 0.0, 0.0],
215
- [0.0, 0.7, 0.0]])
215
+ [0.0, 0.7, 0.0]])
216
216
 
217
217
  This indicates that person 1 has a prior HPV16 infection, person 2 has a prior HPV18
218
218
  infection, and person 3 has no history of infection.
@@ -651,7 +651,6 @@ class BaseVaccination(Intervention):
651
651
  accept_inds = np.array([])
652
652
 
653
653
  if do_apply:
654
-
655
654
  # Select people for screening and then record the number of screens
656
655
  eligible_inds = self.check_eligibility(sim) # Check eligibility
657
656
  if len(self.timepoints)==0: # No timepoints provided
@@ -717,10 +716,10 @@ class campaign_vx(BaseVaccination, CampaignDelivery):
717
716
  '''
718
717
 
719
718
  def __init__(self, product=None, prob=None, age_range=None, sex=0, eligibility=None,
720
- years=None, interpolate=True, **kwargs):
719
+ years=None, interpolate=True, annual_prob=None, **kwargs):
721
720
 
722
721
  BaseVaccination.__init__(self, product=product, age_range=age_range, sex=sex, eligibility=eligibility, **kwargs)
723
- CampaignDelivery.__init__(self, prob=prob, years=years, interpolate=interpolate)
722
+ CampaignDelivery.__init__(self, prob=prob, annual_prob=annual_prob, years=years, interpolate=interpolate)
724
723
 
725
724
  def initialize(self, sim):
726
725
  CampaignDelivery.initialize(self, sim) # Initialize this first, as it ensures that prob is interpolated properly
@@ -873,9 +872,9 @@ class routine_screening(BaseScreening, RoutineDelivery):
873
872
  screen3 = hpv.routine_screening(product='hpv', prob=np.linspace(0.005,0.025,5), years=np.arange(2020,2025)) # Scale up screening over 5 years starting in 2020
874
873
  '''
875
874
  def __init__(self, product=None, prob=None, eligibility=None, age_range=None,
876
- years=None, start_year=None, end_year=None, **kwargs):
875
+ years=None, start_year=None, end_year=None, annual_prob=None, **kwargs):
877
876
  BaseScreening.__init__(self, product=product, age_range=age_range, eligibility=eligibility, **kwargs)
878
- RoutineDelivery.__init__(self, prob=prob, start_year=start_year, end_year=end_year, years=years)
877
+ RoutineDelivery.__init__(self, prob=prob, start_year=start_year, end_year=end_year, annual_prob=annual_prob, years=years)
879
878
 
880
879
  def initialize(self, sim):
881
880
  RoutineDelivery.initialize(self, sim) # Initialize this first, as it ensures that prob is interpolated properly
@@ -892,9 +891,9 @@ class campaign_screening(BaseScreening, CampaignDelivery):
892
891
  screen2 = hpv.campaign_screening(product='hpv', prob=0.02, years=[2025,2030]) # Screen 20% of the eligible population in 2025 and again in 2030
893
892
  '''
894
893
  def __init__(self, product=None, age_range=None, eligibility=None,
895
- prob=None, years=None, interpolate=None, **kwargs):
894
+ prob=None, years=None, interpolate=None, annual_prob=None, **kwargs):
896
895
  BaseScreening.__init__(self, product=product, age_range=age_range, eligibility=eligibility, **kwargs)
897
- CampaignDelivery.__init__(self, prob=prob, years=years, interpolate=interpolate)
896
+ CampaignDelivery.__init__(self, prob=prob, years=years, interpolate=interpolate, annual_prob=annual_prob)
898
897
 
899
898
  def initialize(self, sim):
900
899
  CampaignDelivery.initialize(self, sim) # Initialize this first, as it ensures that prob is interpolated properly
@@ -936,9 +935,9 @@ class campaign_triage(BaseTriage, CampaignDelivery):
936
935
  screened_pos = lambda sim: sim.get_intervention('screening').outcomes['positive']
937
936
  triage1 = hpv.campaign_triage(product='pos_screen_assessment', eligibility=screen_pos, prob=0.9, years=2030)
938
937
  '''
939
- def __init__(self, product=None, age_range=None, sex=None, eligibility=None,
938
+ def __init__(self, product=None, age_range=None, eligibility=None,
940
939
  prob=None, years=None, interpolate=None, annual_prob=None, **kwargs):
941
- BaseTriage.__init__(self, product=product, age_range=age_range, sex=sex, eligibility=eligibility, **kwargs)
940
+ BaseTriage.__init__(self, product=product, age_range=age_range, eligibility=eligibility, **kwargs)
942
941
  CampaignDelivery.__init__(self, prob=prob, years=years, interpolate=interpolate, annual_prob=annual_prob)
943
942
 
944
943
  def initialize(self, sim):
@@ -1386,13 +1385,12 @@ class tx(Product):
1386
1385
  people[f'date_{state}'][g, eff_treat_inds] = np.nan
1387
1386
  people[f'date_cancerous'][g, eff_treat_inds] = np.nan
1388
1387
  people['date_clearance'][g, eff_treat_inds] = people.t + 1
1389
- # Determine whether women also clear infection
1388
+ # # Determine whether women also clear infection
1390
1389
  # clearance_probs = np.full(len(eff_treat_inds), self.clearance, dtype=hpd.default_float)
1391
1390
  # to_clear = hpu.binomial_arr(clearance_probs) # Determine who will have effective treatment
1392
1391
  # clear_inds = eff_treat_inds[to_clear]
1393
1392
  # if len(clear_inds):
1394
1393
  # # If so, set date of clearance of infection on next timestep
1395
- #
1396
1394
  # people.dur_infection[g, clear_inds] = (people.t - people.date_infectious[g, clear_inds]) * people.pars['dt']
1397
1395
 
1398
1396
  tx_successful = np.array(list(set(tx_successful)))
@@ -761,6 +761,7 @@ class People(hpb.BasePeople):
761
761
  if new_births is None:
762
762
  years = self.pars['birth_rates']['year']
763
763
  rates = self.pars['birth_rates']['cbr']
764
+
764
765
  this_birth_rate = (
765
766
  self.pars['rel_birth']
766
767
  * np.interp(year, years, rates)
@@ -74,7 +74,7 @@ class Sim(hpb.BaseSim):
74
74
  return
75
75
 
76
76
 
77
- def initialize(self, reset=True, init_states=True, init_analyzers=True, **kwargs):
77
+ def initialize(self, reset=True, init_states=True, init_intvs=True, init_analyzers=True, **kwargs):
78
78
  '''
79
79
  Perform all initializations on the sim.
80
80
  '''
@@ -85,7 +85,7 @@ class Sim(hpb.BaseSim):
85
85
  hpu.set_seed(self['rand_seed']) # Reset the random seed before the population is created
86
86
  self.init_genotypes() # Initialize the genotypes
87
87
  self.init_results() # After initializing the genotypes and people, create the results structure
88
- self.init_interventions() # Initialize the interventions BEFORE the people, because then vaccination interventions get counted in immunity structures
88
+ if init_intvs: self.init_interventions() # Initialize the interventions BEFORE the people, because then vaccination interventions get counted in immunity structures
89
89
  self.init_immunity() # Includes immunity matrices and cumulative dysplasia arrays
90
90
  self.init_people(reset=reset, init_states=init_states, **kwargs) # Create all the people (the heaviest step)
91
91
  if init_analyzers: self.init_analyzers() # ...and the analyzers...
@@ -4,6 +4,6 @@ Version and license information.
4
4
 
5
5
  __all__ = ['__version__', '__versiondate__', '__license__']
6
6
 
7
- __version__ = '2.2.0'
8
- __versiondate__ = '2025-05-23'
7
+ __version__ = '2.2.4'
8
+ __versiondate__ = '2025-08-20'
9
9
  __license__ = f'HPVsim {__version__} ({__versiondate__}) — © 2023-2025 by IDM'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hpvsim
3
- Version: 2.2.0
3
+ Version: 2.2.4
4
4
  Summary: HPVsim: Human Papillomavirus Simulator
5
5
  Author: Robyn Stuart, Jamie Cohen, Cliff Kerr, Romesh Abeysuriya, Mariah Boudreau, Daniel Klein, Hao Hu
6
6
  Maintainer-email: HPVsim Team <info@hpvsim.org>
@@ -31,6 +31,9 @@ Dynamic: license-file
31
31
  Human papillomavirus simulator (HPVsim)
32
32
  =======================================
33
33
 
34
+ .. image:: https://badgen.net/pypi/v/hpvsim/?color=blue
35
+ :target: https://pypi.org/project/hpvsim
36
+
34
37
  .. image:: https://github.com/institutefordiseasemodeling/hpvsim/actions/workflows/tests.yaml/badge.svg
35
38
  :target: https://github.com/institutefordiseasemodeling/hpvsim/actions/workflows/tests.yaml
36
39
  :alt: pipeline status
@@ -6,6 +6,7 @@ LICENSE
6
6
  MANIFEST.in
7
7
  README.rst
8
8
  pyproject.toml
9
+ .github/workflows/pypi_release.yaml
9
10
  .github/workflows/tests.yaml
10
11
  docs/Makefile
11
12
  docs/README.md
@@ -0,0 +1,60 @@
1
+ {
2
+ "summary": {
3
+ "infections": 25928375.0,
4
+ "cins": 991155.375,
5
+ "cancers": 37402.08984375,
6
+ "cancer_deaths": 21194.517578125,
7
+ "reinfections": 19583733.0,
8
+ "reactivations": 0.0,
9
+ "n_susceptible": 586726464.0,
10
+ "n_infectious": 33513516.0,
11
+ "n_inactive": 250594.0,
12
+ "n_normal": 307198304.0,
13
+ "n_cin": 2878714.0,
14
+ "n_cancerous": 250594.0,
15
+ "n_infected": 33764108.0,
16
+ "n_abnormal": 3129308.0,
17
+ "n_latent": 0.0,
18
+ "n_precin": 12741644.0,
19
+ "n_screened": 2716638.25,
20
+ "n_cin_treated": 0.0,
21
+ "n_cancer_treated": 0.0,
22
+ "n_vaccinated": 1174425.5,
23
+ "n_tx_vaccinated": 11397662.0,
24
+ "hpv_incidence": 0.022095794710906374,
25
+ "cin_incidence": 0.006756010901715178,
26
+ "cancer_incidence": 25.045710785848303,
27
+ "births": 7966644.8931,
28
+ "other_deaths": 2701677.5,
29
+ "migration": -162075.7177,
30
+ "asr_cancer_incidence": 30.200933504294884,
31
+ "asr_cancer_mortality": 20.74842122892415,
32
+ "new_vaccinated": 87271.54296875,
33
+ "cum_vaccinated": 1246736.328125,
34
+ "new_doses": 87271.54296875,
35
+ "cum_doses": 1246736.328125,
36
+ "new_txvx_doses": 11784151.25,
37
+ "new_tx_vaccinated": 11408883.0,
38
+ "cum_txvx_doses": 11784151.25,
39
+ "cum_tx_vaccinated": 11408883.0,
40
+ "new_screens": 2777728.6875,
41
+ "new_screened": 2726612.4375,
42
+ "new_cin_treatments": 0.0,
43
+ "new_cin_treated": 0.0,
44
+ "new_cancer_treatments": 0.0,
45
+ "new_cancer_treated": 0.0,
46
+ "cum_screens": 2777728.6875,
47
+ "cum_screened": 2726612.4375,
48
+ "cum_cin_treatments": 0.0,
49
+ "cum_cin_treated": 0.0,
50
+ "cum_cancer_treatments": 0.0,
51
+ "cum_cancer_treated": 0.0,
52
+ "cancer_mortality": 14.168793323015917,
53
+ "n_alive": 307198304.0,
54
+ "cdr": 0.00879457166534357,
55
+ "cbr": 0.025933232017778328,
56
+ "hpv_prevalence": 0.109094078852727,
57
+ "precin_prevalence": 0.04258972155558187,
58
+ "cin_prevalence": 0.01924455395208896
59
+ }
60
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "time": {
3
- "initialize": 0.048,
4
- "run": 2.113
3
+ "initialize": 0.015,
4
+ "run": 1.809
5
5
  },
6
6
  "parameters": {
7
7
  "n_agents": 10000,
@@ -10,5 +10,5 @@
10
10
  "n_interventions": 7,
11
11
  "n_analyzers": 0
12
12
  },
13
- "cpu_performance": 0.1865387682627365
13
+ "cpu_performance": 0.3104645325856668
14
14
  }
@@ -401,7 +401,6 @@ def test_resuming():
401
401
  return s1
402
402
 
403
403
 
404
-
405
404
  #%% Run as a script
406
405
  if __name__ == '__main__':
407
406
 
@@ -1,60 +0,0 @@
1
- {
2
- "summary": {
3
- "infections": 26122864.5,
4
- "cins": 978687.96875,
5
- "cancers": 37402.08984375,
6
- "cancer_deaths": 21194.517578125,
7
- "reinfections": 19906639.0,
8
- "reactivations": 0.0,
9
- "n_susceptible": 586950912.0,
10
- "n_infectious": 33458658.0,
11
- "n_inactive": 250594.0,
12
- "n_normal": 307255648.0,
13
- "n_cin": 2840065.5,
14
- "n_cancerous": 250594.0,
15
- "n_infected": 33709256.0,
16
- "n_abnormal": 3090659.0,
17
- "n_latent": 0.0,
18
- "n_precin": 12789020.0,
19
- "n_screened": 507421.6875,
20
- "n_cin_treated": 0.0,
21
- "n_cancer_treated": 0.0,
22
- "n_vaccinated": 1174425.5,
23
- "n_tx_vaccinated": 11464986.0,
24
- "hpv_incidence": 0.0222530231795602,
25
- "cin_incidence": 0.006666666521915052,
26
- "cancer_incidence": 25.036094370460077,
27
- "births": 7966644.8931,
28
- "other_deaths": 2701677.5,
29
- "migration": -162075.7177,
30
- "asr_cancer_incidence": 30.172602808338848,
31
- "asr_cancer_mortality": 20.751799018906738,
32
- "new_vaccinated": 87271.54296875,
33
- "cum_vaccinated": 1246736.328125,
34
- "new_doses": 87271.54296875,
35
- "cum_doses": 1246736.328125,
36
- "new_txvx_doses": 11829033.5,
37
- "new_tx_vaccinated": 11462492.75,
38
- "cum_txvx_doses": 11829033.5,
39
- "cum_tx_vaccinated": 11462492.75,
40
- "new_screens": 507421.6875,
41
- "new_screened": 507421.6875,
42
- "new_cin_treatments": 0.0,
43
- "new_cin_treated": 0.0,
44
- "new_cancer_treatments": 0.0,
45
- "new_cancer_treated": 0.0,
46
- "cum_screens": 507421.6875,
47
- "cum_screened": 507421.6875,
48
- "cum_cin_treatments": 0.0,
49
- "cum_cin_treated": 0.0,
50
- "cum_cancer_treatments": 0.0,
51
- "cum_cancer_treated": 0.0,
52
- "cancer_mortality": 14.163362260078074,
53
- "n_alive": 307255648.0,
54
- "cdr": 0.008792930309290849,
55
- "cbr": 0.025928392024546283,
56
- "hpv_prevalence": 0.10889517643626848,
57
- "precin_prevalence": 0.04273169288796053,
58
- "cin_prevalence": 0.018978906394343284
59
- }
60
- }
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
File without changes