miscore-sim 0.0.998__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 (238) hide show
  1. miscore_sim-0.0.998/.coveragerc +3 -0
  2. miscore_sim-0.0.998/.flake8 +27 -0
  3. miscore_sim-0.0.998/.gitignore +136 -0
  4. miscore_sim-0.0.998/.gitlab-ci.yml +212 -0
  5. miscore_sim-0.0.998/.pydocstyle +11 -0
  6. miscore_sim-0.0.998/LICENSE +108 -0
  7. miscore_sim-0.0.998/PKG-INFO +33 -0
  8. miscore_sim-0.0.998/README.md +5 -0
  9. miscore_sim-0.0.998/doc/Makefile +20 -0
  10. miscore_sim-0.0.998/doc/_static/logo.svg +316 -0
  11. miscore_sim-0.0.998/doc/_static/logo_dark.svg +316 -0
  12. miscore_sim-0.0.998/doc/about.rst +32 -0
  13. miscore_sim-0.0.998/doc/api/core.rst +21 -0
  14. miscore_sim-0.0.998/doc/api/index.rst +15 -0
  15. miscore_sim-0.0.998/doc/api/individual.rst +9 -0
  16. miscore_sim-0.0.998/doc/api/processes/birth.rst +10 -0
  17. miscore_sim-0.0.998/doc/api/processes/ec.rst +6 -0
  18. miscore_sim-0.0.998/doc/api/processes/ec_screening.rst +6 -0
  19. miscore_sim-0.0.998/doc/api/processes/index.rst +14 -0
  20. miscore_sim-0.0.998/doc/api/processes/oc.rst +10 -0
  21. miscore_sim-0.0.998/doc/api/processes/sex.rst +6 -0
  22. miscore_sim-0.0.998/doc/api/processes/stratum.rst +6 -0
  23. miscore_sim-0.0.998/doc/api/tools/batch.rst +10 -0
  24. miscore_sim-0.0.998/doc/api/tools/calibration.rst +34 -0
  25. miscore_sim-0.0.998/doc/api/tools/cea.rst +23 -0
  26. miscore_sim-0.0.998/doc/api/tools/cohort.rst +11 -0
  27. miscore_sim-0.0.998/doc/api/tools/index.rst +12 -0
  28. miscore_sim-0.0.998/doc/api/utils.rst +25 -0
  29. miscore_sim-0.0.998/doc/before_you_start.rst +95 -0
  30. miscore_sim-0.0.998/doc/changelog.rst +13 -0
  31. miscore_sim-0.0.998/doc/conf.py +188 -0
  32. miscore_sim-0.0.998/doc/data/birth/index.rst +11 -0
  33. miscore_sim-0.0.998/doc/data/birth/nl.rst +14 -0
  34. miscore_sim-0.0.998/doc/data/birth/nl_2021.rst +14 -0
  35. miscore_sim-0.0.998/doc/data/birth/nl_2022.rst +14 -0
  36. miscore_sim-0.0.998/doc/data/birth/us.rst +14 -0
  37. miscore_sim-0.0.998/doc/data/cea/index.rst +8 -0
  38. miscore_sim-0.0.998/doc/data/cea/population_norms.rst +8 -0
  39. miscore_sim-0.0.998/doc/data/ec/index.rst +8 -0
  40. miscore_sim-0.0.998/doc/data/ec/us.rst +22 -0
  41. miscore_sim-0.0.998/doc/data/ec_screening/cea.rst +14 -0
  42. miscore_sim-0.0.998/doc/data/ec_screening/example.rst +14 -0
  43. miscore_sim-0.0.998/doc/data/ec_screening/index.rst +9 -0
  44. miscore_sim-0.0.998/doc/data/index.rst +14 -0
  45. miscore_sim-0.0.998/doc/data/oc/index.rst +14 -0
  46. miscore_sim-0.0.998/doc/data/oc/nl_2017.rst +20 -0
  47. miscore_sim-0.0.998/doc/data/oc/nl_2018.rst +20 -0
  48. miscore_sim-0.0.998/doc/data/oc/nl_2019.rst +20 -0
  49. miscore_sim-0.0.998/doc/data/oc/us_2009.rst +10 -0
  50. miscore_sim-0.0.998/doc/data/oc/us_2017.rst +14 -0
  51. miscore_sim-0.0.998/doc/data/oc/us_2018.rst +14 -0
  52. miscore_sim-0.0.998/doc/data/oc/us_2019.rst +14 -0
  53. miscore_sim-0.0.998/doc/data/sex/example.rst +10 -0
  54. miscore_sim-0.0.998/doc/data/sex/index.rst +8 -0
  55. miscore_sim-0.0.998/doc/development/contributing.rst +130 -0
  56. miscore_sim-0.0.998/doc/development/cython.rst +22 -0
  57. miscore_sim-0.0.998/doc/development/index.rst +14 -0
  58. miscore_sim-0.0.998/doc/development/releasing.rst +64 -0
  59. miscore_sim-0.0.998/doc/development/testing.rst +122 -0
  60. miscore_sim-0.0.998/doc/index.rst +45 -0
  61. miscore_sim-0.0.998/doc/installation.rst +18 -0
  62. miscore_sim-0.0.998/doc/license.rst +5 -0
  63. miscore_sim-0.0.998/doc/make.bat +35 -0
  64. miscore_sim-0.0.998/doc/overview.rst +17 -0
  65. miscore_sim-0.0.998/doc/tutorials/basic/index.rst +24 -0
  66. miscore_sim-0.0.998/doc/tutorials/basic/theory/index.rst +13 -0
  67. miscore_sim-0.0.998/doc/tutorials/basic/theory/intervention_strategies/1_add_screening.py +65 -0
  68. miscore_sim-0.0.998/doc/tutorials/basic/theory/intervention_strategies/2_multiple_screening.py +106 -0
  69. miscore_sim-0.0.998/doc/tutorials/basic/theory/intervention_strategies.rst +64 -0
  70. miscore_sim-0.0.998/doc/tutorials/basic/theory/limits_of_universes/1_error_with_extra_life_table_universe.py +50 -0
  71. miscore_sim-0.0.998/doc/tutorials/basic/theory/limits_of_universes.rst +76 -0
  72. miscore_sim-0.0.998/doc/tutorials/basic/theory/model_output/1_model_output.py +67 -0
  73. miscore_sim-0.0.998/doc/tutorials/basic/theory/model_output.rst +287 -0
  74. miscore_sim-0.0.998/doc/tutorials/basic/theory/multiprocessing/1_multiprocessing.py +34 -0
  75. miscore_sim-0.0.998/doc/tutorials/basic/theory/multiprocessing.rst +33 -0
  76. miscore_sim-0.0.998/doc/tutorials/basic/theory/recap.rst +32 -0
  77. miscore_sim-0.0.998/doc/tutorials/basic/theory/reproducibility/1_single_seed.py +38 -0
  78. miscore_sim-0.0.998/doc/tutorials/basic/theory/reproducibility/2_multiple_seeds.py +52 -0
  79. miscore_sim-0.0.998/doc/tutorials/basic/theory/reproducibility.rst +73 -0
  80. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/10_example_run.py +48 -0
  81. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/1_minimal.py +24 -0
  82. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/2_exporting.py +28 -0
  83. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/3_logging.py +32 -0
  84. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/4_multiple_processes.py +37 -0
  85. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/5_data.py +38 -0
  86. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/6_reproducibility.py +39 -0
  87. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/7_data_ec_from_data.py +45 -0
  88. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/8_data_ec.py +11 -0
  89. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model/9_data_ec_from_data_change.py +22 -0
  90. miscore_sim-0.0.998/doc/tutorials/basic/theory/run_a_model.rst +331 -0
  91. miscore_sim-0.0.998/doc/tutorials/basic/tools/birth_tables/1_demonstrate_method.py +22 -0
  92. miscore_sim-0.0.998/doc/tutorials/basic/tools/birth_tables/2_use_in_cohort_model.py +30 -0
  93. miscore_sim-0.0.998/doc/tutorials/basic/tools/birth_tables/3_different_reference_years.py +26 -0
  94. miscore_sim-0.0.998/doc/tutorials/basic/tools/birth_tables/4_use_population_data.py +28 -0
  95. miscore_sim-0.0.998/doc/tutorials/basic/tools/birth_tables.rst +144 -0
  96. miscore_sim-0.0.998/doc/tutorials/basic/tools/cea/cea_example_run.py +238 -0
  97. miscore_sim-0.0.998/doc/tutorials/basic/tools/cea/scatter_all.png +0 -0
  98. miscore_sim-0.0.998/doc/tutorials/basic/tools/cea.rst +698 -0
  99. miscore_sim-0.0.998/doc/tutorials/basic/tools/index.rst +10 -0
  100. miscore_sim-0.0.998/doc/tutorials/basic/tools/life_tables.rst +237 -0
  101. miscore_sim-0.0.998/doc/tutorials/basic/tools/run_a_population_model/1_regular_model.py +14 -0
  102. miscore_sim-0.0.998/doc/tutorials/basic/tools/run_a_population_model/2_population_model.py +23 -0
  103. miscore_sim-0.0.998/doc/tutorials/basic/tools/run_a_population_model/3_create_cohort_function.py +25 -0
  104. miscore_sim-0.0.998/doc/tutorials/basic/tools/run_a_population_model/4_add_screening.py +31 -0
  105. miscore_sim-0.0.998/doc/tutorials/basic/tools/run_a_population_model/5_multiprocessing.py +33 -0
  106. miscore_sim-0.0.998/doc/tutorials/basic/tools/run_a_population_model.rst +91 -0
  107. miscore_sim-0.0.998/doc/tutorials/builders/case.rst +135 -0
  108. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/1_minimal.py +5 -0
  109. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/2_parameters.py +11 -0
  110. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/3_name.py +12 -0
  111. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/4_properties.py +22 -0
  112. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/5_events.py +34 -0
  113. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/6_log_events.py +50 -0
  114. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/7_termination.py +64 -0
  115. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/8_memory.py +67 -0
  116. miscore_sim-0.0.998/doc/tutorials/builders/create_a_process/9_log_durations.py +86 -0
  117. miscore_sim-0.0.998/doc/tutorials/builders/create_process.rst +227 -0
  118. miscore_sim-0.0.998/doc/tutorials/builders/index.rst +15 -0
  119. miscore_sim-0.0.998/doc/tutorials/builders/optimize_performance.rst +34 -0
  120. miscore_sim-0.0.998/doc/tutorials/builders/utils.rst +90 -0
  121. miscore_sim-0.0.998/doc/tutorials/index.rst +31 -0
  122. miscore_sim-0.0.998/doc/tutorials/modellers/advanced_logging/1_disease_process.py +55 -0
  123. miscore_sim-0.0.998/doc/tutorials/modellers/advanced_logging/2_log_events.py +67 -0
  124. miscore_sim-0.0.998/doc/tutorials/modellers/advanced_logging/3_log_durations.py +86 -0
  125. miscore_sim-0.0.998/doc/tutorials/modellers/advanced_logging/4_log_durations_start_stop.py +79 -0
  126. miscore_sim-0.0.998/doc/tutorials/modellers/advanced_logging.rst +150 -0
  127. miscore_sim-0.0.998/doc/tutorials/modellers/calibration/calibration.py +139 -0
  128. miscore_sim-0.0.998/doc/tutorials/modellers/calibration/targets.py +105 -0
  129. miscore_sim-0.0.998/doc/tutorials/modellers/calibration.rst +257 -0
  130. miscore_sim-0.0.998/doc/tutorials/modellers/index.rst +25 -0
  131. miscore_sim-0.0.998/doc/tutorials/modellers/miscore_structure/miscore_structure.svg +4 -0
  132. miscore_sim-0.0.998/doc/tutorials/modellers/miscore_structure.rst +81 -0
  133. miscore_sim-0.0.998/doc/tutorials/modellers/modify_a_process/modify_a_process.py +11 -0
  134. miscore_sim-0.0.998/doc/tutorials/modellers/modify_a_process.rst +22 -0
  135. miscore_sim-0.0.998/doc/tutorials/modellers/random_numbers/overwriting_properties.py +37 -0
  136. miscore_sim-0.0.998/doc/tutorials/modellers/random_numbers.rst +163 -0
  137. miscore_sim-0.0.998/doc/tutorials/modellers/take_snapshots/1_model.py +52 -0
  138. miscore_sim-0.0.998/doc/tutorials/modellers/take_snapshots/2_snapshots.py +62 -0
  139. miscore_sim-0.0.998/doc/tutorials/modellers/take_snapshots/3_integer_snapshots.py +77 -0
  140. miscore_sim-0.0.998/doc/tutorials/modellers/take_snapshots/4_snapshot_years.py +79 -0
  141. miscore_sim-0.0.998/doc/tutorials/modellers/take_snapshots.rst +144 -0
  142. miscore_sim-0.0.998/doc/tutorials/modellers/using_stratum/1_stratified_model.py +154 -0
  143. miscore_sim-0.0.998/doc/tutorials/modellers/using_stratum/2_prevalent_cases.py +38 -0
  144. miscore_sim-0.0.998/doc/tutorials/modellers/using_stratum.rst +295 -0
  145. miscore_sim-0.0.998/doc/tutorials/processes/ec.rst +208 -0
  146. miscore_sim-0.0.998/doc/tutorials/processes/ec_screening.rst +100 -0
  147. miscore_sim-0.0.998/doc/tutorials/processes/from_data/1_ec.py +12 -0
  148. miscore_sim-0.0.998/doc/tutorials/processes/from_data/2_ec_from_data.py +3 -0
  149. miscore_sim-0.0.998/doc/tutorials/processes/index.rst +25 -0
  150. miscore_sim-0.0.998/examples/article.py +93 -0
  151. miscore_sim-0.0.998/examples/runs/ec.py +64 -0
  152. miscore_sim-0.0.998/examples/runs/ec_screening.py +83 -0
  153. miscore_sim-0.0.998/examples/tools/cea.py +204 -0
  154. miscore_sim-0.0.998/miscore/__init__.py +11 -0
  155. miscore_sim-0.0.998/miscore/_version.py +9 -0
  156. miscore_sim-0.0.998/miscore/core.py +1309 -0
  157. miscore_sim-0.0.998/miscore/individual.c +47301 -0
  158. miscore_sim-0.0.998/miscore/individual.py +1208 -0
  159. miscore_sim-0.0.998/miscore/processes/__init__.py +10 -0
  160. miscore_sim-0.0.998/miscore/processes/birth/__init__.py +3 -0
  161. miscore_sim-0.0.998/miscore/processes/birth/birth.py +264 -0
  162. miscore_sim-0.0.998/miscore/processes/birth/data/__init__.py +5 -0
  163. miscore_sim-0.0.998/miscore/processes/birth/data/nl.py +375 -0
  164. miscore_sim-0.0.998/miscore/processes/birth/data/nl_2021.py +333 -0
  165. miscore_sim-0.0.998/miscore/processes/birth/data/nl_2022.py +333 -0
  166. miscore_sim-0.0.998/miscore/processes/birth/data/us.py +276 -0
  167. miscore_sim-0.0.998/miscore/processes/ec/__init__.py +2 -0
  168. miscore_sim-0.0.998/miscore/processes/ec/data/__init__.py +2 -0
  169. miscore_sim-0.0.998/miscore/processes/ec/data/us.py +99 -0
  170. miscore_sim-0.0.998/miscore/processes/ec/ec.py +232 -0
  171. miscore_sim-0.0.998/miscore/processes/ec_screening/__init__.py +2 -0
  172. miscore_sim-0.0.998/miscore/processes/ec_screening/data/__init__.py +2 -0
  173. miscore_sim-0.0.998/miscore/processes/ec_screening/data/cea.py +36 -0
  174. miscore_sim-0.0.998/miscore/processes/ec_screening/data/example.py +27 -0
  175. miscore_sim-0.0.998/miscore/processes/ec_screening/ec_screening.py +191 -0
  176. miscore_sim-0.0.998/miscore/processes/oc/__init__.py +3 -0
  177. miscore_sim-0.0.998/miscore/processes/oc/data/__init__.py +14 -0
  178. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/NL_1x10_rates.pkl +0 -0
  179. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/NL_1x1_rates.pkl +0 -0
  180. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/NL_1x5_rates.pkl +0 -0
  181. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/NLc_1x10_rates.pkl +0 -0
  182. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/NLc_1x1_rates.pkl +0 -0
  183. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/NLc_1x5_rates.pkl +0 -0
  184. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/US_1x10_rates.pkl +0 -0
  185. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/US_1x1_rates.pkl +0 -0
  186. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/US_1x5_rates.pkl +0 -0
  187. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/USc_1x10_rates.pkl +0 -0
  188. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/USc_1x1_rates.pkl +0 -0
  189. miscore_sim-0.0.998/miscore/processes/oc/data/cohort/USc_1x5_rates.pkl +0 -0
  190. miscore_sim-0.0.998/miscore/processes/oc/data/get_cohort_table.py +131 -0
  191. miscore_sim-0.0.998/miscore/processes/oc/data/nl_2017.py +634 -0
  192. miscore_sim-0.0.998/miscore/processes/oc/data/nl_2018.py +634 -0
  193. miscore_sim-0.0.998/miscore/processes/oc/data/nl_2019.py +634 -0
  194. miscore_sim-0.0.998/miscore/processes/oc/data/us_2009.py +110 -0
  195. miscore_sim-0.0.998/miscore/processes/oc/data/us_2017.py +318 -0
  196. miscore_sim-0.0.998/miscore/processes/oc/data/us_2018.py +323 -0
  197. miscore_sim-0.0.998/miscore/processes/oc/data/us_2019.py +323 -0
  198. miscore_sim-0.0.998/miscore/processes/oc/oc.py +257 -0
  199. miscore_sim-0.0.998/miscore/processes/sex/__init__.py +2 -0
  200. miscore_sim-0.0.998/miscore/processes/sex/data/__init__.py +2 -0
  201. miscore_sim-0.0.998/miscore/processes/sex/data/example.py +5 -0
  202. miscore_sim-0.0.998/miscore/processes/sex/sex.py +32 -0
  203. miscore_sim-0.0.998/miscore/processes/stratum/__init__.py +2 -0
  204. miscore_sim-0.0.998/miscore/processes/stratum/stratum.py +57 -0
  205. miscore_sim-0.0.998/miscore/tools/__init__.py +3 -0
  206. miscore_sim-0.0.998/miscore/tools/batch.py +47 -0
  207. miscore_sim-0.0.998/miscore/tools/calibration.py +998 -0
  208. miscore_sim-0.0.998/miscore/tools/cea/__init__.py +5 -0
  209. miscore_sim-0.0.998/miscore/tools/cea/cea.py +1350 -0
  210. miscore_sim-0.0.998/miscore/tools/cea/data/__init__.py +2 -0
  211. miscore_sim-0.0.998/miscore/tools/cea/data/population_norms.csv +155 -0
  212. miscore_sim-0.0.998/miscore/tools/cea/data/population_norms.py +336 -0
  213. miscore_sim-0.0.998/miscore/tools/cohort.py +347 -0
  214. miscore_sim-0.0.998/miscore/utils.c +41220 -0
  215. miscore_sim-0.0.998/miscore/utils.py +588 -0
  216. miscore_sim-0.0.998/miscore_sim.egg-info/PKG-INFO +33 -0
  217. miscore_sim-0.0.998/miscore_sim.egg-info/SOURCES.txt +236 -0
  218. miscore_sim-0.0.998/miscore_sim.egg-info/dependency_links.txt +1 -0
  219. miscore_sim-0.0.998/miscore_sim.egg-info/requires.txt +5 -0
  220. miscore_sim-0.0.998/miscore_sim.egg-info/top_level.txt +1 -0
  221. miscore_sim-0.0.998/pyproject.toml +45 -0
  222. miscore_sim-0.0.998/requirements.txt +21 -0
  223. miscore_sim-0.0.998/setup.cfg +4 -0
  224. miscore_sim-0.0.998/setup.py +36 -0
  225. miscore_sim-0.0.998/tests/__init__.py +0 -0
  226. miscore_sim-0.0.998/tests/integration/__init__.py +0 -0
  227. miscore_sim-0.0.998/tests/integration/test_models.py +192 -0
  228. miscore_sim-0.0.998/tests/integration/test_processes.py +232 -0
  229. miscore_sim-0.0.998/tests/integration/tools/__init__.py +0 -0
  230. miscore_sim-0.0.998/tests/integration/tools/test_calibration.py +659 -0
  231. miscore_sim-0.0.998/tests/integration/tools/test_cea.py +1078 -0
  232. miscore_sim-0.0.998/tests/integration/tools/test_cohort.py +146 -0
  233. miscore_sim-0.0.998/tests/unit/__init__.py +0 -0
  234. miscore_sim-0.0.998/tests/unit/test_core.py +844 -0
  235. miscore_sim-0.0.998/tests/unit/test_utils.py +302 -0
  236. miscore_sim-0.0.998/tests/unit/tools/__init__.py +0 -0
  237. miscore_sim-0.0.998/tests/unit/tools/test_cohort.py +85 -0
  238. miscore_sim-0.0.998/version.py +45 -0
@@ -0,0 +1,3 @@
1
+ [run]
2
+ plugins = Cython.Coverage
3
+ source = miscore
@@ -0,0 +1,27 @@
1
+ [flake8]
2
+ # W503: Line break occurred before a binary operator
3
+ ignore = W503
4
+ per-file-ignores =
5
+ # F401: Module imported but unused
6
+ # I100: Import statements are in the wrong order
7
+ # I101: Imported names are in the wrong order
8
+ __init__.py: F401
9
+ miscore/__init__.py: F401, I100, I101
10
+ max-line-length = 99
11
+ max-doc-length = 99
12
+ exclude =
13
+ .git,
14
+ __pycache__,
15
+ venv,
16
+ doc/conf.py,
17
+ doc/_build,
18
+ build,
19
+ dist,
20
+ examples/article.py,
21
+ doctests = True
22
+ import-order-style = google
23
+ application_import_names =
24
+ miscore,
25
+ version
26
+ strictness = short
27
+ docstring_style = sphinx
@@ -0,0 +1,136 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+ doc/_build/
74
+
75
+ # PyBuilder
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ .python-version
87
+
88
+ # pipenv
89
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
91
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
92
+ # install all needed dependencies.
93
+ #Pipfile.lock
94
+
95
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
96
+ __pypackages__/
97
+
98
+ # Celery stuff
99
+ celerybeat-schedule
100
+ celerybeat.pid
101
+
102
+ # SageMath parsed files
103
+ *.sage.py
104
+
105
+ # Environments
106
+ .env
107
+ .venv
108
+ env/
109
+ venv/
110
+ ENV/
111
+ env.bak/
112
+ venv.bak/
113
+
114
+ # Spyder project settings
115
+ .spyderproject
116
+ .spyproject
117
+
118
+ # Rope project settings
119
+ .ropeproject
120
+
121
+ # mkdocs documentation
122
+ /site
123
+
124
+ # mypy
125
+ .mypy_cache/
126
+ .dmypy.json
127
+ dmypy.json
128
+
129
+ # Pyre type checker
130
+ .pyre/
131
+
132
+ # idea
133
+ /.idea
134
+
135
+ # Mac .DS_Store files
136
+ .DS_Store
@@ -0,0 +1,212 @@
1
+ variables:
2
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
3
+
4
+ cache:
5
+ paths:
6
+ - .cache/pip
7
+
8
+ stages:
9
+ - test
10
+ - coverage
11
+ - deploy
12
+ - build
13
+ - release
14
+
15
+ test_functionality:
16
+ stage: test
17
+ parallel:
18
+ matrix:
19
+ - VERSION: ["3.9", "3.14"]
20
+ image: python:$VERSION
21
+ script:
22
+ - python -V
23
+ - python -m pip install pip --upgrade
24
+ - python -m pip install -r requirements.txt
25
+ - python -m build
26
+ - python -m pip install dist/*.whl
27
+ - cd tests
28
+ - python -m unittest discover -s unit -v
29
+ - python -m unittest discover -s integration -v
30
+ - cd ../examples
31
+ - find . -name "*.py" -type f -print0 | xargs -t -0 -n1 python
32
+ - cd ../doc
33
+ - find . -name "*.py" ! -name "conf.py" -type f -print0 | xargs -t -0 -n1 python
34
+
35
+ test_documentation:
36
+ stage: test
37
+ # Using Python 3.11 instead of 3.9 here so that pandas 3.0.0 is used and intersphinx works correctly
38
+ image: python:3.11
39
+ script:
40
+ - python -V
41
+ - python -m pip install pip --upgrade
42
+ - python -m pip install -r requirements.txt
43
+ - (cd doc && make doctest)
44
+ - sphinx-build doc html -n -W --keep-going
45
+ artifacts:
46
+ paths:
47
+ - html
48
+ expire_in: 2 weeks
49
+
50
+ test_style:
51
+ stage: test
52
+ image: python:3.9
53
+ script:
54
+ - python -V
55
+ - python -m pip install pip --upgrade
56
+ - python -m pip install -r requirements.txt
57
+ - python -m flake8
58
+ - python -m pydocstyle miscore
59
+
60
+ # test coverage with Python 3.13 instead of 3.14 because of cython issues
61
+ test_coverage:
62
+ stage: coverage
63
+ image: python:3.13
64
+ variables:
65
+ CYTHON_COVERAGE: "all"
66
+ script:
67
+ - python -V
68
+ - python -m pip install pip --upgrade
69
+ - python -m pip install -r requirements.txt
70
+ - python setup.py build_ext --inplace
71
+ - python -m pytest tests/unit -v --cov=miscore
72
+ - python -m pytest tests/integration -v --cov=miscore --cov-append
73
+ - coverage report --precision=1
74
+ - coverage xml
75
+ - coverage html
76
+ artifacts:
77
+ expose_as: "coverage"
78
+ name: "coverage"
79
+ paths:
80
+ - coverage.xml
81
+ - htmlcov/
82
+ reports:
83
+ coverage_report:
84
+ coverage_format: cobertura
85
+ path: coverage.xml
86
+ coverage: /(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
87
+
88
+ pages:
89
+ stage: deploy
90
+ only:
91
+ - main
92
+ # Using Python 3.11 instead of 3.9 here so that pandas 3.0.0 is used and intersphinx works correctly
93
+ image: python:3.11
94
+ script:
95
+ - python -V
96
+ - python -m pip install pip --upgrade
97
+ - python -m pip install -r requirements.txt
98
+ - cd doc
99
+ - make dirhtml
100
+ - mv _build/dirhtml/ ../public/
101
+ artifacts:
102
+ paths:
103
+ - public
104
+ expire_in: 2 weeks
105
+ allow_failure: true
106
+
107
+ build_source:
108
+ stage: build
109
+ when: manual
110
+ dependencies: []
111
+ image: python:3.9
112
+ script:
113
+ - python -V
114
+ - python -m pip install pip setuptools twine --upgrade
115
+ - python -m pip install -r requirements.txt
116
+ - python -m build --sdist
117
+ - python -m twine check dist/*
118
+ artifacts:
119
+ paths:
120
+ - dist/
121
+ expire_in: 2 weeks
122
+ allow_failure: true
123
+
124
+ build_mac:
125
+ stage: build
126
+ when: manual
127
+ parallel:
128
+ matrix:
129
+ - VERSION: ["10", "11", "12", "13", "14"]
130
+ IMAGE: ["macos-15-xcode-16", "macos-26-xcode-26"]
131
+ # This makes sure artifacts from other build jobs are not downloaded
132
+ dependencies: []
133
+ tags:
134
+ - saas-macos-medium-m1
135
+ image: $IMAGE
136
+ script:
137
+ - brew install python@3.$VERSION
138
+ - python3.$VERSION -m venv .venv
139
+ - source .venv/bin/activate
140
+ - python3.$VERSION -V
141
+ - python3.$VERSION -m pip install pip setuptools wheel twine --upgrade
142
+ - python3.$VERSION -m pip install -r requirements.txt
143
+ - python3.$VERSION -m build
144
+ - python3.$VERSION -m twine check dist/*
145
+ artifacts:
146
+ paths:
147
+ - dist/
148
+ expire_in: 2 weeks
149
+ allow_failure: true
150
+
151
+ build_linux:
152
+ stage: build
153
+ when: manual
154
+ parallel:
155
+ matrix:
156
+ - VERSION: ["9", "10", "11", "12", "13", "14"]
157
+ # This makes sure artifacts from other build jobs are not downloaded
158
+ dependencies: []
159
+ image: quay.io/pypa/manylinux_2_28_x86_64
160
+ script:
161
+ - PYBIN=/opt/python/cp3${VERSION}-cp3${VERSION}/bin/python
162
+ - $PYBIN -m pip install pip build Cython auditwheel twine --upgrade
163
+ - $PYBIN -m pip install -r requirements.txt
164
+
165
+ # First build linux wheels in temporary folder
166
+ - mkdir tmp-linux-dist
167
+ - $PYBIN -m build --wheel --outdir tmp-linux-dist
168
+
169
+ # Then repair them and move to the dist folder
170
+ - auditwheel repair tmp-linux-dist/*.whl -w dist
171
+ - $PYBIN -m twine check dist/*
172
+ artifacts:
173
+ paths:
174
+ - dist/
175
+ expire_in: 2 weeks
176
+ allow_failure: true
177
+
178
+ build_windows:
179
+ stage: build
180
+ when: manual
181
+ parallel:
182
+ matrix:
183
+ - VERSION: ["9", "10", "11", "12", "13", "14"]
184
+ # This makes sure artifacts from other build jobs are not downloaded
185
+ dependencies: []
186
+ tags:
187
+ - saas-windows-medium-amd64
188
+ script:
189
+ - choco install python3$VERSION -yes --no-progress --allow-downgrade
190
+ - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
191
+ - refreshenv
192
+ - py -3.$VERSION -V
193
+ - py -3.$VERSION -m pip install pip twine setuptools wheel --upgrade
194
+ - py -3.$VERSION -m pip install -r requirements.txt
195
+ - py -3.$VERSION -m build
196
+ - py -3.$VERSION -m twine check dist/*
197
+ artifacts:
198
+ paths:
199
+ - dist/
200
+ expire_in: 2 weeks
201
+ allow_failure: true
202
+
203
+ release-real:
204
+ stage: release
205
+ # only:
206
+ # - tags
207
+ when: manual
208
+ image: python:3.9
209
+ script:
210
+ - python -V
211
+ - python -m pip install twine
212
+ - TWINE_PASSWORD=${PYPI_TOKEN} TWINE_USERNAME=__token__ python -m twine upload dist/* --verbose
@@ -0,0 +1,11 @@
1
+ [pydocstyle]
2
+ convention = pep257
3
+ add-ignore =
4
+ D107, # Missing docstring in __init__
5
+ D200, # One-line docstring should fit on one line with quotes
6
+ D205, # 1 blank line required between summary line and description
7
+ D400, # First line should end with a period
8
+ D401, # First line should be in imperative mood
9
+ D402, # First line should not be the function’s signature
10
+ D403, # First word of the first line should be properly capitalized
11
+ D412, # No blank lines allowed between a section header and its content
@@ -0,0 +1,108 @@
1
+ MISCAN/MISCore License
2
+
3
+ These terms of use (hereinafter: “Terms and Conditions”) have been drawn up by Erasmus University Medical Center
4
+ Rotterdam, address kept at Dr. Molewaterplein 40, 3015 GD Rotterdam, the Netherlands (“Erasmus MC”) .
5
+
6
+ By using the Software, you (hereinafter "You" or "Your") agree to these terms.
7
+
8
+ Article 1 The Software
9
+
10
+ 1.1 Erasmus MC is the author and copyright holder of the software described as “MISCAN: MIcrosimulation SCreening
11
+ ANalysis” and “MICore: MISCAN Core”, including software and related documentation made available through the repository
12
+ (hereinafter: "Software").
13
+
14
+ 1.2 Erasmus MC allows You to use the Software under the following conditions.
15
+
16
+ Article 2 The License
17
+
18
+ 2.1 Erasmus MC, after making the Software available, grants You a non-exclusive, non-sublicensable, non-transferable
19
+ right to use the Software at your public institution for academic and non-commercial research and/or educational
20
+ purposes (hereinafter: “the Use”). By using the Software, you agree to the terms and conditions as described below.
21
+
22
+ 2.2 Access to Software includes the following modules or parts thereof:
23
+
24
+ MISCAN models of disease natural history and intervention effectiveness, defined as any and all code defined in the
25
+ “miscore/processes/ec” and "miscore/processes/ec_screening" subfolders in the publicly available repository.
26
+
27
+ MISCore, defined as any and all code in the publicly available repository that facilitates microsimulation modeling and
28
+ the processing of results obtained from running the software. This includes all code in the repository, except the code
29
+ that falls under the MISCAN models.
30
+
31
+ 2.3 Your use is subject to the following terms:
32
+
33
+ A. You are authorized to use the Software only for academic research and educational purposes only at your institution.
34
+
35
+ B. You may not use the Software for commercial purposes without a prior written consent from Erasmus MC and without
36
+ entering into a separate license agreement regarding such commercial use.
37
+
38
+ C. Your Use of the Software is at your own expense and risk.
39
+
40
+ D. The Software must be used ethically and responsibly.
41
+
42
+ E. Erasmus MC reserves the right to continue using the Software in the broadest sense of the word.
43
+
44
+ F. The use of MISCore only does not constitute the use of MISCAN, and may not be published as such. For the use of
45
+ MISCAN, condition 2.3G applies.
46
+
47
+ G. The use of MISCAN, as defined in article 2.2, implies adherence to the MISCAN parameters specified in the “data”
48
+ subfolder of each individual model. Any deviation from the supplied parameters does not constitute the use of MISCAN
49
+ model, and may not be published as such. Some parameters are exempted from this condition, as specified in the data
50
+ file.
51
+
52
+ H. The use of the MISCAN parameters outside the MISCAN and MISCore code does not constitute the use of the MISCAN model,
53
+ and may not be published as such.
54
+
55
+ 2.3 Permission is hereby granted, free of charge, to any person obtaining a license to this Software, to deal in the
56
+ Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute
57
+ the Software, subject to the following conditions:
58
+
59
+ (a) the Software is used, copied, modified or distributed only for academic research and trainings purposes in
60
+ accordance with section 2.2 of the Agreement and;
61
+
62
+ (b) if You create any derivate Software using or containing Software or any parts thereof You will apply only public
63
+ license and make the code available for public review and require that all derivative Software have the same license
64
+ and;
65
+
66
+ 2.4 Erasmus MC has the right at all times to deny You the Use of the Software by terminating the license, terminating
67
+ the Use of the Software or denying access to the Software in whole or in part, temporarily or permanently.
68
+
69
+ Article 3 Cooperation and Publication
70
+
71
+ 3.1 If you want to collaborate with Erasmus MC regarding the Software, with a view to further development and
72
+ validation, you can contribute to the members of the MISCAN core team, as listed in the MISCAN documentation, or to
73
+ MISCAN@erasmusmc.nl
74
+
75
+ 3.2 If you are going to publish the results of the Use of the Software, you must make an appropriate reference to the
76
+ Software. This reference is as follows:
77
+
78
+ a) Academic reference: TODO
79
+
80
+ 3.3 You will also observe the academic authoring standards of the ICMJE, so that the authors of the Software may also be
81
+ included as co-authors in such publication.
82
+
83
+ Article 4 Guarantee and liability
84
+
85
+ 4.1 Erasmus MC does not guarantee that the Software is correct or complete, or free of errors.
86
+
87
+ 4.2 Erasmus MC is not liable for any direct or indirect damages resulting from or related to the Use of the Software
88
+ and/or the inability to Use it. Indirect damages includes, but is not limited to, consequential damage, reputational
89
+ damage, damage as a result of business interruption and loss of profit and turnover.
90
+
91
+ 4.3 You indemnify Erasmus MC against all possible claims from third parties as a result of the Use of (the content of)
92
+ the Software. You will compensate Erasmus MC for all damages and costs (including but not limited to judicial and extra
93
+ judicial costs) that Erasmus MC suffers as a result of such claims.
94
+
95
+ Article 5 Duration & Termination
96
+
97
+ 5.1 These Terms are effective from the date that the Software is available to You.
98
+
99
+ 5.2 If the license is terminated pursuant to Article 2.4, You will stop using the Software and if requested by Erasmus
100
+ MC, destroy the Software and any copies thereof and will issue a certificate of destruction and provide it to Erasmus
101
+ MC.
102
+
103
+ Article 6 Applicable law and dispute resolution
104
+
105
+ 6.1 These Terms and Conditions are governed by law of the Netherlands.
106
+
107
+ 6.2 All disputes that may arise as a result of the Conditions or their implementation will be submitted exclusively to
108
+ the competent court in Rotterdam, the Netherlands.
@@ -0,0 +1,33 @@
1
+ Metadata-Version: 2.4
2
+ Name: miscore-sim
3
+ Version: 0.0.998
4
+ Summary: A Python framework for discrete-event microsimulation of diseases and interventions
5
+ Author: Niels Dunnewind et al.
6
+ Maintainer-email: "MISCAN Core team, Department of Public Health, Erasmus University Medical Center" <miscan@erasmusmc.nl>
7
+ Project-URL: Documentation, https://miscore.io
8
+ Project-URL: Source, https://gitlab.com/erasmusmc-public-health/early-detection-and-screening/miscore
9
+ Project-URL: Issues, https://gitlab.com/erasmusmc-public-health/early-detection-and-screening/miscore/-/issues
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: numpy>=2.0.0
23
+ Requires-Dist: pandas!=1.3.0,>=1
24
+ Requires-Dist: tqdm>=4.40
25
+ Requires-Dist: matplotlib>=3
26
+ Requires-Dist: scipy>=1
27
+ Dynamic: license-file
28
+
29
+ # MISCore
30
+
31
+ The MISCAN Core, or MISCore, is a Python modelling platform for discrete-event microsimulation.
32
+
33
+ Please read the documentation at https://miscore.io
@@ -0,0 +1,5 @@
1
+ # MISCore
2
+
3
+ The MISCAN Core, or MISCore, is a Python modelling platform for discrete-event microsimulation.
4
+
5
+ Please read the documentation at https://miscore.io
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)