hypra 0.2.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 (308) hide show
  1. hypra-0.2.0/.github/ISSUE_TEMPLATE/release-tracker.md +31 -0
  2. hypra-0.2.0/.github/release-drafter.yml +14 -0
  3. hypra-0.2.0/.github/workflows/docs.yml +66 -0
  4. hypra-0.2.0/.github/workflows/python.yml +27 -0
  5. hypra-0.2.0/.github/workflows/quality.yml +29 -0
  6. hypra-0.2.0/.github/workflows/release-drafter.yml +158 -0
  7. hypra-0.2.0/.github/workflows/release.yml +96 -0
  8. hypra-0.2.0/.gitignore +14 -0
  9. hypra-0.2.0/.python-version +1 -0
  10. hypra-0.2.0/Makefile +74 -0
  11. hypra-0.2.0/PKG-INFO +224 -0
  12. hypra-0.2.0/README.md +210 -0
  13. hypra-0.2.0/docs/acceptance-results.tex +3 -0
  14. hypra-0.2.0/docs/api-examples.md +127 -0
  15. hypra-0.2.0/docs/architecture.md +34 -0
  16. hypra-0.2.0/docs/assets/katex/LICENSE +21 -0
  17. hypra-0.2.0/docs/assets/katex/README.txt +3 -0
  18. hypra-0.2.0/docs/assets/katex/auto-render.min.js +1 -0
  19. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
  20. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  21. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  22. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  23. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  24. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  25. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  26. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  27. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  28. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  29. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  30. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  31. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  32. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  33. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  34. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
  35. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  36. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  37. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  38. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  39. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  40. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
  41. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  42. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  43. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
  44. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  45. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  46. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  47. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  48. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  49. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
  50. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  51. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  52. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  53. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  54. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  55. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  56. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  57. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  58. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  59. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  60. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  61. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
  62. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  63. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  64. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
  65. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  66. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  67. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
  68. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  69. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  70. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
  71. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  72. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  73. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
  74. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  75. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  76. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  77. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  78. hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  79. hypra-0.2.0/docs/assets/katex/katex.min.css +1 -0
  80. hypra-0.2.0/docs/assets/katex/katex.min.js +1 -0
  81. hypra-0.2.0/docs/assets/math.js +24 -0
  82. hypra-0.2.0/docs/assets/mermaid/LICENSE +21 -0
  83. hypra-0.2.0/docs/assets/mermaid/SOURCE.json +54 -0
  84. hypra-0.2.0/docs/assets/mermaid/Tableau10-558cc280.js +9 -0
  85. hypra-0.2.0/docs/assets/mermaid/arc-dd975067.js +86 -0
  86. hypra-0.2.0/docs/assets/mermaid/array-2ff2c7a6.js +6 -0
  87. hypra-0.2.0/docs/assets/mermaid/blockDiagram-7a6ce1a3.js +1230 -0
  88. hypra-0.2.0/docs/assets/mermaid/c4Diagram-0d3c50f5.js +1579 -0
  89. hypra-0.2.0/docs/assets/mermaid/channel-bc508e47.js +5 -0
  90. hypra-0.2.0/docs/assets/mermaid/classDiagram-6b63e9c6.js +220 -0
  91. hypra-0.2.0/docs/assets/mermaid/classDiagram-v2-1c1d2b5d.js +206 -0
  92. hypra-0.2.0/docs/assets/mermaid/clone-b6975030.js +8 -0
  93. hypra-0.2.0/docs/assets/mermaid/createText-908267de.js +2969 -0
  94. hypra-0.2.0/docs/assets/mermaid/edges-d4a9e74e.js +1088 -0
  95. hypra-0.2.0/docs/assets/mermaid/erDiagram-73c1690c.js +931 -0
  96. hypra-0.2.0/docs/assets/mermaid/flowDb-2e5ba0d2.js +1126 -0
  97. hypra-0.2.0/docs/assets/mermaid/flowDiagram-26723173.js +797 -0
  98. hypra-0.2.0/docs/assets/mermaid/flowDiagram-v2-832d9543.js +25 -0
  99. hypra-0.2.0/docs/assets/mermaid/flowchart-elk-definition-798c25aa.js +48407 -0
  100. hypra-0.2.0/docs/assets/mermaid/ganttDiagram-d2633790.js +2501 -0
  101. hypra-0.2.0/docs/assets/mermaid/gitGraphDiagram-3a2cacc7.js +1264 -0
  102. hypra-0.2.0/docs/assets/mermaid/graph-0f379662.js +881 -0
  103. hypra-0.2.0/docs/assets/mermaid/index-7a48438c.js +373 -0
  104. hypra-0.2.0/docs/assets/mermaid/infoDiagram-574f1153.js +319 -0
  105. hypra-0.2.0/docs/assets/mermaid/init-f9637058.js +16 -0
  106. hypra-0.2.0/docs/assets/mermaid/journeyDiagram-d228b7dc.js +804 -0
  107. hypra-0.2.0/docs/assets/mermaid/katex-fa3848e8.js +11646 -0
  108. hypra-0.2.0/docs/assets/mermaid/layout-67fde652.js +1536 -0
  109. hypra-0.2.0/docs/assets/mermaid/line-6e74982d.js +34 -0
  110. hypra-0.2.0/docs/assets/mermaid/linear-483c1a28.js +447 -0
  111. hypra-0.2.0/docs/assets/mermaid/mermaid-e07dac3d.js +8135 -0
  112. hypra-0.2.0/docs/assets/mermaid/mermaid.esm.min.mjs +4 -0
  113. hypra-0.2.0/docs/assets/mermaid/mindmap-definition-f3352918.js +18760 -0
  114. hypra-0.2.0/docs/assets/mermaid/ordinal-5695958c.js +65 -0
  115. hypra-0.2.0/docs/assets/mermaid/path-428ebac9.js +91 -0
  116. hypra-0.2.0/docs/assets/mermaid/pieDiagram-9a5c7b29.js +502 -0
  117. hypra-0.2.0/docs/assets/mermaid/quadrantDiagram-15ed5e80.js +904 -0
  118. hypra-0.2.0/docs/assets/mermaid/requirementDiagram-9f95ab38.js +769 -0
  119. hypra-0.2.0/docs/assets/mermaid/sankeyDiagram-3e8fe5d5.js +818 -0
  120. hypra-0.2.0/docs/assets/mermaid/sequenceDiagram-8ab39a46.js +2234 -0
  121. hypra-0.2.0/docs/assets/mermaid/stateDiagram-c3dc8f69.js +275 -0
  122. hypra-0.2.0/docs/assets/mermaid/stateDiagram-v2-9273d11c.js +190 -0
  123. hypra-0.2.0/docs/assets/mermaid/styles-434cae6b.js +960 -0
  124. hypra-0.2.0/docs/assets/mermaid/styles-b514864b.js +436 -0
  125. hypra-0.2.0/docs/assets/mermaid/styles-edde81da.js +1089 -0
  126. hypra-0.2.0/docs/assets/mermaid/svgDrawCommon-f84b32fd.js +64 -0
  127. hypra-0.2.0/docs/assets/mermaid/timeline-definition-01cbd2c6.js +795 -0
  128. hypra-0.2.0/docs/assets/mermaid/xychartDiagram-c5d0386c.js +1284 -0
  129. hypra-0.2.0/docs/cli-reference.md +11 -0
  130. hypra-0.2.0/docs/docs-maintenance.md +72 -0
  131. hypra-0.2.0/docs/endpoints.md +210 -0
  132. hypra-0.2.0/docs/half-system.md +159 -0
  133. hypra-0.2.0/docs/hpl-alternating-endpoints.md +82 -0
  134. hypra-0.2.0/docs/hpl-at-i.md +49 -0
  135. hypra-0.2.0/docs/hpl-binary-maps.md +55 -0
  136. hypra-0.2.0/docs/hpl-boundary-numerics.md +58 -0
  137. hypra-0.2.0/docs/hpl-classical-binary-three.md +29 -0
  138. hypra-0.2.0/docs/hpl-classical-mixed-three.md +48 -0
  139. hypra-0.2.0/docs/hpl-classical-negative-three.md +40 -0
  140. hypra-0.2.0/docs/hpl-classical-ternary-three.md +48 -0
  141. hypra-0.2.0/docs/hpl-constant-numerics.md +73 -0
  142. hypra-0.2.0/docs/hpl-continuation.md +85 -0
  143. hypra-0.2.0/docs/hpl-endpoints.md +106 -0
  144. hypra-0.2.0/docs/hpl-inversion.md +52 -0
  145. hypra-0.2.0/docs/hpl-mobius.md +38 -0
  146. hypra-0.2.0/docs/hpl-near-one-series.md +101 -0
  147. hypra-0.2.0/docs/hpl-notation.md +16 -0
  148. hypra-0.2.0/docs/hpl-numerics.md +138 -0
  149. hypra-0.2.0/docs/hpl-real-continuation.md +41 -0
  150. hypra-0.2.0/docs/hpl-reduction.md +41 -0
  151. hypra-0.2.0/docs/hpl-regularization.md +105 -0
  152. hypra-0.2.0/docs/hpl-stuffle.md +34 -0
  153. hypra-0.2.0/docs/hpl-taylor.md +42 -0
  154. hypra-0.2.0/docs/hpl-transforms.md +74 -0
  155. hypra-0.2.0/docs/index.md +53 -0
  156. hypra-0.2.0/docs/integer-port.md +214 -0
  157. hypra-0.2.0/docs/latex-and-docs.md +61 -0
  158. hypra-0.2.0/docs/mathematics.md +403 -0
  159. hypra-0.2.0/docs/mathematics.pdf +0 -0
  160. hypra-0.2.0/docs/mathematics.tex +559 -0
  161. hypra-0.2.0/docs/nielsen-polylogarithms.md +71 -0
  162. hypra-0.2.0/docs/parity-map.md +102 -0
  163. hypra-0.2.0/docs/protocol.md +24 -0
  164. hypra-0.2.0/docs/python-api.md +235 -0
  165. hypra-0.2.0/docs/release-drafter.md +73 -0
  166. hypra-0.2.0/docs/releasing.md +92 -0
  167. hypra-0.2.0/docs/roadmap.md +51 -0
  168. hypra-0.2.0/docs/scope.md +139 -0
  169. hypra-0.2.0/docs/setup.md +99 -0
  170. hypra-0.2.0/docs/upstream-source-manifest.json +435 -0
  171. hypra-0.2.0/docs/upstream-source.md +139 -0
  172. hypra-0.2.0/examples/gamma_q_request.json +135 -0
  173. hypra-0.2.0/examples/gamma_q_result.json +658 -0
  174. hypra-0.2.0/examples/gamma_q_result.tex +4 -0
  175. hypra-0.2.0/examples/ported_examples.py +133 -0
  176. hypra-0.2.0/properdocs.yml +108 -0
  177. hypra-0.2.0/pyproject.toml +79 -0
  178. hypra-0.2.0/reports/initial-validation/README.md +6 -0
  179. hypra-0.2.0/reports/initial-validation/validation.json +39 -0
  180. hypra-0.2.0/reports/initial-validation/validation.tex +4 -0
  181. hypra-0.2.0/reports/native-validation/validation.json +1651 -0
  182. hypra-0.2.0/reports/native-validation/validation.tex +4 -0
  183. hypra-0.2.0/scripts/check_docs_build.py +104 -0
  184. hypra-0.2.0/scripts/test_release_drafter.cjs +21 -0
  185. hypra-0.2.0/scripts/validate.py +120 -0
  186. hypra-0.2.0/scripts/validate_integral.py +158 -0
  187. hypra-0.2.0/src/hypra/__init__.py +163 -0
  188. hypra-0.2.0/src/hypra/__main__.py +6 -0
  189. hypra-0.2.0/src/hypra/_json.py +21 -0
  190. hypra-0.2.0/src/hypra/_typing.py +21 -0
  191. hypra-0.2.0/src/hypra/api.py +328 -0
  192. hypra-0.2.0/src/hypra/backend.py +321 -0
  193. hypra-0.2.0/src/hypra/cli/__init__.py +6 -0
  194. hypra-0.2.0/src/hypra/cli/application.py +45 -0
  195. hypra-0.2.0/src/hypra/cli/commands.py +96 -0
  196. hypra-0.2.0/src/hypra/cli/request.py +35 -0
  197. hypra-0.2.0/src/hypra/config.py +82 -0
  198. hypra-0.2.0/src/hypra/errors.py +13 -0
  199. hypra-0.2.0/src/hypra/hpl/__init__.py +1 -0
  200. hypra-0.2.0/src/hypra/hpl/algebra.py +459 -0
  201. hypra-0.2.0/src/hypra/hpl/alternating.py +105 -0
  202. hypra-0.2.0/src/hypra/hpl/arguments.py +79 -0
  203. hypra-0.2.0/src/hypra/hpl/boundary_numeric.py +139 -0
  204. hypra-0.2.0/src/hypra/hpl/classical.py +151 -0
  205. hypra-0.2.0/src/hypra/hpl/constants.py +171 -0
  206. hypra-0.2.0/src/hypra/hpl/endpoints.py +171 -0
  207. hypra-0.2.0/src/hypra/hpl/inversion.py +62 -0
  208. hypra-0.2.0/src/hypra/hpl/limits.py +105 -0
  209. hypra-0.2.0/src/hypra/hpl/maps.py +98 -0
  210. hypra-0.2.0/src/hypra/hpl/mobius.py +56 -0
  211. hypra-0.2.0/src/hypra/hpl/named_constants.py +50 -0
  212. hypra-0.2.0/src/hypra/hpl/notation.py +129 -0
  213. hypra-0.2.0/src/hypra/hpl/numeric.py +303 -0
  214. hypra-0.2.0/src/hypra/hpl/radial_continuation.py +173 -0
  215. hypra-0.2.0/src/hypra/hpl/real_continuation.py +75 -0
  216. hypra-0.2.0/src/hypra/hpl/reduction.py +140 -0
  217. hypra-0.2.0/src/hypra/hpl/regularization.py +171 -0
  218. hypra-0.2.0/src/hypra/hpl/series_one.py +67 -0
  219. hypra-0.2.0/src/hypra/hpl/special.py +49 -0
  220. hypra-0.2.0/src/hypra/hpl/stuffle.py +106 -0
  221. hypra-0.2.0/src/hypra/hpl/taylor.py +55 -0
  222. hypra-0.2.0/src/hypra/hpl/transforms.py +95 -0
  223. hypra-0.2.0/src/hypra/hypexp_integrals.py +201 -0
  224. hypra-0.2.0/src/hypra/native/__init__.py +6 -0
  225. hypra-0.2.0/src/hypra/native/atom.py +220 -0
  226. hypra-0.2.0/src/hypra/native/backend.py +292 -0
  227. hypra-0.2.0/src/hypra/native/canonical.py +55 -0
  228. hypra-0.2.0/src/hypra/native/colored_sums.py +275 -0
  229. hypra-0.2.0/src/hypra/native/contiguous.py +404 -0
  230. hypra-0.2.0/src/hypra/native/endpoints.py +263 -0
  231. hypra-0.2.0/src/hypra/native/half_system.py +148 -0
  232. hypra-0.2.0/src/hypra/native/integer.py +189 -0
  233. hypra-0.2.0/src/hypra/native/matched_half.py +127 -0
  234. hypra-0.2.0/src/hypra/native/nested_sums.py +281 -0
  235. hypra-0.2.0/src/hypra/native/planning.py +265 -0
  236. hypra-0.2.0/src/hypra/native/twof1_shift.py +130 -0
  237. hypra-0.2.0/src/hypra/native/unit_limit.py +119 -0
  238. hypra-0.2.0/src/hypra/native/worker.py +69 -0
  239. hypra-0.2.0/src/hypra/nielsen.py +153 -0
  240. hypra-0.2.0/src/hypra/py.typed +0 -0
  241. hypra-0.2.0/src/hypra/serialization.py +302 -0
  242. hypra-0.2.0/src/hypra/symbolic.py +451 -0
  243. hypra-0.2.0/src/hypra/wolfram_bridge.wls +171 -0
  244. hypra-0.2.0/tests/__init__.py +0 -0
  245. hypra-0.2.0/tests/integration/__init__.py +0 -0
  246. hypra-0.2.0/tests/integration/native/__init__.py +0 -0
  247. hypra-0.2.0/tests/integration/native/test_complex_expansion.py +62 -0
  248. hypra-0.2.0/tests/integration/native/test_exceptional_parameters.py +81 -0
  249. hypra-0.2.0/tests/integration/native/test_hypergeometric_endpoints.py +53 -0
  250. hypra-0.2.0/tests/integration/native/test_integer_native.py +183 -0
  251. hypra-0.2.0/tests/integration/native/test_native.py +161 -0
  252. hypra-0.2.0/tests/integration/native/test_native_timeout.py +26 -0
  253. hypra-0.2.0/tests/integration/native/test_symbolic_slopes.py +106 -0
  254. hypra-0.2.0/tests/integration/native/test_unit_hyper.py +197 -0
  255. hypra-0.2.0/tests/integration/test_cli.py +91 -0
  256. hypra-0.2.0/tests/integration/test_mathematics.py +126 -0
  257. hypra-0.2.0/tests/integration/test_ported_examples.py +44 -0
  258. hypra-0.2.0/tests/integration/wolfram/__init__.py +0 -0
  259. hypra-0.2.0/tests/integration/wolfram/test_backend.py +281 -0
  260. hypra-0.2.0/tests/integration/wolfram/test_real_backend.py +69 -0
  261. hypra-0.2.0/tests/unit/__init__.py +0 -0
  262. hypra-0.2.0/tests/unit/hpl/__init__.py +0 -0
  263. hypra-0.2.0/tests/unit/hpl/test_height_one_mzv.py +28 -0
  264. hypra-0.2.0/tests/unit/hpl/test_hpl_algebra.py +148 -0
  265. hypra-0.2.0/tests/unit/hpl/test_hpl_alternating.py +101 -0
  266. hypra-0.2.0/tests/unit/hpl/test_hpl_arguments.py +28 -0
  267. hypra-0.2.0/tests/unit/hpl/test_hpl_boundary_numeric.py +78 -0
  268. hypra-0.2.0/tests/unit/hpl/test_hpl_classical.py +126 -0
  269. hypra-0.2.0/tests/unit/hpl/test_hpl_constants.py +84 -0
  270. hypra-0.2.0/tests/unit/hpl/test_hpl_constants_independent.py +46 -0
  271. hypra-0.2.0/tests/unit/hpl/test_hpl_continuation.py +54 -0
  272. hypra-0.2.0/tests/unit/hpl/test_hpl_continue.py +64 -0
  273. hypra-0.2.0/tests/unit/hpl/test_hpl_endpoints.py +134 -0
  274. hypra-0.2.0/tests/unit/hpl/test_hpl_inversion.py +48 -0
  275. hypra-0.2.0/tests/unit/hpl/test_hpl_limits.py +20 -0
  276. hypra-0.2.0/tests/unit/hpl/test_hpl_maps.py +60 -0
  277. hypra-0.2.0/tests/unit/hpl/test_hpl_mobius.py +51 -0
  278. hypra-0.2.0/tests/unit/hpl/test_hpl_notation.py +39 -0
  279. hypra-0.2.0/tests/unit/hpl/test_hpl_numeric.py +188 -0
  280. hypra-0.2.0/tests/unit/hpl/test_hpl_primitive.py +29 -0
  281. hypra-0.2.0/tests/unit/hpl/test_hpl_reduce.py +60 -0
  282. hypra-0.2.0/tests/unit/hpl/test_hpl_regularized.py +94 -0
  283. hypra-0.2.0/tests/unit/hpl/test_hpl_series_one.py +67 -0
  284. hypra-0.2.0/tests/unit/hpl/test_hpl_special_i.py +52 -0
  285. hypra-0.2.0/tests/unit/hpl/test_hpl_stuffle.py +46 -0
  286. hypra-0.2.0/tests/unit/hpl/test_hpl_taylor.py +40 -0
  287. hypra-0.2.0/tests/unit/hpl/test_hpl_ternary_limits.py +34 -0
  288. hypra-0.2.0/tests/unit/hpl/test_hpl_transform.py +74 -0
  289. hypra-0.2.0/tests/unit/hpl/test_lyndon_exact.py +46 -0
  290. hypra-0.2.0/tests/unit/native/__init__.py +0 -0
  291. hypra-0.2.0/tests/unit/native/pochhammer.py +23 -0
  292. hypra-0.2.0/tests/unit/native/test_all_half_system.py +51 -0
  293. hypra-0.2.0/tests/unit/native/test_colored_sums.py +216 -0
  294. hypra-0.2.0/tests/unit/native/test_contiguous.py +118 -0
  295. hypra-0.2.0/tests/unit/native/test_endpoints.py +72 -0
  296. hypra-0.2.0/tests/unit/native/test_half_system.py +94 -0
  297. hypra-0.2.0/tests/unit/native/test_integer_shift_math.py +152 -0
  298. hypra-0.2.0/tests/unit/native/test_nested_sums.py +192 -0
  299. hypra-0.2.0/tests/unit/symbolic/__init__.py +0 -0
  300. hypra-0.2.0/tests/unit/symbolic/test_hpl_evalf.py +44 -0
  301. hypra-0.2.0/tests/unit/symbolic/test_hpl_nseries.py +63 -0
  302. hypra-0.2.0/tests/unit/symbolic/test_symbolic_input.py +23 -0
  303. hypra-0.2.0/tests/unit/symbolic/test_symbolic_native.py +66 -0
  304. hypra-0.2.0/tests/unit/test_api.py +165 -0
  305. hypra-0.2.0/tests/unit/test_hypexp_integrals.py +101 -0
  306. hypra-0.2.0/tests/unit/test_nielsen.py +63 -0
  307. hypra-0.2.0/tests/unit/test_serialization.py +154 -0
  308. hypra-0.2.0/uv.lock +1198 -0
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Release tracker
3
+ about: Track release readiness, approval, and publication for one Hypra version.
4
+ title: "Release tracker for v"
5
+ ---
6
+
7
+ ### Release target
8
+
9
+ - Version and tag:
10
+ - Scope and known limitations:
11
+ - GitHub release draft:
12
+ - Tag validation run:
13
+
14
+ ### Before publication
15
+
16
+ - [ ] Confirm the release scope, package version, and prerelease status. If the tag already exists, verify its commit and keep the tag fixed.
17
+ - [ ] Verify that validation passed for the exact release tag.
18
+ - [ ] Confirm the project's license and distribution policy for this release. Inspect the wheel and source distribution for restricted HypExp/HPL sources or tables.
19
+ - [ ] Review the release notes, distribution files, and checksums in the GitHub draft.
20
+ - [ ] Verify that the PyPI Trusted Publisher matches this repository, `release.yml`, and the `pypi` environment.
21
+ - [ ] Verify that the GitHub `pypi` environment has a required reviewer.
22
+
23
+ ### Publication
24
+
25
+ - [ ] Publish the GitHub release with the intended prerelease status. Record the public release link.
26
+ - [ ] Record the automatic workflow run and obtain `pypi` environment approval. For tags with the earlier workflow, dispatch the run on the version tag with `publish=true`.
27
+ - [ ] Verify the version and both distributions on PyPI. Record the PyPI link.
28
+
29
+ ### Blockers and evidence
30
+
31
+ <!-- Link decisions, validation results, and publication approvals here. -->
@@ -0,0 +1,14 @@
1
+ # PEP 440 alpha; the workflow never changes this existing tag or publishes it.
2
+ name-template: 'Hypra v0.1.0a0'
3
+ tag-template: 'v0.1.0a0'
4
+ prerelease: true
5
+ latest: false
6
+ commitish: 'e1c13fc82a9077720a6b27350a5729993e772a83'
7
+ change-template: '- $TITLE (#$NUMBER)'
8
+ change-title-escapes: '\\<*_&#@`'
9
+ no-changes-template: '- No merged pull requests were identified for this comparison. Direct commits are not a complete PR changelog.'
10
+ template: |
11
+ <!-- release-drafter:start -->
12
+ ## Changes
13
+ $CHANGES
14
+ <!-- release-drafter:end -->
@@ -0,0 +1,66 @@
1
+ name: Build and deploy documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: docs-${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ docs:
18
+ runs-on: ubuntu-latest
19
+ timeout-minutes: 10
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: astral-sh/setup-uv@v6
23
+ with:
24
+ enable-cache: true
25
+ python-version: '3.15'
26
+ - name: Check draft-note preservation guards
27
+ run: node scripts/test_release_drafter.cjs
28
+ - name: Install locked documentation dependencies
29
+ run: uv sync --locked --group docs
30
+ - name: Build strict offline-capable documentation
31
+ env:
32
+ HYPRA_SITE_URL: https://lalmei.github.io/hypra/
33
+ run: uv run --no-sync properdocs build --strict
34
+ - name: Check local rendering assets and generated reference pages
35
+ run: uv run --no-sync python scripts/check_docs_build.py
36
+ - name: Upload documentation for review
37
+ uses: actions/upload-artifact@v4
38
+ with:
39
+ name: hypra-documentation
40
+ path: site/
41
+ if-no-files-found: error
42
+ retention-days: 14
43
+ - name: Upload GitHub Pages artifact
44
+ if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
45
+ uses: actions/upload-pages-artifact@v3
46
+ with:
47
+ path: site/
48
+
49
+ deploy:
50
+ if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
51
+ needs: docs
52
+ runs-on: ubuntu-latest
53
+ timeout-minutes: 10
54
+ permissions:
55
+ pages: write
56
+ id-token: write
57
+ environment:
58
+ name: github-pages
59
+ url: ${{ steps.deployment.outputs.page_url }}
60
+ concurrency:
61
+ group: github-pages
62
+ cancel-in-progress: false
63
+ steps:
64
+ - name: Deploy GitHub Pages
65
+ id: deployment
66
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,27 @@
1
+ name: Python checks
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 30
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ['3.12', '3.13', '3.14', '3.15']
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: astral-sh/setup-uv@v6
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ enable-cache: true
26
+ - run: uv sync --locked --no-default-groups --group dev --python "${{ matrix.python-version }}"
27
+ - run: uv run --no-sync --python "${{ matrix.python-version }}" pytest -q -m 'not real_backend'
@@ -0,0 +1,29 @@
1
+ name: Python quality
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ quality:
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 10
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: astral-sh/setup-uv@v6
19
+ with:
20
+ python-version: '3.15'
21
+ enable-cache: true
22
+ - name: Install locked quality tools
23
+ run: uv sync --locked --no-default-groups --group quality
24
+ - name: Check formatting
25
+ run: uv run --no-sync ruff format --check src tests examples scripts
26
+ - name: Check lint
27
+ run: uv run --no-sync ruff check .
28
+ - name: Check types
29
+ run: uv run --no-sync pyright --pythonpath .venv/bin/python
@@ -0,0 +1,158 @@
1
+ name: Preview draft release notes
2
+
3
+ # Manual only; read-only preview by default. Applying edits requires explicit opt-in.
4
+ on:
5
+ workflow_dispatch:
6
+ inputs:
7
+ apply:
8
+ description: 'Update only the generated region in the existing draft after tag-ancestry checks'
9
+ type: boolean
10
+ default: false
11
+ required: true
12
+
13
+ permissions:
14
+ contents: read
15
+ pull-requests: read
16
+
17
+ concurrency:
18
+ group: release-drafter-preview-v0.1.0a0
19
+ cancel-in-progress: false
20
+
21
+ jobs:
22
+ preview:
23
+ runs-on: ubuntu-latest
24
+ timeout-minutes: 10
25
+ outputs:
26
+ body: ${{ steps.drafter.outputs.body }}
27
+ release_id: ${{ steps.snapshot.outputs.release_id }}
28
+ updated_at: ${{ steps.snapshot.outputs.updated_at }}
29
+ body_hash: ${{ steps.snapshot.outputs.body_hash }}
30
+ steps:
31
+ - name: Snapshot the existing draft and immutable tag
32
+ id: snapshot
33
+ uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
34
+ with:
35
+ script: |
36
+ const {data: commit} = await github.rest.repos.getCommit({
37
+ ...context.repo, ref: 'v0.1.0a0'
38
+ });
39
+ if (commit.sha !== 'e1c13fc82a9077720a6b27350a5729993e772a83') {
40
+ throw new Error('The release tag no longer matches the approved immutable commit.');
41
+ }
42
+ const releases = await github.paginate(github.rest.repos.listReleases, context.repo);
43
+ const matches = releases.filter(r => r.tag_name === 'v0.1.0a0');
44
+ if (matches.length !== 1 || !matches[0].draft) throw new Error('Require one existing, unpublished alpha draft');
45
+ const release = matches[0];
46
+ const hash = require('crypto').createHash('sha256').update(release.body || '').digest('hex');
47
+ core.setOutput('release_id', String(release.id));
48
+ core.setOutput('updated_at', release.updated_at);
49
+ core.setOutput('body_hash', hash);
50
+ - name: Generate a proposal without modifying any release
51
+ id: drafter
52
+ uses: release-drafter/release-drafter@978bb0b30c5ee8cdd332ced253758157150d43f0 # v7.10.0
53
+ with:
54
+ config-name: release-drafter.yml
55
+ dry-run: true
56
+ publish: false
57
+ latest: false
58
+ prerelease: true
59
+ # Internal SemVer input only; the actual tag/name stay PEP 440.
60
+ version: '0.1.0-alpha.0'
61
+ tag: 'v0.1.0a0'
62
+ name: 'Hypra 0.1.0a0'
63
+ commitish: 'e1c13fc82a9077720a6b27350a5729993e772a83'
64
+ env:
65
+ GITHUB_TOKEN: ${{ github.token }}
66
+ - name: Save the proposed notes as data
67
+ env:
68
+ PROPOSED_NOTES: ${{ steps.drafter.outputs.body }}
69
+ run: |
70
+ python - <<'PY'
71
+ import os
72
+ from pathlib import Path
73
+ body = os.environ.get('PROPOSED_NOTES', '')
74
+ if not body.strip():
75
+ raise SystemExit('Release Drafter returned no preview body')
76
+ Path('release-notes-preview.md').write_text(body, encoding='utf-8')
77
+ with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as summary:
78
+ summary.write('Preview generated for immutable v0.1.0a0. '
79
+ 'Download the artifact for review. No release notes, '
80
+ 'assets, tags or publication state were changed.\n')
81
+ PY
82
+ - name: Upload review artifact only
83
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
84
+ with:
85
+ name: release-notes-preview-v0.1.0a0
86
+ path: release-notes-preview.md
87
+ if-no-files-found: error
88
+ retention-days: 14
89
+
90
+ apply:
91
+ if: inputs.apply
92
+ needs: preview
93
+ runs-on: ubuntu-latest
94
+ timeout-minutes: 10
95
+ permissions:
96
+ contents: write
97
+ pull-requests: read
98
+ steps:
99
+ - name: Filter by immutable tag ancestry and preserve curated notes
100
+ uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
101
+ env:
102
+ PROPOSED_NOTES: ${{ needs.preview.outputs.body }}
103
+ RELEASE_ID: ${{ needs.preview.outputs.release_id }}
104
+ SNAPSHOT_UPDATED_AT: ${{ needs.preview.outputs.updated_at }}
105
+ SNAPSHOT_BODY_HASH: ${{ needs.preview.outputs.body_hash }}
106
+ with:
107
+ script: |
108
+ const tag = 'v0.1.0a0';
109
+ const sha = 'e1c13fc82a9077720a6b27350a5729993e772a83';
110
+ const start = '<!-- release-drafter:start -->';
111
+ const end = '<!-- release-drafter:end -->';
112
+ const hash = text => require('crypto').createHash('sha256').update(text).digest('hex');
113
+ const {data: tagged} = await github.rest.repos.getCommit({...context.repo, ref: tag});
114
+ if (tagged.sha !== sha) throw new Error('Immutable tag moved; refusing update');
115
+ const proposal = process.env.PROPOSED_NOTES;
116
+ if (proposal.split(start).length !== 2 || proposal.split(end).length !== 2 || proposal.indexOf(start) >= proposal.indexOf(end)) {
117
+ throw new Error('Generated proposal has invalid or extra delimiter markers');
118
+ }
119
+ const accepted = [], seen = new Set();
120
+ for (const line of proposal.split(/\r?\n/)) {
121
+ if (!line.startsWith('- ')) continue;
122
+ if (line === '- No merged pull requests were identified for this comparison. Direct commits are not a complete PR changelog.') continue;
123
+ const match = line.match(/^- (.+) \(#([0-9]+)\)$/);
124
+ if (!match) throw new Error('Malformed generated PR entry; refusing update');
125
+ const number = Number(match[2]);
126
+ if (seen.has(number)) continue;
127
+ seen.add(number);
128
+ const {data: pr} = await github.rest.pulls.get({...context.repo, pull_number: number});
129
+ if (!pr.merged || !pr.merge_commit_sha) throw new Error('Unmerged generated PR entry');
130
+ const {data: comparison} = await github.rest.repos.compareCommitsWithBasehead({
131
+ ...context.repo, basehead: `${pr.merge_commit_sha}...${sha}`
132
+ });
133
+ if (!['ahead', 'identical'].includes(comparison.status)) continue;
134
+ // Never splice PR content into executable code; titles are escaped Markdown data.
135
+ if (pr.title.includes(start) || pr.title.includes(end)) throw new Error('PR title contains a reserved delimiter');
136
+ const title = pr.title.replace(/[\\`*_{}\[\]<>#@&]/g, character => '\\' + character).replace(/[\r\n]/g, ' ');
137
+ accepted.push(`- ${title} (#${number})`);
138
+ }
139
+ const release_id = Number(process.env.RELEASE_ID);
140
+ const {data: current} = await github.rest.repos.getRelease({...context.repo, release_id});
141
+ const body = current.body || '';
142
+ if (!current.draft || current.tag_name !== tag || current.updated_at !== process.env.SNAPSHOT_UPDATED_AT || hash(body) !== process.env.SNAPSHOT_BODY_HASH) {
143
+ throw new Error('Draft changed while generating notes; rerun instead of overwriting');
144
+ }
145
+ if (body.split(start).length !== 2 || body.split(end).length !== 2 || body.indexOf(start) >= body.indexOf(end)) {
146
+ throw new Error('Require exactly one ordered reserved notes region');
147
+ }
148
+ const {data: finalTag} = await github.rest.repos.getCommit({...context.repo, ref: tag});
149
+ if (finalTag.sha !== sha) throw new Error('Tag changed during validation');
150
+ const prefix = body.slice(0, body.indexOf(start) + start.length);
151
+ const suffix = body.slice(body.indexOf(end));
152
+ const notes = accepted.length ? accepted.join('\n') : '- No merged PR entries verified in this immutable tag; see the curated release overview.';
153
+ const replacement = `${prefix}\n## Changes\n${notes}\n${suffix}`;
154
+ if (replacement !== body) {
155
+ // Only body is PATCHed: no draft/publication, asset, tag or target fields.
156
+ await github.rest.repos.updateRelease({...context.repo, release_id, body: replacement});
157
+ }
158
+ await core.summary.addRaw(`Updated only the reserved notes region with ${accepted.length} ancestry-verified PR entries. Draft status, curated notes and assets were not changed.`).write();
@@ -0,0 +1,96 @@
1
+ name: Validate and publish Python release
2
+
3
+ on:
4
+ push:
5
+ tags: ['v*']
6
+ release:
7
+ types: [published]
8
+ workflow_dispatch:
9
+ inputs:
10
+ publish:
11
+ description: 'Publish the selected version tag to production PyPI (requires protected pypi environment approval)'
12
+ type: boolean
13
+ required: true
14
+ default: false
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ concurrency:
20
+ group: pypi-${{ github.ref }}-${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish) }}
21
+ cancel-in-progress: false
22
+
23
+ jobs:
24
+ validate:
25
+ runs-on: ubuntu-latest
26
+ timeout-minutes: 30
27
+ steps:
28
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
29
+ - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
30
+ with:
31
+ python-version: '3.15'
32
+ enable-cache: true
33
+ - name: Verify version tag
34
+ if: github.ref_type == 'tag'
35
+ run: |
36
+ python - <<'PY'
37
+ import os, tomllib
38
+ with open('pyproject.toml', 'rb') as stream:
39
+ version = tomllib.load(stream)['project']['version']
40
+ if os.environ['GITHUB_REF_NAME'] != 'v' + version:
41
+ raise SystemExit('Tag must exactly match v + project.version')
42
+ PY
43
+ - run: uv sync --locked --no-default-groups --group dev
44
+ - run: uv run --no-sync pytest -q -m 'not real_backend'
45
+ - name: Build wheel and source distribution
46
+ run: uv build --out-dir dist
47
+ - name: Validate package metadata
48
+ run: uvx --from twine==7.0.0 twine check --strict dist/*
49
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
50
+ with:
51
+ name: python-distributions
52
+ path: dist/*
53
+ if-no-files-found: error
54
+ retention-days: 14
55
+
56
+ publication-gate:
57
+ if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish)
58
+ needs: validate
59
+ runs-on: ubuntu-latest
60
+ timeout-minutes: 5
61
+ steps:
62
+ - name: Require version tag and existing reviewer-protected environment
63
+ env:
64
+ GH_TOKEN: ${{ github.token }}
65
+ run: |
66
+ test "$GITHUB_REF_TYPE" = tag || { echo 'Select a version tag, not a branch'; exit 1; }
67
+ gh api "repos/$GITHUB_REPOSITORY/environments/pypi" > environment.json
68
+ python - <<'PY'
69
+ import json
70
+ with open('environment.json') as stream:
71
+ environment = json.load(stream)
72
+ rules = environment.get('protection_rules', [])
73
+ if not any(r.get('type') == 'required_reviewers' and r.get('reviewers') for r in rules):
74
+ raise SystemExit('An existing pypi environment with required reviewers is mandatory')
75
+ PY
76
+
77
+ publish:
78
+ needs: [validate, publication-gate]
79
+ runs-on: ubuntu-latest
80
+ timeout-minutes: 10
81
+ permissions:
82
+ id-token: write
83
+ environment:
84
+ name: pypi
85
+ url: https://pypi.org/project/hypra/
86
+ steps:
87
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
88
+ with:
89
+ name: python-distributions
90
+ path: dist/
91
+ - name: Publish approved distributions
92
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
93
+ with:
94
+ packages-dir: dist/
95
+ skip-existing: false
96
+ attestations: true
hypra-0.2.0/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ *.py[cod]
6
+ dist/
7
+ *.egg-info/
8
+ .DS_Store
9
+
10
+ reference/
11
+
12
+ site/
13
+
14
+ .agents/
@@ -0,0 +1 @@
1
+ 3.15
hypra-0.2.0/Makefile ADDED
@@ -0,0 +1,74 @@
1
+ UV ?= uv
2
+ PYTHON_RUN = $(UV) run --locked
3
+ BUMP_VERSION = $(UV) tool run --from bump-my-version==1.5.1 bump-my-version
4
+ CURRENT_VERSION = $(BUMP_VERSION) show current_version
5
+ PYTEST_ARGS ?=
6
+ DOCS_ADDR ?= 127.0.0.1:8000
7
+ DIST_DIR ?= dist
8
+
9
+ .DEFAULT_GOAL := help
10
+ .PHONY: help sync test lint check docs docs-serve build version bump-preview
11
+ .PHONY: bump-major bump-minor bump-patch bump-pre bump-stage bump-release require-prerelease
12
+
13
+ help: ## List available targets
14
+ @awk -F ':.*## ' '/^[a-z][a-z-]*:.*## / { printf "%-15s %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
15
+
16
+ sync: ## Install dependencies from uv.lock
17
+ $(UV) sync --locked
18
+
19
+ test: ## Run the CI test suite (optional PYTEST_ARGS)
20
+ $(PYTHON_RUN) pytest -q -m 'not real_backend' $(PYTEST_ARGS)
21
+
22
+ lint: ## Lint the Python package with Ruff
23
+ $(PYTHON_RUN) ruff check src
24
+
25
+ check: lint test ## Run lint and tests
26
+
27
+ docs: ## Build and verify the documentation
28
+ $(PYTHON_RUN) properdocs build --strict
29
+ $(PYTHON_RUN) python scripts/check_docs_build.py
30
+
31
+ docs-serve: ## Serve the documentation locally (optional DOCS_ADDR)
32
+ $(PYTHON_RUN) properdocs serve --dev-addr $(DOCS_ADDR)
33
+
34
+ build: ## Build the wheel and source distribution (optional DIST_DIR)
35
+ $(UV) build --out-dir "$(DIST_DIR)"
36
+
37
+ version: ## Show the current package version
38
+ @$(CURRENT_VERSION)
39
+
40
+ bump-preview: ## Show possible version bumps
41
+ @current="$$($(CURRENT_VERSION))" && \
42
+ if [ "$$current" = "$${current%%[a-z]*}" ]; then \
43
+ for part in major minor patch; do \
44
+ next="$$($(BUMP_VERSION) show --increment "$$part" new_version)" || exit; \
45
+ printf '%s -> %s (%s)\n' "$$current" "$$next" "$$part"; \
46
+ done; \
47
+ else \
48
+ $(BUMP_VERSION) show-bump; \
49
+ fi
50
+
51
+ bump-major: ## Increment major and start at alpha 0
52
+ bump-minor: ## Increment minor and start at alpha 0
53
+ bump-patch: ## Increment patch and start at alpha 0
54
+ bump-pre: require-prerelease ## Increment the current prerelease number
55
+ bump-stage: require-prerelease ## Advance from alpha to beta to rc to stable
56
+ bump-major bump-minor bump-patch bump-pre bump-stage:
57
+ $(BUMP_VERSION) bump $(patsubst bump-%,%,$@)
58
+ $(UV) lock
59
+
60
+ bump-release: ## Promote the current prerelease directly to stable
61
+ @current="$$($(CURRENT_VERSION))" && \
62
+ stable="$${current%%[a-z]*}" && \
63
+ if [ "$$current" = "$$stable" ]; then \
64
+ printf '%s\n' "$$current is already stable"; \
65
+ else \
66
+ $(BUMP_VERSION) bump --new-version "$$stable" && $(UV) lock; \
67
+ fi
68
+
69
+ require-prerelease:
70
+ @current="$$($(CURRENT_VERSION))" && \
71
+ if [ "$$current" = "$${current%%[a-z]*}" ]; then \
72
+ printf '%s\n' "$$current is stable. Use bump-major, bump-minor, or bump-patch to start a prerelease." >&2; \
73
+ exit 1; \
74
+ fi