PyStormTracker 0.4.2__tar.gz → 0.7.0__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 (220) hide show
  1. {pystormtracker-0.4.2 → pystormtracker-0.7.0}/.dockerignore +1 -2
  2. pystormtracker-0.7.0/.gitattributes +14 -0
  3. pystormtracker-0.7.0/.github/dependabot.yml +32 -0
  4. pystormtracker-0.7.0/.github/pull_request_template.md +17 -0
  5. pystormtracker-0.7.0/.github/workflows/ci.yml +522 -0
  6. pystormtracker-0.7.0/.github/workflows/dependency-review.yml +19 -0
  7. pystormtracker-0.7.0/.github/workflows/docker-build.yml +213 -0
  8. pystormtracker-0.7.0/.github/workflows/docker-publish.yml +167 -0
  9. pystormtracker-0.7.0/.github/workflows/python-publish.yml +123 -0
  10. {pystormtracker-0.4.2 → pystormtracker-0.7.0}/.gitignore +2 -1
  11. pystormtracker-0.7.0/.pre-commit-config.yaml +44 -0
  12. pystormtracker-0.7.0/.python-version +1 -0
  13. pystormtracker-0.7.0/.readthedocs.yaml +25 -0
  14. pystormtracker-0.7.0/.zenodo.json +36 -0
  15. pystormtracker-0.7.0/AGENTS.md +153 -0
  16. pystormtracker-0.7.0/CITATION.cff +108 -0
  17. pystormtracker-0.7.0/CONTRIBUTING.md +77 -0
  18. pystormtracker-0.7.0/Dockerfile +52 -0
  19. {pystormtracker-0.4.2 → pystormtracker-0.7.0}/LICENSE +1 -1
  20. pystormtracker-0.7.0/PKG-INFO +139 -0
  21. pystormtracker-0.7.0/README.md +86 -0
  22. pystormtracker-0.7.0/codecov.yml +20 -0
  23. pystormtracker-0.7.0/docs/_static/era5_msl_nh.png +0 -0
  24. pystormtracker-0.7.0/docs/_static/explorer.png +0 -0
  25. pystormtracker-0.7.0/docs/api.md +255 -0
  26. pystormtracker-0.7.0/docs/architecture.md +307 -0
  27. pystormtracker-0.7.0/docs/benchmark.md +71 -0
  28. pystormtracker-0.7.0/docs/changelog.md +228 -0
  29. pystormtracker-0.7.0/docs/cli.md +162 -0
  30. pystormtracker-0.7.0/docs/conf.py +88 -0
  31. pystormtracker-0.7.0/docs/development/testing.md +84 -0
  32. pystormtracker-0.7.0/docs/healpix.md +123 -0
  33. pystormtracker-0.7.0/docs/hodges.md +605 -0
  34. pystormtracker-0.7.0/docs/index.md +35 -0
  35. pystormtracker-0.7.0/docs/puppeteer-config.json +3 -0
  36. pystormtracker-0.7.0/docs/quickstart.md +248 -0
  37. pystormtracker-0.7.0/docs/readme.md +4 -0
  38. pystormtracker-0.7.0/docs/roadmap.md +338 -0
  39. pystormtracker-0.7.0/docs/trackjson.md +249 -0
  40. pystormtracker-0.7.0/pyproject.toml +188 -0
  41. pystormtracker-0.7.0/scripts/generate_trackjson_schema.py +53 -0
  42. pystormtracker-0.7.0/src/pystormtracker/__init__.py +27 -0
  43. pystormtracker-0.7.0/src/pystormtracker/backends.py +353 -0
  44. pystormtracker-0.7.0/src/pystormtracker/cli.py +113 -0
  45. pystormtracker-0.7.0/src/pystormtracker/compare.py +204 -0
  46. pystormtracker-0.7.0/src/pystormtracker/convert.py +114 -0
  47. pystormtracker-0.7.0/src/pystormtracker/healpix/__init__.py +6 -0
  48. pystormtracker-0.7.0/src/pystormtracker/healpix/constants.py +11 -0
  49. pystormtracker-0.7.0/src/pystormtracker/healpix/detector.py +561 -0
  50. pystormtracker-0.7.0/src/pystormtracker/healpix/tracker.py +740 -0
  51. pystormtracker-0.7.0/src/pystormtracker/hodges/__init__.py +3 -0
  52. pystormtracker-0.7.0/src/pystormtracker/hodges/constants.py +41 -0
  53. pystormtracker-0.7.0/src/pystormtracker/hodges/detections.py +117 -0
  54. pystormtracker-0.7.0/src/pystormtracker/hodges/detector.py +2091 -0
  55. pystormtracker-0.7.0/src/pystormtracker/hodges/linker.py +1228 -0
  56. pystormtracker-0.7.0/src/pystormtracker/hodges/mge.py +875 -0
  57. pystormtracker-0.7.0/src/pystormtracker/hodges/progress.py +394 -0
  58. pystormtracker-0.7.0/src/pystormtracker/hodges/rsplice.py +96 -0
  59. pystormtracker-0.7.0/src/pystormtracker/hodges/segments.py +360 -0
  60. pystormtracker-0.7.0/src/pystormtracker/hodges/tracker.py +1147 -0
  61. pystormtracker-0.7.0/src/pystormtracker/io/__init__.py +17 -0
  62. pystormtracker-0.7.0/src/pystormtracker/io/data_loader.py +511 -0
  63. pystormtracker-0.7.0/src/pystormtracker/io/format.py +166 -0
  64. pystormtracker-0.7.0/src/pystormtracker/io/imilast.py +116 -0
  65. pystormtracker-0.7.0/src/pystormtracker/io/track.py +250 -0
  66. pystormtracker-0.7.0/src/pystormtracker/io/trackjson.py +734 -0
  67. pystormtracker-0.7.0/src/pystormtracker/metrics/__init__.py +15 -0
  68. pystormtracker-0.7.0/src/pystormtracker/metrics/compare.py +1031 -0
  69. pystormtracker-0.7.0/src/pystormtracker/metrics/cross_validation.py +382 -0
  70. pystormtracker-0.7.0/src/pystormtracker/metrics/eulerian.py +165 -0
  71. pystormtracker-0.7.0/src/pystormtracker/metrics/lagrangian.py +602 -0
  72. pystormtracker-0.7.0/src/pystormtracker/metrics/weighting.py +75 -0
  73. pystormtracker-0.7.0/src/pystormtracker/models/__init__.py +24 -0
  74. pystormtracker-0.7.0/src/pystormtracker/models/_cftime.py +94 -0
  75. pystormtracker-0.7.0/src/pystormtracker/models/center.py +38 -0
  76. pystormtracker-0.7.0/src/pystormtracker/models/geo.py +235 -0
  77. pystormtracker-0.7.0/src/pystormtracker/models/time.py +396 -0
  78. pystormtracker-0.7.0/src/pystormtracker/models/tracker.py +42 -0
  79. pystormtracker-0.7.0/src/pystormtracker/models/tracks.py +759 -0
  80. pystormtracker-0.7.0/src/pystormtracker/models/units.py +129 -0
  81. pystormtracker-0.7.0/src/pystormtracker/preprocessing/__init__.py +14 -0
  82. pystormtracker-0.7.0/src/pystormtracker/preprocessing/kinematics.py +377 -0
  83. pystormtracker-0.7.0/src/pystormtracker/preprocessing/regrid.py +415 -0
  84. pystormtracker-0.7.0/src/pystormtracker/preprocessing/spectral.py +754 -0
  85. pystormtracker-0.7.0/src/pystormtracker/preprocessing/spherical_geometry.py +124 -0
  86. pystormtracker-0.7.0/src/pystormtracker/preprocessing/taper.py +113 -0
  87. pystormtracker-0.7.0/src/pystormtracker/preprocessing/tracking.py +354 -0
  88. pystormtracker-0.7.0/src/pystormtracker/refinement/__init__.py +39 -0
  89. pystormtracker-0.7.0/src/pystormtracker/refinement/bspline.py +2144 -0
  90. pystormtracker-0.7.0/src/pystormtracker/refinement/quadratic.py +925 -0
  91. pystormtracker-0.7.0/src/pystormtracker/sample.py +341 -0
  92. pystormtracker-0.7.0/src/pystormtracker/schemas/__init__.py +1 -0
  93. pystormtracker-0.7.0/src/pystormtracker/schemas/generate.py +30 -0
  94. pystormtracker-0.7.0/src/pystormtracker/schemas/trackjson.schema.json +499 -0
  95. pystormtracker-0.7.0/src/pystormtracker/simple/constants.py +14 -0
  96. pystormtracker-0.7.0/src/pystormtracker/simple/detector.py +510 -0
  97. pystormtracker-0.7.0/src/pystormtracker/simple/linker.py +212 -0
  98. pystormtracker-0.7.0/src/pystormtracker/simple/tracker.py +632 -0
  99. pystormtracker-0.7.0/src/pystormtracker/track.py +776 -0
  100. pystormtracker-0.7.0/src/pystormtracker/utils/cli.py +82 -0
  101. pystormtracker-0.7.0/src/pystormtracker/utils/docs.py +22 -0
  102. pystormtracker-0.7.0/src/pystormtracker/utils/logging.py +124 -0
  103. pystormtracker-0.7.0/tests/conftest.py +26 -0
  104. pystormtracker-0.7.0/tests/data/era5/era5_msl_2025-12_2.5x2.5.nc +0 -0
  105. pystormtracker-0.7.0/tests/data/ncl/era5_msl_2025-12-01_0000_2.5x2.5_t5-42.nc +0 -0
  106. pystormtracker-0.7.0/tests/integration/test_cli_extra.py +110 -0
  107. pystormtracker-0.7.0/tests/integration/test_hodges.py +112 -0
  108. pystormtracker-0.7.0/tests/integration/test_io.py +56 -0
  109. pystormtracker-0.7.0/tests/integration/test_parallel_backends.py +605 -0
  110. pystormtracker-0.7.0/tests/integration/test_projection.py +73 -0
  111. pystormtracker-0.7.0/tests/integration/test_reduced_gaussian.py +260 -0
  112. pystormtracker-0.7.0/tests/integration/test_simple.py +260 -0
  113. pystormtracker-0.7.0/tests/integration/test_trackjson.py +28 -0
  114. pystormtracker-0.7.0/tests/parity/__init__.py +0 -0
  115. pystormtracker-0.7.0/tests/parity/legacy/__init__.py +0 -0
  116. pystormtracker-0.7.0/tests/parity/legacy/test_simple_v0_0_2_parity.py +111 -0
  117. pystormtracker-0.7.0/tests/parity/ncl_spherepack/__init__.py +0 -0
  118. pystormtracker-0.7.0/tests/parity/ncl_spherepack/test_spectral_ncl.py +51 -0
  119. pystormtracker-0.7.0/tests/unit/__init__.py +0 -0
  120. pystormtracker-0.7.0/tests/unit/healpix/__init__.py +0 -0
  121. pystormtracker-0.7.0/tests/unit/healpix/test_detector.py +403 -0
  122. pystormtracker-0.7.0/tests/unit/healpix/test_tracker.py +44 -0
  123. pystormtracker-0.7.0/tests/unit/hodges/__init__.py +0 -0
  124. pystormtracker-0.7.0/tests/unit/hodges/test_detector.py +785 -0
  125. pystormtracker-0.7.0/tests/unit/hodges/test_linker.py +1063 -0
  126. pystormtracker-0.7.0/tests/unit/hodges/test_mge.py +175 -0
  127. pystormtracker-0.7.0/tests/unit/hodges/test_progress.py +172 -0
  128. pystormtracker-0.7.0/tests/unit/hodges/test_segments.py +102 -0
  129. pystormtracker-0.7.0/tests/unit/hodges/test_tracker.py +382 -0
  130. pystormtracker-0.7.0/tests/unit/io/__init__.py +0 -0
  131. pystormtracker-0.7.0/tests/unit/io/test_data_loader.py +222 -0
  132. pystormtracker-0.7.0/tests/unit/io/test_format.py +176 -0
  133. pystormtracker-0.7.0/tests/unit/io/test_imilast.py +39 -0
  134. pystormtracker-0.7.0/tests/unit/io/test_track.py +85 -0
  135. pystormtracker-0.7.0/tests/unit/io/test_trackjson.py +297 -0
  136. pystormtracker-0.7.0/tests/unit/metrics/test_cross_validation.py +289 -0
  137. pystormtracker-0.7.0/tests/unit/metrics/test_eulerian.py +79 -0
  138. pystormtracker-0.7.0/tests/unit/metrics/test_lagrangian.py +525 -0
  139. pystormtracker-0.7.0/tests/unit/metrics/test_rsplice.py +141 -0
  140. pystormtracker-0.7.0/tests/unit/metrics/test_weighting.py +54 -0
  141. pystormtracker-0.7.0/tests/unit/models/__init__.py +0 -0
  142. {pystormtracker-0.4.2/tests → pystormtracker-0.7.0/tests/unit/models}/test_center.py +5 -6
  143. pystormtracker-0.7.0/tests/unit/models/test_geo.py +95 -0
  144. pystormtracker-0.7.0/tests/unit/models/test_tracks.py +235 -0
  145. pystormtracker-0.7.0/tests/unit/models/test_units.py +53 -0
  146. pystormtracker-0.7.0/tests/unit/preprocessing/__init__.py +0 -0
  147. pystormtracker-0.7.0/tests/unit/preprocessing/test_kinematics.py +137 -0
  148. pystormtracker-0.7.0/tests/unit/preprocessing/test_regrid.py +205 -0
  149. pystormtracker-0.7.0/tests/unit/preprocessing/test_spectral.py +217 -0
  150. pystormtracker-0.7.0/tests/unit/refinement/test_bspline.py +991 -0
  151. pystormtracker-0.7.0/tests/unit/refinement/test_quadratic.py +357 -0
  152. pystormtracker-0.7.0/tests/unit/simple/__init__.py +0 -0
  153. pystormtracker-0.7.0/tests/unit/simple/test_detector.py +183 -0
  154. pystormtracker-0.7.0/tests/unit/simple/test_linker.py +219 -0
  155. pystormtracker-0.7.0/tests/unit/simple/test_tracker.py +86 -0
  156. pystormtracker-0.7.0/tests/unit/test_api.py +114 -0
  157. pystormtracker-0.7.0/tests/unit/test_backends.py +46 -0
  158. pystormtracker-0.7.0/tests/unit/test_cli.py +631 -0
  159. pystormtracker-0.7.0/tests/unit/test_compare.py +550 -0
  160. pystormtracker-0.7.0/tests/unit/test_convert.py +64 -0
  161. pystormtracker-0.7.0/tests/unit/test_observability.py +258 -0
  162. pystormtracker-0.7.0/tests/unit/test_preprocessing.py +207 -0
  163. pystormtracker-0.7.0/tests/unit/test_sample.py +230 -0
  164. pystormtracker-0.7.0/tests/unit/test_time.py +219 -0
  165. pystormtracker-0.7.0/tests/unit/test_track_cli.py +67 -0
  166. pystormtracker-0.7.0/tests/unit/test_utils.py +105 -0
  167. pystormtracker-0.7.0/tests/utils.py +176 -0
  168. pystormtracker-0.7.0/uv.lock +4575 -0
  169. pystormtracker-0.4.2/.github/dependabot.yml +0 -16
  170. pystormtracker-0.4.2/.github/workflows/ci.yml +0 -241
  171. pystormtracker-0.4.2/.github/workflows/docker-publish.yml +0 -123
  172. pystormtracker-0.4.2/.github/workflows/python-publish.yml +0 -91
  173. pystormtracker-0.4.2/.python-version +0 -1
  174. pystormtracker-0.4.2/.readthedocs.yaml +0 -22
  175. pystormtracker-0.4.2/ARCHITECTURE.md +0 -97
  176. pystormtracker-0.4.2/CITATION.cff +0 -53
  177. pystormtracker-0.4.2/Dockerfile +0 -55
  178. pystormtracker-0.4.2/PKG-INFO +0 -272
  179. pystormtracker-0.4.2/README.md +0 -226
  180. pystormtracker-0.4.2/ROADMAP.md +0 -45
  181. pystormtracker-0.4.2/codecov.yml +0 -13
  182. pystormtracker-0.4.2/data/test/tracks/era5_msl_2.5x2.5_v0.0.2_imilast.txt +0 -38464
  183. pystormtracker-0.4.2/data/test/tracks/era5_vo_2.5x2.5_1e-4_v0.0.2_imilast.txt +0 -38347
  184. pystormtracker-0.4.2/docs/architecture.md +0 -2
  185. pystormtracker-0.4.2/docs/benchmark.md +0 -2
  186. pystormtracker-0.4.2/docs/conf.py +0 -30
  187. pystormtracker-0.4.2/docs/index.md +0 -27
  188. pystormtracker-0.4.2/docs/readme.md +0 -2
  189. pystormtracker-0.4.2/docs/roadmap.md +0 -2
  190. pystormtracker-0.4.2/pyproject.toml +0 -149
  191. pystormtracker-0.4.2/src/pystormtracker/__init__.py +0 -20
  192. pystormtracker-0.4.2/src/pystormtracker/cli.py +0 -160
  193. pystormtracker-0.4.2/src/pystormtracker/hodges/tracker.py +0 -33
  194. pystormtracker-0.4.2/src/pystormtracker/io/imilast.py +0 -103
  195. pystormtracker-0.4.2/src/pystormtracker/io/loader.py +0 -72
  196. pystormtracker-0.4.2/src/pystormtracker/models/__init__.py +0 -5
  197. pystormtracker-0.4.2/src/pystormtracker/models/center.py +0 -56
  198. pystormtracker-0.4.2/src/pystormtracker/models/tracker.py +0 -27
  199. pystormtracker-0.4.2/src/pystormtracker/models/tracks.py +0 -428
  200. pystormtracker-0.4.2/src/pystormtracker/simple/concurrent.py +0 -132
  201. pystormtracker-0.4.2/src/pystormtracker/simple/detector.py +0 -266
  202. pystormtracker-0.4.2/src/pystormtracker/simple/kernels.py +0 -148
  203. pystormtracker-0.4.2/src/pystormtracker/simple/linker.py +0 -175
  204. pystormtracker-0.4.2/src/pystormtracker/simple/tracker.py +0 -132
  205. pystormtracker-0.4.2/src/pystormtracker/utils/benchmark.py +0 -52
  206. pystormtracker-0.4.2/src/pystormtracker/utils/data_utils.py +0 -88
  207. pystormtracker-0.4.2/tests/__init__.py +0 -1
  208. pystormtracker-0.4.2/tests/conftest.py +0 -43
  209. pystormtracker-0.4.2/tests/test_cli.py +0 -94
  210. pystormtracker-0.4.2/tests/test_integration.py +0 -299
  211. pystormtracker-0.4.2/tests/test_simple_detector.py +0 -52
  212. pystormtracker-0.4.2/tests/test_simple_linker.py +0 -32
  213. pystormtracker-0.4.2/tests/test_simple_tracker.py +0 -40
  214. pystormtracker-0.4.2/tests/test_tracks.py +0 -247
  215. pystormtracker-0.4.2/uv.lock +0 -2189
  216. {pystormtracker-0.4.2/docs → pystormtracker-0.7.0/docs/_static}/IntercomparisonProtocol.pdf +0 -0
  217. /pystormtracker-0.4.2/src/pystormtracker/hodges/__init__.py → /pystormtracker-0.7.0/src/pystormtracker/py.typed +0 -0
  218. {pystormtracker-0.4.2 → pystormtracker-0.7.0}/src/pystormtracker/simple/__init__.py +0 -0
  219. {pystormtracker-0.4.2/src/pystormtracker/io → pystormtracker-0.7.0/tests}/__init__.py +0 -0
  220. {pystormtracker-0.4.2/src/pystormtracker/utils → pystormtracker-0.7.0/tests/integration}/__init__.py +0 -0
@@ -8,8 +8,7 @@
8
8
  .venv/
9
9
  .vscode/
10
10
  __pycache__/
11
- benchmark/
12
- data/test/
11
+ benchmarks/
13
12
  docs/
14
13
  htmlcov/
15
14
  tests/
@@ -0,0 +1,14 @@
1
+ # Mark benchmarking code and data as documentation to focus on core logic
2
+ benchmark/* linguist-documentation
3
+
4
+ # Mark all documentation files (including static HTML) as documentation
5
+ docs/* linguist-documentation
6
+
7
+ # Mark example/test data files as documentation/vendored
8
+ data/* linguist-vendored
9
+ tests/data/* linguist-vendored
10
+
11
+ # Ensure lockfiles are marked as generated
12
+ uv.lock linguist-generated
13
+
14
+ # (Note: src/pystormtracker/templates/*.html are NOT marked, so they WILL count as source)
@@ -0,0 +1,32 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: uv
5
+ directory: /
6
+ schedule:
7
+ interval: daily
8
+ groups:
9
+ python-minor-and-patch:
10
+ patterns: ['*']
11
+ update-types: [minor, patch]
12
+
13
+ - package-ecosystem: pre-commit
14
+ directory: /
15
+ schedule:
16
+ interval: daily
17
+ groups:
18
+ pre-commit:
19
+ patterns: ['*']
20
+
21
+ - package-ecosystem: github-actions
22
+ directory: /
23
+ schedule:
24
+ interval: daily
25
+ groups:
26
+ github-actions:
27
+ patterns: ['*']
28
+
29
+ - package-ecosystem: docker
30
+ directory: /
31
+ schedule:
32
+ interval: daily
@@ -0,0 +1,17 @@
1
+ ## Summary
2
+
3
+ <!-- What changed, and the user or developer impact. -->
4
+
5
+ -
6
+
7
+ ## Why
8
+
9
+ <!-- Why this change is needed. For fixes, describe the root cause. -->
10
+
11
+ -
12
+
13
+ ## Validation
14
+
15
+ <!-- Commands, CI jobs, datasets, or manual checks used to verify the change. -->
16
+
17
+ - \[ \]
@@ -0,0 +1,522 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ tags:
9
+ - 'v*.*.*'
10
+ workflow_dispatch:
11
+
12
+ concurrency:
13
+ group: ci-${{ github.event.pull_request.number || github.ref }}
14
+ cancel-in-progress: ${{ github.ref_type != 'tag' }}
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ env:
20
+ UV_VERSION: '0.12.1'
21
+ PYTHON_VERSION: '3.14'
22
+
23
+ jobs:
24
+ select-test-matrix:
25
+ name: Select test matrix
26
+ runs-on: ubuntu-26.04
27
+ timeout-minutes: 5
28
+ outputs:
29
+ unit_matrix: ${{ steps.select.outputs.unit_matrix }}
30
+ integration_matrix: ${{ steps.select.outputs.integration_matrix }}
31
+ parity_matrix: ${{ steps.select.outputs.parity_matrix }}
32
+ uv_version: ${{ env.UV_VERSION }}
33
+ steps:
34
+ - name: Select representative or full matrix
35
+ id: select
36
+ run: |
37
+ set -euo pipefail
38
+
39
+ if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
40
+ UNIT_MATRIX='{
41
+ "include": [
42
+ {"os": "ubuntu-26.04", "python-version": "3.12", "mode": "min-deps"},
43
+ {"os": "ubuntu-26.04", "python-version": "3.14", "mode": "coverage", "coverage_flag": "unit"},
44
+ {"os": "ubuntu-26.04", "python-version": "3.14", "mode": "jit-coverage", "coverage_flag": "unit-jit-coverage"},
45
+ {"os": "ubuntu-26.04", "python-version": "3.14", "mode": "disabled-jit-coverage", "coverage_flag": "unit-jit-disabled"},
46
+ {"os": "windows-2025", "python-version": "3.13", "mode": "normal"},
47
+ {"os": "macos-26", "python-version": "3.14", "mode": "normal"}
48
+ ]
49
+ }'
50
+ INTEGRATION_MATRIX='{
51
+ "include": [
52
+ {"os": "ubuntu-26.04", "python-version": "3.14", "mpi": "mpich", "coverage": true}
53
+ ]
54
+ }'
55
+ PARITY_MATRIX='{
56
+ "include": [
57
+ {"os": "ubuntu-26.04", "python-version": "3.14", "coverage": true}
58
+ ]
59
+ }'
60
+ else
61
+ UNIT_MATRIX='{
62
+ "include": [
63
+ {"os": "ubuntu-26.04", "python-version": "3.12", "mode": "normal"},
64
+ {"os": "ubuntu-26.04", "python-version": "3.12", "mode": "min-deps"},
65
+ {"os": "ubuntu-26.04", "python-version": "3.13", "mode": "normal"},
66
+ {"os": "ubuntu-26.04", "python-version": "3.14", "mode": "coverage", "coverage_flag": "unit"},
67
+ {"os": "ubuntu-26.04", "python-version": "3.14", "mode": "jit-coverage", "coverage_flag": "unit-jit-coverage"},
68
+ {"os": "ubuntu-26.04", "python-version": "3.14", "mode": "disabled-jit-coverage", "coverage_flag": "unit-jit-disabled"},
69
+ {"os": "ubuntu-26.04", "python-version": "3.14t", "mode": "free-threaded"},
70
+ {"os": "windows-2025", "python-version": "3.13", "mode": "normal"},
71
+ {"os": "macos-26", "python-version": "3.14", "mode": "normal"}
72
+ ]
73
+ }'
74
+ INTEGRATION_MATRIX='{
75
+ "include": [
76
+ {"os": "ubuntu-26.04-arm", "python-version": "3.14", "mpi": "mpich", "coverage": false},
77
+ {"os": "ubuntu-24.04", "python-version": "3.14", "mpi": "mpich", "coverage": true},
78
+ {"os": "windows-2025", "python-version": "3.13", "mpi": "msmpi", "coverage": false},
79
+ {"os": "macos-26", "python-version": "3.14", "mpi": "mpich", "coverage": false}
80
+ ]
81
+ }'
82
+ PARITY_MATRIX='{
83
+ "include": [
84
+ {"os": "ubuntu-26.04", "python-version": "3.14", "coverage": true}
85
+ ]
86
+ }'
87
+ fi
88
+
89
+ {
90
+ echo "unit_matrix<<EOF"
91
+ echo "$UNIT_MATRIX"
92
+ echo "EOF"
93
+ echo "integration_matrix<<EOF"
94
+ echo "$INTEGRATION_MATRIX"
95
+ echo "EOF"
96
+ echo "parity_matrix<<EOF"
97
+ echo "$PARITY_MATRIX"
98
+ echo "EOF"
99
+ } >> "$GITHUB_OUTPUT"
100
+
101
+ code-quality:
102
+ name: Code quality checks
103
+ runs-on: ubuntu-26.04
104
+ timeout-minutes: 20
105
+ steps:
106
+ - uses: actions/checkout@v7.0.1
107
+ with:
108
+ persist-credentials: false
109
+
110
+ - name: Ruff lint
111
+ uses: astral-sh/ruff-action@v4.1.0
112
+ with:
113
+ args: check
114
+ version-file: uv.lock
115
+
116
+ - name: Ruff format
117
+ if: ${{ !cancelled() }}
118
+ uses: astral-sh/ruff-action@v4.1.0
119
+ with:
120
+ args: format --check
121
+ version-file: uv.lock
122
+
123
+ - name: Set up uv
124
+ if: ${{ !cancelled() }}
125
+ uses: astral-sh/setup-uv@v10.0.1
126
+ with:
127
+ version: ${{ env.UV_VERSION }}
128
+ enable-cache: true
129
+ python-version: ${{ env.PYTHON_VERSION }}
130
+
131
+ - name: Install type-checking environment
132
+ if: ${{ !cancelled() }}
133
+ run: uv sync --frozen --all-extras
134
+
135
+ - name: Check TrackJSON schema
136
+ if: ${{ !cancelled() }}
137
+ run: uv run --no-sync python scripts/generate_trackjson_schema.py --check
138
+
139
+ - name: Ty
140
+ if: ${{ !cancelled() }}
141
+ run: uv run --no-sync ty check
142
+
143
+ - name: Mypy
144
+ if: ${{ !cancelled() }}
145
+ run: uv run --no-sync mypy
146
+
147
+ unit-tests:
148
+ name: Unit tests (${{ matrix.os }}, Python ${{ matrix.python-version }}${{ matrix.mode != 'normal' && format(', {0}', matrix.mode) || '' }})
149
+ needs: [select-test-matrix, code-quality]
150
+ runs-on: ${{ matrix.os }}
151
+ timeout-minutes: 40
152
+ strategy:
153
+ fail-fast: false
154
+ matrix: ${{ fromJSON(needs.select-test-matrix.outputs.unit_matrix) }}
155
+ steps:
156
+ - uses: actions/checkout@v7.0.1
157
+ with:
158
+ persist-credentials: false
159
+
160
+ - uses: astral-sh/setup-uv@v10.0.1
161
+ with:
162
+ version: ${{ env.UV_VERSION }}
163
+ enable-cache: true
164
+ python-version: ${{ matrix.python-version }}
165
+
166
+ - name: Set up Microsoft MPI on Windows
167
+ if: runner.os == 'Windows'
168
+ uses: mpi4py/setup-mpi@v1.4.4
169
+ with:
170
+ mpi: msmpi
171
+
172
+ - name: Install dependencies
173
+ if: matrix.mode == 'normal' || matrix.mode == 'coverage' || matrix.mode == 'jit-coverage' || matrix.mode == 'disabled-jit-coverage'
174
+ run: uv sync --frozen --all-extras
175
+
176
+ - name: Install minimum direct dependencies
177
+ if: matrix.mode == 'min-deps'
178
+ run: uv sync --all-extras --resolution lowest-direct
179
+
180
+ - name: Install free-threaded dependencies (without EOF, GRIB, or Zarr)
181
+ if: matrix.mode == 'free-threaded'
182
+ run: uv sync --frozen --extra mpi --extra netcdf4
183
+
184
+ - name: Smoke-check GRIB and Zarr dependencies
185
+ if: matrix.mode != 'free-threaded'
186
+ run: |
187
+ uv run --no-sync python -m cfgrib selfcheck
188
+ uv run --no-sync python -c 'import zarr; print("zarr import success")'
189
+
190
+ - name: Run unit tests
191
+ if: matrix.mode == 'normal' || matrix.mode == 'min-deps'
192
+ run: uv run --no-sync pytest -vv
193
+
194
+ - name: Run unit tests with coverage
195
+ if: matrix.mode == 'coverage'
196
+ run: uv run --no-sync pytest -vv --cov=pystormtracker --cov-report=term-missing --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
197
+
198
+ - name: Run unit tests with JIT coverage
199
+ if: matrix.mode == 'jit-coverage'
200
+ env:
201
+ NUMBA_JIT_COVERAGE: '1'
202
+ NUMBA_CACHE_DIR: ${{ runner.temp }}/numba-coverage-cache
203
+ run: uv run --no-sync pytest -vv --cov=pystormtracker --cov-report=term-missing --cov-report=xml
204
+
205
+ - name: Run unit tests with JIT disabled coverage
206
+ if: matrix.mode == 'disabled-jit-coverage'
207
+ env:
208
+ NUMBA_DISABLE_JIT: '1'
209
+ run: uv run --no-sync pytest -vv --cov=pystormtracker --cov-report=term-missing --cov-report=xml
210
+
211
+ - name: Verify free-threaded Python
212
+ if: matrix.mode == 'free-threaded'
213
+ env:
214
+ PYTHON_GIL: '0'
215
+ run: uv run --no-sync python -c 'import sys; assert not sys._is_gil_enabled()'
216
+
217
+ - name: Run free-threaded unit tests
218
+ if: matrix.mode == 'free-threaded'
219
+ env:
220
+ PYTHON_GIL: '0'
221
+ run: uv run --no-sync pytest -vv
222
+
223
+ - name: Upload coverage
224
+ if: matrix.mode == 'coverage' || matrix.mode == 'jit-coverage' || matrix.mode == 'disabled-jit-coverage'
225
+ uses: codecov/codecov-action@v7.0.0
226
+ with:
227
+ files: ./coverage.xml
228
+ disable_search: true
229
+ flags: ${{ matrix.coverage_flag }}
230
+ fail_ci_if_error: false
231
+ token: ${{ secrets.CODECOV_TOKEN }}
232
+
233
+ - name: Upload test results
234
+ if: ${{ !cancelled() && matrix.mode == 'coverage' }}
235
+ uses: codecov/codecov-action@v7.0.0
236
+ with:
237
+ files: ./junit.xml
238
+ disable_search: true
239
+ report_type: test_results
240
+ flags: unit
241
+ token: ${{ secrets.CODECOV_TOKEN }}
242
+
243
+ integration-tests:
244
+ name: Integration tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
245
+ needs: [select-test-matrix, code-quality]
246
+ runs-on: ${{ matrix.os }}
247
+ timeout-minutes: 70
248
+ strategy:
249
+ fail-fast: false
250
+ matrix: ${{ fromJSON(needs.select-test-matrix.outputs.integration_matrix) }}
251
+ steps:
252
+ - uses: actions/checkout@v7.0.1
253
+ with:
254
+ persist-credentials: false
255
+
256
+ - uses: astral-sh/setup-uv@v10.0.1
257
+ with:
258
+ version: ${{ env.UV_VERSION }}
259
+ enable-cache: true
260
+ python-version: ${{ matrix.python-version }}
261
+
262
+ - name: Set up MPI
263
+ uses: mpi4py/setup-mpi@v1.4.4
264
+ with:
265
+ mpi: ${{ matrix.mpi }}
266
+
267
+ - name: Install dependencies
268
+ run: uv sync --frozen --all-extras
269
+
270
+ - name: Run integration tests with coverage
271
+ if: matrix.coverage == true
272
+ env:
273
+ NUMBA_JIT_COVERAGE: '1'
274
+ NUMBA_CACHE_DIR: ${{ runner.temp }}/numba-coverage-cache
275
+ run: uv run --no-sync pytest -vv --cov=pystormtracker --cov-report=term-missing --cov-report=xml --junitxml=junit.xml -o junit_family=legacy tests/integration/ -m "not slow and not data"
276
+
277
+ - name: Run integration tests
278
+ if: matrix.coverage == false
279
+ run: uv run --no-sync pytest -vv tests/integration/ -m "not slow and not data"
280
+
281
+ - name: Upload coverage
282
+ if: matrix.coverage == true
283
+ uses: codecov/codecov-action@v7.0.0
284
+ with:
285
+ files: ./coverage.xml
286
+ disable_search: true
287
+ flags: integration
288
+ fail_ci_if_error: false
289
+ token: ${{ secrets.CODECOV_TOKEN }}
290
+
291
+ - name: Upload test results
292
+ if: ${{ !cancelled() && matrix.coverage == true }}
293
+ uses: codecov/codecov-action@v7.0.0
294
+ with:
295
+ files: ./junit.xml
296
+ disable_search: true
297
+ report_type: test_results
298
+ flags: integration
299
+ token: ${{ secrets.CODECOV_TOKEN }}
300
+
301
+ parity-tests:
302
+ name: Parity tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
303
+ needs: [select-test-matrix, code-quality]
304
+ runs-on: ${{ matrix.os }}
305
+ timeout-minutes: 60
306
+ strategy:
307
+ fail-fast: false
308
+ matrix: ${{ fromJSON(needs.select-test-matrix.outputs.parity_matrix) }}
309
+ steps:
310
+ - uses: actions/checkout@v7.0.1
311
+ with:
312
+ persist-credentials: false
313
+
314
+ - uses: astral-sh/setup-uv@v10.0.1
315
+ with:
316
+ version: ${{ env.UV_VERSION }}
317
+ enable-cache: true
318
+ python-version: ${{ matrix.python-version }}
319
+
320
+ - name: Install dependencies
321
+ run: uv sync --frozen --all-extras
322
+
323
+ - name: Run parity tests with coverage
324
+ if: matrix.coverage == true
325
+ env:
326
+ NUMBA_JIT_COVERAGE: '1'
327
+ NUMBA_CACHE_DIR: ${{ runner.temp }}/numba-coverage-cache
328
+ run: uv run --no-sync pytest -vv --cov=pystormtracker --cov-report=term-missing --cov-report=xml --junitxml=junit.xml -o junit_family=legacy tests/parity/ -m "not slow and not data"
329
+
330
+ - name: Run parity tests
331
+ if: matrix.coverage == false
332
+ run: uv run --no-sync pytest -vv tests/parity/ -m "not slow and not data"
333
+
334
+ - name: Upload coverage
335
+ if: matrix.coverage == true
336
+ uses: codecov/codecov-action@v7.0.0
337
+ with:
338
+ files: ./coverage.xml
339
+ disable_search: true
340
+ flags: parity
341
+ fail_ci_if_error: false
342
+ token: ${{ secrets.CODECOV_TOKEN }}
343
+
344
+ - name: Upload test results
345
+ if: ${{ !cancelled() && matrix.coverage == true }}
346
+ uses: codecov/codecov-action@v7.0.0
347
+ with:
348
+ files: ./junit.xml
349
+ disable_search: true
350
+ report_type: test_results
351
+ flags: parity
352
+ token: ${{ secrets.CODECOV_TOKEN }}
353
+
354
+ package-tests:
355
+ name: Package tests
356
+ needs: code-quality
357
+ runs-on: ubuntu-26.04
358
+ timeout-minutes: 25
359
+ steps:
360
+ - uses: actions/checkout@v7.0.1
361
+ with:
362
+ persist-credentials: false
363
+
364
+ - uses: astral-sh/setup-uv@v10.0.1
365
+ with:
366
+ version: ${{ env.UV_VERSION }}
367
+ enable-cache: true
368
+ python-version: ${{ env.PYTHON_VERSION }}
369
+
370
+ - name: Build wheel and source distribution
371
+ run: uv build --wheel --sdist
372
+
373
+ - name: Create wheel test environment
374
+ run: uv venv --seed .wheel-venv
375
+
376
+ - name: Install wheel using pip
377
+ run: .wheel-venv/bin/python -m pip install --no-cache-dir dist/*.whl
378
+
379
+ - name: Test wheel import
380
+ run: .wheel-venv/bin/python -c 'import pystormtracker; print("wheel import success")'
381
+
382
+ - name: Test packaged TrackJSON schema
383
+ run: >-
384
+ .wheel-venv/bin/python -c
385
+ 'import json; from importlib.resources import files;
386
+ schema_bytes = files("pystormtracker.schemas").joinpath("trackjson.schema.json").read_bytes();
387
+ json.loads(schema_bytes); print("packaged TrackJSON schema is valid")'
388
+
389
+ - name: Test wheel CLI
390
+ run: .wheel-venv/bin/stormtracker --help
391
+
392
+ - name: Create source-distribution test environment
393
+ if: github.event_name != 'pull_request'
394
+ run: uv venv --seed .sdist-venv
395
+
396
+ - name: Install source distribution using pip
397
+ if: github.event_name != 'pull_request'
398
+ run: .sdist-venv/bin/python -m pip install --no-cache-dir dist/*.tar.gz
399
+
400
+ - name: Test source-distribution import
401
+ if: github.event_name != 'pull_request'
402
+ run: .sdist-venv/bin/python -c 'import pystormtracker; print("sdist import success")'
403
+
404
+ - name: Upload release distributions
405
+ uses: actions/upload-artifact@v7
406
+ with:
407
+ name: release-dists
408
+ path: dist/
409
+ if-no-files-found: error
410
+
411
+ docs:
412
+ name: Build documentation
413
+ runs-on: ubuntu-26.04
414
+ timeout-minutes: 20
415
+ steps:
416
+ - uses: actions/checkout@v7.0.1
417
+ with:
418
+ persist-credentials: false
419
+
420
+ - uses: astral-sh/setup-uv@v10.0.1
421
+ with:
422
+ version: ${{ env.UV_VERSION }}
423
+ enable-cache: true
424
+ python-version: ${{ env.PYTHON_VERSION }}
425
+
426
+ - name: Build documentation
427
+ run: uv run --no-dev --group docs sphinx-build -W --keep-going -b html docs docs/_build/html
428
+
429
+ docker-build:
430
+ name: Build and test Docker images
431
+ if: github.event_name != 'workflow_dispatch'
432
+ needs:
433
+ [select-test-matrix, code-quality, unit-tests, integration-tests, parity-tests, package-tests, docs]
434
+ uses: ./.github/workflows/docker-build.yml
435
+ with:
436
+ push_images: ${{ github.event_name != 'pull_request' }}
437
+ ref: ${{ github.sha }}
438
+ uv_version: ${{ needs.select-test-matrix.outputs.uv_version }}
439
+ secrets:
440
+ DOCKER_HUB_ACCESS_TOKEN: ${{ github.event_name != 'pull_request' && secrets.DOCKER_HUB_ACCESS_TOKEN || '' }}
441
+
442
+ release_tag:
443
+ name: Validate release tag
444
+ if: github.ref_type == 'tag'
445
+ needs: [code-quality, unit-tests, integration-tests, parity-tests, package-tests, docs]
446
+ runs-on: ubuntu-26.04
447
+ timeout-minutes: 10
448
+ outputs:
449
+ python_repository: ${{ steps.release.outputs.python_repository }}
450
+ version: ${{ steps.release.outputs.version }}
451
+ release_tag: ${{ steps.release.outputs.release_tag }}
452
+ docker_target: ${{ steps.release.outputs.docker_target }}
453
+ steps:
454
+ - uses: actions/checkout@v7.0.1
455
+ with:
456
+ fetch-depth: 0
457
+ persist-credentials: false
458
+
459
+ - name: Verify tag is reachable from main
460
+ run: |
461
+ git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
462
+ git merge-base --is-ancestor "$GITHUB_SHA" origin/main
463
+
464
+ - name: Validate release tag and package version
465
+ id: release
466
+ env:
467
+ TAG: ${{ github.ref_name }}
468
+ run: |
469
+ set -euo pipefail
470
+
471
+ VERSION="${TAG#v}"
472
+ PACKAGE_VERSION="$(sed -n 's/^version = "\([^"]*\)"/\1/p' pyproject.toml)"
473
+ test "$PACKAGE_VERSION" = "$VERSION"
474
+
475
+ if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
476
+ echo "python_repository=pypi" >> "$GITHUB_OUTPUT"
477
+ echo "docker_target=release" >> "$GITHUB_OUTPUT"
478
+ elif [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+$ ]]; then
479
+ echo "python_repository=testpypi" >> "$GITHUB_OUTPUT"
480
+ echo "docker_target=" >> "$GITHUB_OUTPUT"
481
+ else
482
+ echo "Unsupported version tag: $TAG" >&2
483
+ exit 1
484
+ fi
485
+
486
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
487
+ echo "release_tag=$TAG" >> "$GITHUB_OUTPUT"
488
+
489
+ publish-docker-edge:
490
+ name: Publish Docker edge image
491
+ if: github.ref == 'refs/heads/main'
492
+ needs: docker-build
493
+ permissions:
494
+ contents: read
495
+ packages: write
496
+ id-token: write
497
+ attestations: write
498
+ uses: ./.github/workflows/docker-publish.yml
499
+ with:
500
+ source_tag: ${{ needs.docker-build.outputs.source_tag }}
501
+ target: edge
502
+ secrets:
503
+ DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
504
+ GHCR_PAT: ${{ secrets.GHCR_PAT }}
505
+
506
+ publish-docker-release:
507
+ name: Publish Docker release image
508
+ if: github.ref_type == 'tag' && needs.release_tag.outputs.docker_target == 'release'
509
+ needs: [docker-build, release_tag]
510
+ permissions:
511
+ contents: read
512
+ packages: write
513
+ id-token: write
514
+ attestations: write
515
+ uses: ./.github/workflows/docker-publish.yml
516
+ with:
517
+ source_tag: ${{ needs.docker-build.outputs.source_tag }}
518
+ target: release
519
+ version: ${{ needs.release_tag.outputs.release_tag }}
520
+ secrets:
521
+ DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
522
+ GHCR_PAT: ${{ secrets.GHCR_PAT }}
@@ -0,0 +1,19 @@
1
+ name: 'Dependency Review'
2
+ on: [pull_request]
3
+
4
+ permissions:
5
+ contents: read
6
+
7
+ jobs:
8
+ dependency-review:
9
+ name: Dependency review
10
+ runs-on: ubuntu-26.04
11
+ timeout-minutes: 10
12
+ steps:
13
+ - uses: actions/checkout@v7.0.1
14
+ with:
15
+ persist-credentials: false
16
+
17
+ - uses: actions/dependency-review-action@v5.0.0
18
+ with:
19
+ fail-on-severity: high