floatcsep 0.4.3__tar.gz → 0.4.5__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 (250) hide show
  1. floatcsep-0.4.5/CITATION.cff +33 -0
  2. {floatcsep-0.4.3/floatcsep.egg-info → floatcsep-0.4.5}/PKG-INFO +9 -3
  3. {floatcsep-0.4.3 → floatcsep-0.4.5}/README.md +8 -2
  4. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/model.py +22 -3
  5. floatcsep-0.4.5/floatcsep/utils/accessors.py +156 -0
  6. {floatcsep-0.4.3 → floatcsep-0.4.5/floatcsep.egg-info}/PKG-INFO +9 -3
  7. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep.egg-info/SOURCES.txt +1 -0
  8. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/integration/test_model_accessors.py +1 -3
  9. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_accessors.py +1 -1
  10. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_model.py +1 -1
  11. floatcsep-0.4.5/tutorials/case_d/models.yml +14 -0
  12. {floatcsep-0.4.3/tutorials/case_i/pymock_slow → floatcsep-0.4.5/tutorials/case_i/pymock}/Dockerfile +1 -1
  13. {floatcsep-0.4.3/tutorials/case_i/pymock → floatcsep-0.4.5/tutorials/case_i/pymock_slow}/Dockerfile +1 -1
  14. floatcsep-0.4.3/floatcsep/utils/accessors.py +0 -139
  15. floatcsep-0.4.3/tutorials/case_d/models.yml +0 -24
  16. {floatcsep-0.4.3 → floatcsep-0.4.5}/.github/workflows/build-sphinx.yml +0 -0
  17. {floatcsep-0.4.3 → floatcsep-0.4.5}/.github/workflows/build-test.yml +0 -0
  18. {floatcsep-0.4.3 → floatcsep-0.4.5}/.github/workflows/lockfile.yml +0 -0
  19. {floatcsep-0.4.3 → floatcsep-0.4.5}/.github/workflows/publish-pypi.yml +0 -0
  20. {floatcsep-0.4.3 → floatcsep-0.4.5}/.github/workflows/release-tutorials.yml +0 -0
  21. {floatcsep-0.4.3 → floatcsep-0.4.5}/.readthedocs.yaml +0 -0
  22. {floatcsep-0.4.3 → floatcsep-0.4.5}/CODE_OF_CONDUCT.md +0 -0
  23. {floatcsep-0.4.3 → floatcsep-0.4.5}/CONTRIBUTING.md +0 -0
  24. {floatcsep-0.4.3 → floatcsep-0.4.5}/CREDITS.md +0 -0
  25. {floatcsep-0.4.3 → floatcsep-0.4.5}/LICENSE +0 -0
  26. {floatcsep-0.4.3 → floatcsep-0.4.5}/MANIFEST.in +0 -0
  27. {floatcsep-0.4.3 → floatcsep-0.4.5}/conda-lock.yml +0 -0
  28. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/Makefile +0 -0
  29. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/_static/CSEP2_Logo_CMYK.png +0 -0
  30. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/_static/custom.js +0 -0
  31. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/_static/experiment_classes.png +0 -0
  32. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/_static/floatCSEP_Logo_CMYK.png +0 -0
  33. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/_static/float_scheme.png +0 -0
  34. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/_static/floatcsep_logo.svg +0 -0
  35. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/conf.py +0 -0
  36. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/guide/evaluation_config.rst +0 -0
  37. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/guide/executing_experiment.rst +0 -0
  38. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/guide/experiment_config.rst +0 -0
  39. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/guide/model_config.rst +0 -0
  40. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/guide/postprocess_config.rst +0 -0
  41. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/index.rst +0 -0
  42. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/intro/concepts.rst +0 -0
  43. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/intro/installation.rst +0 -0
  44. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/api_reference.rst +0 -0
  45. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/commands.rst +0 -0
  46. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/evaluation.rst +0 -0
  47. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/experiment.rst +0 -0
  48. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/infrastructure.rst +0 -0
  49. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/model.rst +0 -0
  50. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/postprocess.rst +0 -0
  51. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/reference/utilities.rst +0 -0
  52. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_a.rst +0 -0
  53. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_b.rst +0 -0
  54. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_c.rst +0 -0
  55. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_d.rst +0 -0
  56. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_e.rst +0 -0
  57. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_f.rst +0 -0
  58. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_g.rst +0 -0
  59. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_h.rst +0 -0
  60. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_i.rst +0 -0
  61. {floatcsep-0.4.3 → floatcsep-0.4.5}/docs/tutorials/case_j.rst +0 -0
  62. {floatcsep-0.4.3 → floatcsep-0.4.5}/environment.yml +0 -0
  63. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/__init__.py +0 -0
  64. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/commands/__init__.py +0 -0
  65. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/commands/main.py +0 -0
  66. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/evaluation.py +0 -0
  67. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/experiment.py +0 -0
  68. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/infrastructure/__init__.py +0 -0
  69. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/infrastructure/engine.py +0 -0
  70. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/infrastructure/environments.py +0 -0
  71. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/infrastructure/logger.py +0 -0
  72. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/infrastructure/registries.py +0 -0
  73. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/infrastructure/repositories.py +0 -0
  74. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/__init__.py +0 -0
  75. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/artifacts/NotoSans-Bold.ttf +0 -0
  76. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/artifacts/NotoSans-Regular.ttf +0 -0
  77. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/artifacts/csep_logo.png +0 -0
  78. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/artifacts/geoinquire_logo.png +0 -0
  79. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/artifacts/github_logo.png +0 -0
  80. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/artifacts/logo.png +0 -0
  81. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/artifacts/readthedocs_logo.png +0 -0
  82. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/__init__.py +0 -0
  83. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/app.py +0 -0
  84. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/layout.py +0 -0
  85. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/manifest.py +0 -0
  86. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/views/cats.py +0 -0
  87. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/views/exp.py +0 -0
  88. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/views/forecasts.py +0 -0
  89. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/views/results.py +0 -0
  90. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/panel/views/utils.py +0 -0
  91. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/plot_handler.py +0 -0
  92. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/postprocess/reporting.py +0 -0
  93. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/utils/__init__.py +0 -0
  94. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/utils/file_io.py +0 -0
  95. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep/utils/helpers.py +0 -0
  96. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep.egg-info/dependency_links.txt +0 -0
  97. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep.egg-info/entry_points.txt +0 -0
  98. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep.egg-info/not-zip-safe +0 -0
  99. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep.egg-info/requires.txt +0 -0
  100. {floatcsep-0.4.3 → floatcsep-0.4.5}/floatcsep.egg-info/top_level.txt +0 -0
  101. {floatcsep-0.4.3 → floatcsep-0.4.5}/pyproject.toml +0 -0
  102. {floatcsep-0.4.3 → floatcsep-0.4.5}/requirements.txt +0 -0
  103. {floatcsep-0.4.3 → floatcsep-0.4.5}/requirements_dev.txt +0 -0
  104. {floatcsep-0.4.3 → floatcsep-0.4.5}/setup.cfg +0 -0
  105. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/catalog.json +0 -0
  106. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/evaluations/tests_cfg.yml +0 -0
  107. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/gcmt/vcr_search.yaml +0 -0
  108. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/gcmt/vcr_summary.yaml +0 -0
  109. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/docker_test/invalid_entrypoint/Dockerfile +0 -0
  110. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/docker_test/invalid_image/Dockerfile +0 -0
  111. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/docker_test/invalid_no_entrypoint/Dockerfile +0 -0
  112. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/docker_test/invalid_permission/Dockerfile +0 -0
  113. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/docker_test/valid/Dockerfile +0 -0
  114. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/docker_test/valid_custom_uid-gid/Dockerfile +0 -0
  115. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/model.csv +0 -0
  116. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/model_cfg.yml +0 -0
  117. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/model_h5.hdf5 +0 -0
  118. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/qtree/TEAM=N10L11.csv +0 -0
  119. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/qtree/TEAM=N25L11.csv +0 -0
  120. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/td_model/forecasts/mock_2020-01-01_2020-01-02.csv +0 -0
  121. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/td_model/forecasts/mock_2020-01-02_2020-01-03.csv +0 -0
  122. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/td_model/input/args.txt +0 -0
  123. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/td_model/setup.cfg +0 -0
  124. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/Dockerfile +0 -0
  125. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/README.md +0 -0
  126. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/docs/userguide +0 -0
  127. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/examples/case_3/case3_run +0 -0
  128. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/examples/case_3/data/case3_catalog +0 -0
  129. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/forecasts/template_2023-01-01 +0 -0
  130. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/input/catalog +0 -0
  131. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/parameters +0 -0
  132. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/requirements +0 -0
  133. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/run +0 -0
  134. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/run_tests +0 -0
  135. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/setup +0 -0
  136. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/source/lib_a +0 -0
  137. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/source/lib_b +0 -0
  138. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/source/main +0 -0
  139. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/tests/test_liba +0 -0
  140. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/tests/test_libb +0 -0
  141. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/models/template/tests/test_main +0 -0
  142. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/regions/italy_midpoints +0 -0
  143. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/artifacts/regions/mock_region +0 -0
  144. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/e2e/test_data.py +0 -0
  145. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/integration/experiment typologies +0 -0
  146. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/integration/test_experiment_engine.py +0 -0
  147. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/integration/test_model_docker.py +0 -0
  148. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/integration/test_model_engine.py +0 -0
  149. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/integration/test_model_infrastructure.py +0 -0
  150. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_commands.py +0 -0
  151. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_engine.py +0 -0
  152. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_environments.py +0 -0
  153. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_evaluation.py +0 -0
  154. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_experiment.py +0 -0
  155. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_io.py +0 -0
  156. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_panel.py +0 -0
  157. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_plot_handler.py +0 -0
  158. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_registry.py +0 -0
  159. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_reporting.py +0 -0
  160. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_repositories.py +0 -0
  161. {floatcsep-0.4.3 → floatcsep-0.4.5}/tests/unit/test_utils.py +0 -0
  162. {floatcsep-0.4.3 → floatcsep-0.4.5}/tox.ini +0 -0
  163. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_a/best_model.dat +0 -0
  164. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_a/catalog.csep +0 -0
  165. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_a/config.yml +0 -0
  166. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_a/region.txt +0 -0
  167. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/catalog.json +0 -0
  168. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/config.yml +0 -0
  169. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/models/model_a.csv +0 -0
  170. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/models/model_b.csv +0 -0
  171. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/models/model_c.csv +0 -0
  172. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/models/model_d.csv +0 -0
  173. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/models.yml +0 -0
  174. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/region.txt +0 -0
  175. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_b/tests.yml +0 -0
  176. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/catalog.json +0 -0
  177. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/config.yml +0 -0
  178. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/models/model_a.csv +0 -0
  179. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/models/model_b.csv +0 -0
  180. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/models/model_c.csv +0 -0
  181. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/models/model_d.csv +0 -0
  182. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/models.yml +0 -0
  183. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/region.txt +0 -0
  184. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_c/tests.yml +0 -0
  185. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_d/config.yml +0 -0
  186. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_d/tests.yml +0 -0
  187. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_e/config.yml +0 -0
  188. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_e/models/gulia-wiemer.ALM.italy.10yr.2010-01-01.xml +0 -0
  189. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_e/models/meletti.MPS04.italy.10yr.2010-01-01.xml +0 -0
  190. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_e/models/zechar.TripleS-CPTI.italy.10yr.2010-01-01.xml +0 -0
  191. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_e/models.yml +0 -0
  192. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_e/tests.yml +0 -0
  193. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/catalog.json +0 -0
  194. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/config.yml +0 -0
  195. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/etas/forecasts/etas_2016-11-14_2016-11-15.csv +0 -0
  196. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/etas/forecasts/etas_2016-11-15_2016-11-16.csv +0 -0
  197. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/etas/forecasts/etas_2016-11-16_2016-11-17.csv +0 -0
  198. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/etas/forecasts/etas_2016-11-17_2016-11-18.csv +0 -0
  199. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/etas/forecasts/etas_2016-11-18_2016-11-19.csv +0 -0
  200. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/etas/forecasts/etas_2016-11-19_2016-11-20.csv +0 -0
  201. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/etas/forecasts/etas_2016-11-20_2016-11-21.csv +0 -0
  202. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/models.yml +0 -0
  203. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_f/tests.yml +0 -0
  204. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/catalog.csv +0 -0
  205. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/config.yml +0 -0
  206. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/custom_plot_script.py +0 -0
  207. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/models.yml +0 -0
  208. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/Dockerfile +0 -0
  209. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/README.md +0 -0
  210. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/input/args.txt +0 -0
  211. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/pymock/__init__.py +0 -0
  212. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/pymock/libs.py +0 -0
  213. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/pymock/main.py +0 -0
  214. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/pyproject.toml +0 -0
  215. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/requirements.txt +0 -0
  216. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/run.py +0 -0
  217. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/setup.cfg +0 -0
  218. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/pymock/setup.py +0 -0
  219. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_g/tests.yml +0 -0
  220. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_h/catalog.csv +0 -0
  221. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_h/config.yml +0 -0
  222. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_h/custom_report.py +0 -0
  223. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_h/models.yml +0 -0
  224. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_h/tests.yml +0 -0
  225. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/catalog.csv +0 -0
  226. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/config.yml +0 -0
  227. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/models.yml +0 -0
  228. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/README.md +0 -0
  229. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/input/args.txt +0 -0
  230. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/pymock/__init__.py +0 -0
  231. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/pymock/libs.py +0 -0
  232. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/pymock/main.py +0 -0
  233. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/pyproject.toml +0 -0
  234. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/requirements.txt +0 -0
  235. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/setup.cfg +0 -0
  236. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock/setup.py +0 -0
  237. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/README.md +0 -0
  238. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/input/args.txt +0 -0
  239. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/pymock/__init__.py +0 -0
  240. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/pymock/libs.py +0 -0
  241. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/pymock/main.py +0 -0
  242. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/pyproject.toml +0 -0
  243. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/requirements.txt +0 -0
  244. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/setup.cfg +0 -0
  245. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/pymock_slow/setup.py +0 -0
  246. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_i/tests.yml +0 -0
  247. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_j/catalog.csep +0 -0
  248. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_j/config.yml +0 -0
  249. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_j/models.yml +0 -0
  250. {floatcsep-0.4.3 → floatcsep-0.4.5}/tutorials/case_j/tests.yml +0 -0
@@ -0,0 +1,33 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use floatCSEP in your research, please cite the Zenodo release."
3
+ title: "floatCSEP: An application to deploy and conduct reproducible, prospective earthquake forecasting experiments"
4
+ type: software
5
+ license: "BSD-3-Clause"
6
+
7
+ repository-code: "https://github.com/cseptesting/floatcsep"
8
+ url: "https://floatcsep.readthedocs.io"
9
+
10
+ version: "0.3.0"
11
+ doi: "10.5281/zenodo.15576250"
12
+ publisher: "Zenodo"
13
+
14
+ authors:
15
+ - family-names: "Iturrieta"
16
+ given-names: "Pablo"
17
+ orcid: "https://orcid.org/0000-0002-4787-1343"
18
+ affiliation: "GFZ Helmholtz Centre for Geosciences, Potsdam, Germany"
19
+
20
+ - family-names: "Khawaja"
21
+ given-names: "Asim M."
22
+ orcid: "https://orcid.org/0000-0002-6196-4503"
23
+ affiliation: "GFZ Helmholtz Centre for Geosciences, Potsdam, Germany"
24
+
25
+ - family-names: "Savran"
26
+ given-names: "William H."
27
+ orcid: "https://orcid.org/0000-0001-5404-0778"
28
+ affiliation: "University of Nevada, Reno, United States"
29
+
30
+ - family-names: "Schorlemmer"
31
+ given-names: "Danijel"
32
+ orcid: "https://orcid.org/0000-0003-3969-1059"
33
+ affiliation: "GFZ Helmholtz Centre for Geosciences, Potsdam, Germany; Swiss Seismological Service at ETH Zürich, Zürich, Switzerland"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: floatcsep
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: CSEP Floating Experiment application
5
5
  Author-email: Pablo Iturrieta <pciturri@gfz-potsdam.de>
6
6
  License-Expression: BSD-3-Clause
@@ -51,7 +51,7 @@ Dynamic: license-file
51
51
 
52
52
  <img src="https://i.postimg.cc/6p5krRnB/float-CSEP-Logo-CMYK.png" width="320">
53
53
 
54
- **An application to deploy reproducible and prospective experiments of earthquake forecasting**
54
+ **An application to deploy and conduct reproducible, prospective earthquake forecasting experiments**
55
55
 
56
56
  <p left>
57
57
 
@@ -163,7 +163,13 @@ license. Please see
163
163
  the [license file](https://github.com/cseptesting/floatcsep/blob/main/LICENSE) for more
164
164
  information.
165
165
 
166
- ## Support
166
+ ## How to cite
167
+
168
+ If you use **floatCSEP** in your work, please cite it using the **“Cite this repository”** link on the right side of the GitHub page or with:
169
+
170
+ > Iturrieta, P., Khawaja, A. M., Savran, W. H., & Schorlemmer, D. (2025). floatCSEP: An application to deploy and conduct reproducible and prospective earthquake forecasting (Version 0.3.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.15576250
171
+
172
+ # Support
167
173
 
168
174
  | <img src="https://i.postimg.cc/rFKQ0vRL/GFZ-Wortbildmarke-EN-Helmholtzdunkelblau-RGB.png" alt="GFZ logo" height="50"/> | <img src="https://i.postimg.cc/CLc5tQcZ/Geo-INQUIRE-logo.png" alt="GeoInquire logo" height="72"/> | <img src="https://i.postimg.cc/tC1LdjYf/scec.png" alt="SCEC logo" height="90"/> |
169
175
  |:----------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------:|
@@ -2,7 +2,7 @@
2
2
 
3
3
  <img src="https://i.postimg.cc/6p5krRnB/float-CSEP-Logo-CMYK.png" width="320">
4
4
 
5
- **An application to deploy reproducible and prospective experiments of earthquake forecasting**
5
+ **An application to deploy and conduct reproducible, prospective earthquake forecasting experiments**
6
6
 
7
7
  <p left>
8
8
 
@@ -114,7 +114,13 @@ license. Please see
114
114
  the [license file](https://github.com/cseptesting/floatcsep/blob/main/LICENSE) for more
115
115
  information.
116
116
 
117
- ## Support
117
+ ## How to cite
118
+
119
+ If you use **floatCSEP** in your work, please cite it using the **“Cite this repository”** link on the right side of the GitHub page or with:
120
+
121
+ > Iturrieta, P., Khawaja, A. M., Savran, W. H., & Schorlemmer, D. (2025). floatCSEP: An application to deploy and conduct reproducible and prospective earthquake forecasting (Version 0.3.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.15576250
122
+
123
+ # Support
118
124
 
119
125
  | <img src="https://i.postimg.cc/rFKQ0vRL/GFZ-Wortbildmarke-EN-Helmholtzdunkelblau-RGB.png" alt="GFZ logo" height="50"/> | <img src="https://i.postimg.cc/CLc5tQcZ/Geo-INQUIRE-logo.png" alt="GeoInquire logo" height="72"/> | <img src="https://i.postimg.cc/tC1LdjYf/scec.png" alt="SCEC logo" height="90"/> |
120
126
  |:----------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------:|
@@ -196,10 +196,23 @@ class TimeIndependentModel(Model):
196
196
 
197
197
  os.makedirs(container, exist_ok=True)
198
198
 
199
+ if expected_file.exists() and expected_file.is_file() and not self.force_stage:
200
+ return
201
+
202
+ os.makedirs(container, exist_ok=True)
203
+
204
+ if expected_file.exists() and expected_file.is_file() and not self.force_stage:
205
+ return
206
+
199
207
  if self.giturl:
200
208
  from_git(self.giturl, str(container), branch=self.repo_hash, force=self.force_stage)
201
209
  elif self.zenodo_id:
202
- from_zenodo(self.zenodo_id, str(container), force=True)
210
+ from_zenodo(
211
+ self.zenodo_id,
212
+ str(container),
213
+ force=self.force_stage,
214
+ keys=[expected_file.name],
215
+ )
203
216
  else:
204
217
  pass
205
218
 
@@ -297,7 +310,13 @@ class TimeDependentModel(Model):
297
310
  and those to be generated, as well as input catalog and arguments file.
298
311
 
299
312
  """
300
- if self.force_stage or not self.registry.path.exists():
313
+ need_source = (
314
+ self.force_stage
315
+ or not self.registry.path.exists()
316
+ or (self.registry.path.is_dir() and not any(self.registry.path.iterdir()))
317
+ )
318
+
319
+ if need_source:
301
320
  os.makedirs(self.registry.dir, exist_ok=True)
302
321
  self.get_source(self.zenodo_id, self.giturl, branch=self.repo_hash)
303
322
 
@@ -338,7 +357,7 @@ class TimeDependentModel(Model):
338
357
  if self.giturl:
339
358
  from_git(self.giturl, target_dir.as_posix(), branch=self.repo_hash, force=False)
340
359
  elif self.zenodo_id:
341
- from_zenodo(self.zenodo_id, target_dir.as_posix(), force=True)
360
+ from_zenodo(self.zenodo_id, target_dir.as_posix(), force=self.force_stage)
342
361
  else:
343
362
  pass
344
363
 
@@ -0,0 +1,156 @@
1
+ import time
2
+ import git
3
+ import requests
4
+ import hashlib
5
+ import os
6
+ import shutil
7
+
8
+
9
+ def from_zenodo(record_id, folder, force=False, keys=None):
10
+ record_url = f"https://zenodo.org/api/records/{record_id}"
11
+ max_tries = 5
12
+
13
+ os.makedirs(folder, exist_ok=True)
14
+
15
+ for attempt in range(1, max_tries + 1):
16
+ r = requests.get(record_url, timeout=30, headers={"User-Agent": "floatcsep"})
17
+
18
+ if r.status_code == 200:
19
+ break
20
+
21
+ if r.status_code == 403:
22
+ text = (r.text or "").lower()
23
+ if "unusual traffic" in text or "<html" in text:
24
+ snippet = (r.text or "")[:400].replace("\n", "\\n")
25
+ raise RuntimeError(
26
+ "Zenodo returned HTTP 403 and appears to be blocking this network/IP due "
27
+ "to unusual traffic.\n"
28
+ f"URL: {record_url}\n"
29
+ f"Response snippet: {snippet}"
30
+ )
31
+ r.raise_for_status()
32
+
33
+ if r.status_code in (429, 500, 502, 503, 504):
34
+ wait = min(2 ** (attempt - 1), 30)
35
+ ra = r.headers.get("Retry-After")
36
+ if ra:
37
+ try:
38
+ wait = max(wait, int(ra))
39
+ except ValueError:
40
+ pass
41
+ time.sleep(wait)
42
+ continue
43
+
44
+ r.raise_for_status()
45
+ else:
46
+ raise RuntimeError(f"Zenodo API request failed after {max_tries} attempts: {record_url}")
47
+
48
+ try:
49
+ data = r.json()
50
+ except Exception as e:
51
+ snippet = (r.text or "")[:400].replace("\n", "\\n")
52
+ raise RuntimeError(
53
+ "Zenodo API did not return valid JSON.\n"
54
+ f"URL: {record_url}\n"
55
+ f"Content-Type: {r.headers.get('Content-Type')!r}\n"
56
+ f"Snippet: {snippet}"
57
+ ) from e
58
+
59
+ files = data.get("files", [])
60
+ if not isinstance(files, list):
61
+ raise RuntimeError(f"Zenodo record JSON missing expected 'files' list: {record_url}")
62
+
63
+ if keys is not None:
64
+ wanted = set(keys)
65
+ files = [f for f in files if f.get("key") in wanted]
66
+ missing = wanted - {f.get("key") for f in files}
67
+ if missing:
68
+ raise FileNotFoundError(
69
+ f"Zenodo record {record_id} does not contain required file(s): {sorted(missing)}"
70
+ )
71
+
72
+ download_urls = [f["links"]["self"] for f in files]
73
+ filenames = [(f["key"], f["checksum"]) for f in files]
74
+
75
+ for (fname, checksum), url in zip(filenames, download_urls):
76
+ full_path = os.path.join(folder, fname)
77
+
78
+ if os.path.exists(full_path):
79
+ value, digest = check_hash(full_path, checksum)
80
+ if value != digest:
81
+ print(f"Checksum differs, re-downloading {fname} ...")
82
+ download_file(url, full_path)
83
+ elif force:
84
+ print(f"Re-downloading {fname} ...")
85
+ download_file(url, full_path)
86
+ else:
87
+ print(f"Found {fname}. Checksum OK.")
88
+ else:
89
+ print(f"Downloading {fname} ...")
90
+ download_file(url, full_path)
91
+
92
+ value, digest = check_hash(full_path, checksum)
93
+ if value != digest:
94
+ raise Exception("Error: Checksum does not match")
95
+
96
+
97
+ def from_git(url, path, branch=None, depth=1, force=False, **kwargs):
98
+ kwargs = dict(kwargs, depth=depth)
99
+ git.refresh()
100
+
101
+ if os.path.exists(path):
102
+ if force:
103
+ shutil.rmtree(path)
104
+ elif os.listdir(path):
105
+ raise ValueError(f"Cannot clone into non-empty directory: {path}")
106
+
107
+ os.makedirs(path, exist_ok=True)
108
+
109
+ repo = git.Repo.clone_from(url, path, branch=branch, **kwargs)
110
+ git_dir = os.path.join(path, ".git")
111
+ if os.path.isdir(git_dir):
112
+ shutil.rmtree(git_dir)
113
+
114
+ return repo
115
+
116
+
117
+ def download_file(url: str, filename: str) -> None:
118
+ os.makedirs(os.path.dirname(filename) or ".", exist_ok=True)
119
+
120
+ r = requests.get(url, timeout=30, stream=True, headers={"User-Agent": "floatcsep"})
121
+ r.raise_for_status()
122
+
123
+ cl = r.headers.get("Content-Length") or r.headers.get("content-length")
124
+ try:
125
+ total_size = int(cl) if cl else 0
126
+ except ValueError:
127
+ total_size = 0
128
+
129
+ base = os.path.basename(filename)
130
+ if total_size:
131
+ print(f"{base} ({total_size / (1024 * 1024):.2f} MB)")
132
+ else:
133
+ print(f"{base}")
134
+
135
+ with open(filename, "wb") as f:
136
+ for data in r.iter_content(chunk_size=1024 * 64):
137
+ if not data:
138
+ continue
139
+ f.write(data)
140
+
141
+ print(f"Complete: {base}")
142
+
143
+
144
+ def check_hash(filename, checksum):
145
+ algorithm, value = checksum.split(":")
146
+ if not os.path.exists(filename):
147
+ return value, "invalid"
148
+ h = hashlib.new(algorithm)
149
+ with open(filename, "rb") as f:
150
+ while True:
151
+ data = f.read(4096)
152
+ if not data:
153
+ break
154
+ h.update(data)
155
+ digest = h.hexdigest()
156
+ return value, digest
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: floatcsep
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: CSEP Floating Experiment application
5
5
  Author-email: Pablo Iturrieta <pciturri@gfz-potsdam.de>
6
6
  License-Expression: BSD-3-Clause
@@ -51,7 +51,7 @@ Dynamic: license-file
51
51
 
52
52
  <img src="https://i.postimg.cc/6p5krRnB/float-CSEP-Logo-CMYK.png" width="320">
53
53
 
54
- **An application to deploy reproducible and prospective experiments of earthquake forecasting**
54
+ **An application to deploy and conduct reproducible, prospective earthquake forecasting experiments**
55
55
 
56
56
  <p left>
57
57
 
@@ -163,7 +163,13 @@ license. Please see
163
163
  the [license file](https://github.com/cseptesting/floatcsep/blob/main/LICENSE) for more
164
164
  information.
165
165
 
166
- ## Support
166
+ ## How to cite
167
+
168
+ If you use **floatCSEP** in your work, please cite it using the **“Cite this repository”** link on the right side of the GitHub page or with:
169
+
170
+ > Iturrieta, P., Khawaja, A. M., Savran, W. H., & Schorlemmer, D. (2025). floatCSEP: An application to deploy and conduct reproducible and prospective earthquake forecasting (Version 0.3.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.15576250
171
+
172
+ # Support
167
173
 
168
174
  | <img src="https://i.postimg.cc/rFKQ0vRL/GFZ-Wortbildmarke-EN-Helmholtzdunkelblau-RGB.png" alt="GFZ logo" height="50"/> | <img src="https://i.postimg.cc/CLc5tQcZ/Geo-INQUIRE-logo.png" alt="GeoInquire logo" height="72"/> | <img src="https://i.postimg.cc/tC1LdjYf/scec.png" alt="SCEC logo" height="90"/> |
169
175
  |:----------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------:|
@@ -1,4 +1,5 @@
1
1
  .readthedocs.yaml
2
+ CITATION.cff
2
3
  CODE_OF_CONDUCT.md
3
4
  CONTRIBUTING.md
4
5
  CREDITS.md
@@ -216,9 +216,7 @@ class TestModelFromZenodo(TestCase):
216
216
 
217
217
  model = self.init_model(name=name, model_path=path_, zenodo_id=13117711)
218
218
 
219
- with self.assertRaises(
220
- Exception
221
- ): # Mostly for FileNotFound, but connection errors can also arise
219
+ with self.assertRaises(FileNotFoundError):
222
220
  model.get_source()
223
221
 
224
222
  shutil.rmtree(dir_, ignore_errors=True)
@@ -88,7 +88,7 @@ class TestZenodoGetter(unittest.TestCase):
88
88
  self._assert_files_ok()
89
89
  return
90
90
  try:
91
- from_zenodo(4739912, zenodo_dir())
91
+ from_zenodo(4739912, zenodo_dir(), keys=["dummy.txt", "dummy.tar"])
92
92
  except Exception as e:
93
93
  self.skipTest(f"Zenodo flaky/unavailable: {e!r}")
94
94
 
@@ -283,7 +283,7 @@ class TestTimeDependentModel(TestModel):
283
283
  mock_from_zenodo.assert_called_once_with(
284
284
  self.model.zenodo_id,
285
285
  self.mock_registry_instance.path.as_posix(),
286
- force=True,
286
+ force=False,
287
287
  )
288
288
  mock_from_git.assert_not_called()
289
289
 
@@ -0,0 +1,14 @@
1
+ - TEAM:
2
+ zenodo_id: 6289795
3
+ path: models/team
4
+ flavours:
5
+ N10L11: TEAM=N10L11.csv
6
+ N25L11: TEAM=N25L11.csv
7
+ N50L11: TEAM=N50L11.csv
8
+ - WHEEL:
9
+ zenodo_id: 6255575
10
+ path: models/wheel
11
+ flavours:
12
+ N10L11: WHEEL=N10L11.csv
13
+ N25L11: WHEEL=N25L11.csv
14
+ N50L11: WHEEL=N50L11.csv
@@ -28,7 +28,7 @@ RUN python3 -m venv $VIRTUAL_ENV && pip install --upgrade pip setuptools wheel
28
28
  # Copy the repository from the local machine to the Docker container.
29
29
  ## *Only the needed folders/files for the model build*
30
30
  COPY --chown=$USER_UID:$USER_GID pymock/ ./pymock/
31
- COPY --chown=$USER_UID:$USER_GID setup.cfg run.py setup.py ./
31
+ COPY --chown=$USER_UID:$USER_GID setup.cfg setup.py ./
32
32
 
33
33
  # Install the pymock package.
34
34
  ## *Uses pip to install setup.cfg and requirements/instructions therein*
@@ -28,7 +28,7 @@ RUN python3 -m venv $VIRTUAL_ENV && pip install --upgrade pip setuptools wheel
28
28
  # Copy the repository from the local machine to the Docker container.
29
29
  ## *Only the needed folders/files for the model build*
30
30
  COPY --chown=$USER_UID:$USER_GID pymock/ ./pymock/
31
- COPY --chown=$USER_UID:$USER_GID setup.cfg run.py setup.py ./
31
+ COPY --chown=$USER_UID:$USER_GID setup.cfg setup.py ./
32
32
 
33
33
  # Install the pymock package.
34
34
  ## *Uses pip to install setup.cfg and requirements/instructions therein*
@@ -1,139 +0,0 @@
1
- import git
2
- import requests
3
- import hashlib
4
- import os
5
- import sys
6
- import shutil
7
-
8
-
9
- def from_zenodo(record_id, folder, force=False):
10
- """
11
- Download data from a Zenodo repository.
12
-
13
- Downloads if file does not exist, checksum has changed in local respect to url or force
14
-
15
- Args:
16
- record_id: corresponding to the Zenodo repository
17
- folder: where the repository files will be downloaded
18
- force: force download even if file exists and checksum passes
19
-
20
- Returns:
21
- """
22
- # Grab the urls and filenames and checksums
23
- r = requests.get(f"https://zenodo.org/api/records/{record_id}", timeout=30)
24
- download_urls = [f["links"]["self"] for f in r.json()["files"]]
25
- filenames = [(f["key"], f["checksum"]) for f in r.json()["files"]]
26
-
27
- # Download and verify checksums
28
- for (fname, checksum), url in zip(filenames, download_urls):
29
- full_path = os.path.join(folder, fname)
30
- if os.path.exists(full_path):
31
- value, digest = check_hash(full_path, checksum)
32
- if value != digest:
33
- print(f"Checksum is different: re-downloading {fname}" f" from Zenodo...")
34
- download_file(url, full_path)
35
- elif force:
36
- print(f"Re-downloading {fname} from Zenodo...")
37
- download_file(url, full_path)
38
- else:
39
- print(f"Found file {fname}. Checksum OK.")
40
-
41
- else:
42
- print(f"Downloading {fname} from Zenodo...")
43
- download_file(url, full_path)
44
- value, digest = check_hash(full_path, checksum)
45
- if value != digest:
46
- raise Exception("Error: Checksum does not match")
47
-
48
-
49
- def from_git(url, path, branch=None, depth=1, force=False, **kwargs):
50
- """
51
- Clones a shallow repository from a git url.
52
-
53
- Args:
54
- url (str): url of the repository
55
- path (str): path/folder where to clone the repo
56
- branch (str): repository's branch to clone (default: main)
57
- depth (int): depth history of commits
58
- force (bool): If True, deletes existing path before cloning
59
- **kwargs: keyword args passed to Repo.clone_from
60
-
61
- Returns:
62
- the pygit repository
63
- """
64
- kwargs = dict(kwargs, depth=depth)
65
- git.refresh()
66
-
67
- if os.path.exists(path):
68
- if force:
69
- shutil.rmtree(path)
70
- elif os.listdir(path):
71
- raise ValueError(f"Cannot clone into non-empty directory: {path}")
72
-
73
- os.makedirs(path, exist_ok=True)
74
-
75
- repo = git.Repo.clone_from(url, path, branch=branch, **kwargs)
76
- git_dir = os.path.join(path, ".git")
77
- if os.path.isdir(git_dir):
78
- shutil.rmtree(git_dir)
79
-
80
- return repo
81
-
82
-
83
- def download_file(url: str, filename: str) -> None:
84
- """
85
- Downloads files (from zenodo).
86
-
87
- Args:
88
- url (str): the url where the file is located
89
- filename (str): the filename required.
90
- """
91
- progress_bar_length = 72
92
- block_size = 1024
93
-
94
- r = requests.get(url, timeout=30, stream=True)
95
- total_size = r.headers.get("content-length", False)
96
- if not total_size:
97
- with requests.head(url, timeout=30) as h:
98
- try:
99
- total_size = int(h.headers.get("Content-Length", 0))
100
- except TypeError:
101
- total_size = 0
102
- else:
103
- total_size = int(total_size)
104
- download_size = 0
105
- if total_size:
106
- print(f"Downloading file with size of {total_size / block_size:.3f} kB")
107
- else:
108
- print("Downloading file with unknown size")
109
- with open(filename, "wb") as f:
110
- for data in r.iter_content(chunk_size=block_size):
111
- download_size += len(data)
112
- f.write(data)
113
- if total_size:
114
- progress = int(progress_bar_length * download_size / total_size)
115
- sys.stdout.write(
116
- "\r[{}{}] {:.1f}%".format(
117
- "█" * progress,
118
- "." * (progress_bar_length - progress),
119
- 100 * download_size / total_size,
120
- )
121
- )
122
- sys.stdout.flush()
123
- sys.stdout.write("\n")
124
-
125
-
126
- def check_hash(filename, checksum):
127
- """Checks if existing file hash matches checksum from url."""
128
- algorithm, value = checksum.split(":")
129
- if not os.path.exists(filename):
130
- return value, "invalid"
131
- h = hashlib.new(algorithm)
132
- with open(filename, "rb") as f:
133
- while True:
134
- data = f.read(4096)
135
- if not data:
136
- break
137
- h.update(data)
138
- digest = h.hexdigest()
139
- return value, digest
@@ -1,24 +0,0 @@
1
- - TEAM:
2
- zenodo_id: 6289795
3
- path: models/team
4
- flavours:
5
- N10L11: TEAM=N10L11.csv
6
- N25L11: TEAM=N25L11.csv
7
- N50L11: TEAM=N50L11.csv
8
- N100L11: TEAM=N100L11.csv
9
- SN10L11: TEAM=SN10L11.csv
10
- SN25L11: TEAM=SN25L11.csv
11
- SN50L11: TEAM=SN50L11.csv
12
- SN100L11: TEAM=SN100L11.csv
13
- - WHEEL:
14
- zenodo_id: 6255575
15
- path: models/wheel
16
- flavours:
17
- N10L11: WHEEL=N10L11.csv
18
- N25L11: WHEEL=N25L11.csv
19
- N50L11: WHEEL=N50L11.csv
20
- N100L11: WHEEL=N100L11.csv
21
- SN10L11: WHEEL=SN10L11.csv
22
- SN25L11: WHEEL=SN25L11.csv
23
- SN50L11: WHEEL=SN50L11.csv
24
- SN100L11: WHEEL=SN100L11.csv
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