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.
- hypra-0.2.0/.github/ISSUE_TEMPLATE/release-tracker.md +31 -0
- hypra-0.2.0/.github/release-drafter.yml +14 -0
- hypra-0.2.0/.github/workflows/docs.yml +66 -0
- hypra-0.2.0/.github/workflows/python.yml +27 -0
- hypra-0.2.0/.github/workflows/quality.yml +29 -0
- hypra-0.2.0/.github/workflows/release-drafter.yml +158 -0
- hypra-0.2.0/.github/workflows/release.yml +96 -0
- hypra-0.2.0/.gitignore +14 -0
- hypra-0.2.0/.python-version +1 -0
- hypra-0.2.0/Makefile +74 -0
- hypra-0.2.0/PKG-INFO +224 -0
- hypra-0.2.0/README.md +210 -0
- hypra-0.2.0/docs/acceptance-results.tex +3 -0
- hypra-0.2.0/docs/api-examples.md +127 -0
- hypra-0.2.0/docs/architecture.md +34 -0
- hypra-0.2.0/docs/assets/katex/LICENSE +21 -0
- hypra-0.2.0/docs/assets/katex/README.txt +3 -0
- hypra-0.2.0/docs/assets/katex/auto-render.min.js +1 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- hypra-0.2.0/docs/assets/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- hypra-0.2.0/docs/assets/katex/katex.min.css +1 -0
- hypra-0.2.0/docs/assets/katex/katex.min.js +1 -0
- hypra-0.2.0/docs/assets/math.js +24 -0
- hypra-0.2.0/docs/assets/mermaid/LICENSE +21 -0
- hypra-0.2.0/docs/assets/mermaid/SOURCE.json +54 -0
- hypra-0.2.0/docs/assets/mermaid/Tableau10-558cc280.js +9 -0
- hypra-0.2.0/docs/assets/mermaid/arc-dd975067.js +86 -0
- hypra-0.2.0/docs/assets/mermaid/array-2ff2c7a6.js +6 -0
- hypra-0.2.0/docs/assets/mermaid/blockDiagram-7a6ce1a3.js +1230 -0
- hypra-0.2.0/docs/assets/mermaid/c4Diagram-0d3c50f5.js +1579 -0
- hypra-0.2.0/docs/assets/mermaid/channel-bc508e47.js +5 -0
- hypra-0.2.0/docs/assets/mermaid/classDiagram-6b63e9c6.js +220 -0
- hypra-0.2.0/docs/assets/mermaid/classDiagram-v2-1c1d2b5d.js +206 -0
- hypra-0.2.0/docs/assets/mermaid/clone-b6975030.js +8 -0
- hypra-0.2.0/docs/assets/mermaid/createText-908267de.js +2969 -0
- hypra-0.2.0/docs/assets/mermaid/edges-d4a9e74e.js +1088 -0
- hypra-0.2.0/docs/assets/mermaid/erDiagram-73c1690c.js +931 -0
- hypra-0.2.0/docs/assets/mermaid/flowDb-2e5ba0d2.js +1126 -0
- hypra-0.2.0/docs/assets/mermaid/flowDiagram-26723173.js +797 -0
- hypra-0.2.0/docs/assets/mermaid/flowDiagram-v2-832d9543.js +25 -0
- hypra-0.2.0/docs/assets/mermaid/flowchart-elk-definition-798c25aa.js +48407 -0
- hypra-0.2.0/docs/assets/mermaid/ganttDiagram-d2633790.js +2501 -0
- hypra-0.2.0/docs/assets/mermaid/gitGraphDiagram-3a2cacc7.js +1264 -0
- hypra-0.2.0/docs/assets/mermaid/graph-0f379662.js +881 -0
- hypra-0.2.0/docs/assets/mermaid/index-7a48438c.js +373 -0
- hypra-0.2.0/docs/assets/mermaid/infoDiagram-574f1153.js +319 -0
- hypra-0.2.0/docs/assets/mermaid/init-f9637058.js +16 -0
- hypra-0.2.0/docs/assets/mermaid/journeyDiagram-d228b7dc.js +804 -0
- hypra-0.2.0/docs/assets/mermaid/katex-fa3848e8.js +11646 -0
- hypra-0.2.0/docs/assets/mermaid/layout-67fde652.js +1536 -0
- hypra-0.2.0/docs/assets/mermaid/line-6e74982d.js +34 -0
- hypra-0.2.0/docs/assets/mermaid/linear-483c1a28.js +447 -0
- hypra-0.2.0/docs/assets/mermaid/mermaid-e07dac3d.js +8135 -0
- hypra-0.2.0/docs/assets/mermaid/mermaid.esm.min.mjs +4 -0
- hypra-0.2.0/docs/assets/mermaid/mindmap-definition-f3352918.js +18760 -0
- hypra-0.2.0/docs/assets/mermaid/ordinal-5695958c.js +65 -0
- hypra-0.2.0/docs/assets/mermaid/path-428ebac9.js +91 -0
- hypra-0.2.0/docs/assets/mermaid/pieDiagram-9a5c7b29.js +502 -0
- hypra-0.2.0/docs/assets/mermaid/quadrantDiagram-15ed5e80.js +904 -0
- hypra-0.2.0/docs/assets/mermaid/requirementDiagram-9f95ab38.js +769 -0
- hypra-0.2.0/docs/assets/mermaid/sankeyDiagram-3e8fe5d5.js +818 -0
- hypra-0.2.0/docs/assets/mermaid/sequenceDiagram-8ab39a46.js +2234 -0
- hypra-0.2.0/docs/assets/mermaid/stateDiagram-c3dc8f69.js +275 -0
- hypra-0.2.0/docs/assets/mermaid/stateDiagram-v2-9273d11c.js +190 -0
- hypra-0.2.0/docs/assets/mermaid/styles-434cae6b.js +960 -0
- hypra-0.2.0/docs/assets/mermaid/styles-b514864b.js +436 -0
- hypra-0.2.0/docs/assets/mermaid/styles-edde81da.js +1089 -0
- hypra-0.2.0/docs/assets/mermaid/svgDrawCommon-f84b32fd.js +64 -0
- hypra-0.2.0/docs/assets/mermaid/timeline-definition-01cbd2c6.js +795 -0
- hypra-0.2.0/docs/assets/mermaid/xychartDiagram-c5d0386c.js +1284 -0
- hypra-0.2.0/docs/cli-reference.md +11 -0
- hypra-0.2.0/docs/docs-maintenance.md +72 -0
- hypra-0.2.0/docs/endpoints.md +210 -0
- hypra-0.2.0/docs/half-system.md +159 -0
- hypra-0.2.0/docs/hpl-alternating-endpoints.md +82 -0
- hypra-0.2.0/docs/hpl-at-i.md +49 -0
- hypra-0.2.0/docs/hpl-binary-maps.md +55 -0
- hypra-0.2.0/docs/hpl-boundary-numerics.md +58 -0
- hypra-0.2.0/docs/hpl-classical-binary-three.md +29 -0
- hypra-0.2.0/docs/hpl-classical-mixed-three.md +48 -0
- hypra-0.2.0/docs/hpl-classical-negative-three.md +40 -0
- hypra-0.2.0/docs/hpl-classical-ternary-three.md +48 -0
- hypra-0.2.0/docs/hpl-constant-numerics.md +73 -0
- hypra-0.2.0/docs/hpl-continuation.md +85 -0
- hypra-0.2.0/docs/hpl-endpoints.md +106 -0
- hypra-0.2.0/docs/hpl-inversion.md +52 -0
- hypra-0.2.0/docs/hpl-mobius.md +38 -0
- hypra-0.2.0/docs/hpl-near-one-series.md +101 -0
- hypra-0.2.0/docs/hpl-notation.md +16 -0
- hypra-0.2.0/docs/hpl-numerics.md +138 -0
- hypra-0.2.0/docs/hpl-real-continuation.md +41 -0
- hypra-0.2.0/docs/hpl-reduction.md +41 -0
- hypra-0.2.0/docs/hpl-regularization.md +105 -0
- hypra-0.2.0/docs/hpl-stuffle.md +34 -0
- hypra-0.2.0/docs/hpl-taylor.md +42 -0
- hypra-0.2.0/docs/hpl-transforms.md +74 -0
- hypra-0.2.0/docs/index.md +53 -0
- hypra-0.2.0/docs/integer-port.md +214 -0
- hypra-0.2.0/docs/latex-and-docs.md +61 -0
- hypra-0.2.0/docs/mathematics.md +403 -0
- hypra-0.2.0/docs/mathematics.pdf +0 -0
- hypra-0.2.0/docs/mathematics.tex +559 -0
- hypra-0.2.0/docs/nielsen-polylogarithms.md +71 -0
- hypra-0.2.0/docs/parity-map.md +102 -0
- hypra-0.2.0/docs/protocol.md +24 -0
- hypra-0.2.0/docs/python-api.md +235 -0
- hypra-0.2.0/docs/release-drafter.md +73 -0
- hypra-0.2.0/docs/releasing.md +92 -0
- hypra-0.2.0/docs/roadmap.md +51 -0
- hypra-0.2.0/docs/scope.md +139 -0
- hypra-0.2.0/docs/setup.md +99 -0
- hypra-0.2.0/docs/upstream-source-manifest.json +435 -0
- hypra-0.2.0/docs/upstream-source.md +139 -0
- hypra-0.2.0/examples/gamma_q_request.json +135 -0
- hypra-0.2.0/examples/gamma_q_result.json +658 -0
- hypra-0.2.0/examples/gamma_q_result.tex +4 -0
- hypra-0.2.0/examples/ported_examples.py +133 -0
- hypra-0.2.0/properdocs.yml +108 -0
- hypra-0.2.0/pyproject.toml +79 -0
- hypra-0.2.0/reports/initial-validation/README.md +6 -0
- hypra-0.2.0/reports/initial-validation/validation.json +39 -0
- hypra-0.2.0/reports/initial-validation/validation.tex +4 -0
- hypra-0.2.0/reports/native-validation/validation.json +1651 -0
- hypra-0.2.0/reports/native-validation/validation.tex +4 -0
- hypra-0.2.0/scripts/check_docs_build.py +104 -0
- hypra-0.2.0/scripts/test_release_drafter.cjs +21 -0
- hypra-0.2.0/scripts/validate.py +120 -0
- hypra-0.2.0/scripts/validate_integral.py +158 -0
- hypra-0.2.0/src/hypra/__init__.py +163 -0
- hypra-0.2.0/src/hypra/__main__.py +6 -0
- hypra-0.2.0/src/hypra/_json.py +21 -0
- hypra-0.2.0/src/hypra/_typing.py +21 -0
- hypra-0.2.0/src/hypra/api.py +328 -0
- hypra-0.2.0/src/hypra/backend.py +321 -0
- hypra-0.2.0/src/hypra/cli/__init__.py +6 -0
- hypra-0.2.0/src/hypra/cli/application.py +45 -0
- hypra-0.2.0/src/hypra/cli/commands.py +96 -0
- hypra-0.2.0/src/hypra/cli/request.py +35 -0
- hypra-0.2.0/src/hypra/config.py +82 -0
- hypra-0.2.0/src/hypra/errors.py +13 -0
- hypra-0.2.0/src/hypra/hpl/__init__.py +1 -0
- hypra-0.2.0/src/hypra/hpl/algebra.py +459 -0
- hypra-0.2.0/src/hypra/hpl/alternating.py +105 -0
- hypra-0.2.0/src/hypra/hpl/arguments.py +79 -0
- hypra-0.2.0/src/hypra/hpl/boundary_numeric.py +139 -0
- hypra-0.2.0/src/hypra/hpl/classical.py +151 -0
- hypra-0.2.0/src/hypra/hpl/constants.py +171 -0
- hypra-0.2.0/src/hypra/hpl/endpoints.py +171 -0
- hypra-0.2.0/src/hypra/hpl/inversion.py +62 -0
- hypra-0.2.0/src/hypra/hpl/limits.py +105 -0
- hypra-0.2.0/src/hypra/hpl/maps.py +98 -0
- hypra-0.2.0/src/hypra/hpl/mobius.py +56 -0
- hypra-0.2.0/src/hypra/hpl/named_constants.py +50 -0
- hypra-0.2.0/src/hypra/hpl/notation.py +129 -0
- hypra-0.2.0/src/hypra/hpl/numeric.py +303 -0
- hypra-0.2.0/src/hypra/hpl/radial_continuation.py +173 -0
- hypra-0.2.0/src/hypra/hpl/real_continuation.py +75 -0
- hypra-0.2.0/src/hypra/hpl/reduction.py +140 -0
- hypra-0.2.0/src/hypra/hpl/regularization.py +171 -0
- hypra-0.2.0/src/hypra/hpl/series_one.py +67 -0
- hypra-0.2.0/src/hypra/hpl/special.py +49 -0
- hypra-0.2.0/src/hypra/hpl/stuffle.py +106 -0
- hypra-0.2.0/src/hypra/hpl/taylor.py +55 -0
- hypra-0.2.0/src/hypra/hpl/transforms.py +95 -0
- hypra-0.2.0/src/hypra/hypexp_integrals.py +201 -0
- hypra-0.2.0/src/hypra/native/__init__.py +6 -0
- hypra-0.2.0/src/hypra/native/atom.py +220 -0
- hypra-0.2.0/src/hypra/native/backend.py +292 -0
- hypra-0.2.0/src/hypra/native/canonical.py +55 -0
- hypra-0.2.0/src/hypra/native/colored_sums.py +275 -0
- hypra-0.2.0/src/hypra/native/contiguous.py +404 -0
- hypra-0.2.0/src/hypra/native/endpoints.py +263 -0
- hypra-0.2.0/src/hypra/native/half_system.py +148 -0
- hypra-0.2.0/src/hypra/native/integer.py +189 -0
- hypra-0.2.0/src/hypra/native/matched_half.py +127 -0
- hypra-0.2.0/src/hypra/native/nested_sums.py +281 -0
- hypra-0.2.0/src/hypra/native/planning.py +265 -0
- hypra-0.2.0/src/hypra/native/twof1_shift.py +130 -0
- hypra-0.2.0/src/hypra/native/unit_limit.py +119 -0
- hypra-0.2.0/src/hypra/native/worker.py +69 -0
- hypra-0.2.0/src/hypra/nielsen.py +153 -0
- hypra-0.2.0/src/hypra/py.typed +0 -0
- hypra-0.2.0/src/hypra/serialization.py +302 -0
- hypra-0.2.0/src/hypra/symbolic.py +451 -0
- hypra-0.2.0/src/hypra/wolfram_bridge.wls +171 -0
- hypra-0.2.0/tests/__init__.py +0 -0
- hypra-0.2.0/tests/integration/__init__.py +0 -0
- hypra-0.2.0/tests/integration/native/__init__.py +0 -0
- hypra-0.2.0/tests/integration/native/test_complex_expansion.py +62 -0
- hypra-0.2.0/tests/integration/native/test_exceptional_parameters.py +81 -0
- hypra-0.2.0/tests/integration/native/test_hypergeometric_endpoints.py +53 -0
- hypra-0.2.0/tests/integration/native/test_integer_native.py +183 -0
- hypra-0.2.0/tests/integration/native/test_native.py +161 -0
- hypra-0.2.0/tests/integration/native/test_native_timeout.py +26 -0
- hypra-0.2.0/tests/integration/native/test_symbolic_slopes.py +106 -0
- hypra-0.2.0/tests/integration/native/test_unit_hyper.py +197 -0
- hypra-0.2.0/tests/integration/test_cli.py +91 -0
- hypra-0.2.0/tests/integration/test_mathematics.py +126 -0
- hypra-0.2.0/tests/integration/test_ported_examples.py +44 -0
- hypra-0.2.0/tests/integration/wolfram/__init__.py +0 -0
- hypra-0.2.0/tests/integration/wolfram/test_backend.py +281 -0
- hypra-0.2.0/tests/integration/wolfram/test_real_backend.py +69 -0
- hypra-0.2.0/tests/unit/__init__.py +0 -0
- hypra-0.2.0/tests/unit/hpl/__init__.py +0 -0
- hypra-0.2.0/tests/unit/hpl/test_height_one_mzv.py +28 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_algebra.py +148 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_alternating.py +101 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_arguments.py +28 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_boundary_numeric.py +78 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_classical.py +126 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_constants.py +84 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_constants_independent.py +46 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_continuation.py +54 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_continue.py +64 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_endpoints.py +134 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_inversion.py +48 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_limits.py +20 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_maps.py +60 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_mobius.py +51 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_notation.py +39 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_numeric.py +188 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_primitive.py +29 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_reduce.py +60 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_regularized.py +94 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_series_one.py +67 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_special_i.py +52 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_stuffle.py +46 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_taylor.py +40 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_ternary_limits.py +34 -0
- hypra-0.2.0/tests/unit/hpl/test_hpl_transform.py +74 -0
- hypra-0.2.0/tests/unit/hpl/test_lyndon_exact.py +46 -0
- hypra-0.2.0/tests/unit/native/__init__.py +0 -0
- hypra-0.2.0/tests/unit/native/pochhammer.py +23 -0
- hypra-0.2.0/tests/unit/native/test_all_half_system.py +51 -0
- hypra-0.2.0/tests/unit/native/test_colored_sums.py +216 -0
- hypra-0.2.0/tests/unit/native/test_contiguous.py +118 -0
- hypra-0.2.0/tests/unit/native/test_endpoints.py +72 -0
- hypra-0.2.0/tests/unit/native/test_half_system.py +94 -0
- hypra-0.2.0/tests/unit/native/test_integer_shift_math.py +152 -0
- hypra-0.2.0/tests/unit/native/test_nested_sums.py +192 -0
- hypra-0.2.0/tests/unit/symbolic/__init__.py +0 -0
- hypra-0.2.0/tests/unit/symbolic/test_hpl_evalf.py +44 -0
- hypra-0.2.0/tests/unit/symbolic/test_hpl_nseries.py +63 -0
- hypra-0.2.0/tests/unit/symbolic/test_symbolic_input.py +23 -0
- hypra-0.2.0/tests/unit/symbolic/test_symbolic_native.py +66 -0
- hypra-0.2.0/tests/unit/test_api.py +165 -0
- hypra-0.2.0/tests/unit/test_hypexp_integrals.py +101 -0
- hypra-0.2.0/tests/unit/test_nielsen.py +63 -0
- hypra-0.2.0/tests/unit/test_serialization.py +154 -0
- 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 @@
|
|
|
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
|