rundex 0.0.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.
@@ -0,0 +1,41 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.11"
17
+
18
+ - name: Build distribution
19
+ run: |
20
+ pip install build
21
+ python -m build
22
+
23
+ - uses: actions/upload-artifact@v4
24
+ with:
25
+ name: dist
26
+ path: dist/
27
+
28
+ publish:
29
+ needs: build
30
+ runs-on: ubuntu-latest
31
+ environment: pypi
32
+ permissions:
33
+ id-token: write # required for OIDC trusted publishing
34
+
35
+ steps:
36
+ - uses: actions/download-artifact@v4
37
+ with:
38
+ name: dist
39
+ path: dist/
40
+
41
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,45 @@
1
+ name: unit tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v6.0.2
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v6.2.0
16
+ with:
17
+ python-version: '3.12'
18
+ - name: Install lint tools
19
+ run: pip install ".[test]"
20
+ - name: Ruff format check
21
+ run: ruff format --check .
22
+ - name: Ruff lint
23
+ run: ruff check .
24
+
25
+ build:
26
+ runs-on: ubuntu-latest
27
+ strategy:
28
+ matrix:
29
+ python-version: ['3.10', '3.14']
30
+ steps:
31
+ - uses: actions/checkout@v6.0.2
32
+ - name: Set up Python ${{ matrix.python-version }}
33
+ uses: actions/setup-python@v6.2.0
34
+ with:
35
+ python-version: ${{ matrix.python-version }}
36
+ - name: Install Python dependencies
37
+ run: |
38
+ python -m pip install --upgrade pip wheel
39
+ pip install .[test]
40
+ - name: Static type check with mypy
41
+ run: |
42
+ mypy --install-types --non-interactive --ignore-missing-imports src/rundex
43
+ - name: Unit tests
44
+ run: |
45
+ pytest
@@ -0,0 +1,223 @@
1
+ # RunDec sources
2
+ *.cpp
3
+ *.h
4
+ *.m
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[codz]
9
+ *$py.class
10
+
11
+ # C extensions
12
+ *.so
13
+
14
+ # ParaView files
15
+ *.vts
16
+ *.vtk
17
+
18
+ # Distribution / packaging
19
+ .Python
20
+ build/
21
+ develop-eggs/
22
+ dist/
23
+ downloads/
24
+ eggs/
25
+ .eggs/
26
+ lib/
27
+ lib64/
28
+ parts/
29
+ sdist/
30
+ var/
31
+ wheels/
32
+ share/python-wheels/
33
+ *.egg-info/
34
+ .installed.cfg
35
+ *.egg
36
+ MANIFEST
37
+
38
+ # PyInstaller
39
+ # Usually these files are written by a python script from a template
40
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
41
+ *.manifest
42
+ *.spec
43
+
44
+ # Installer logs
45
+ pip-log.txt
46
+ pip-delete-this-directory.txt
47
+
48
+ # Unit test / coverage reports
49
+ htmlcov/
50
+ .tox/
51
+ .nox/
52
+ .coverage
53
+ .coverage.*
54
+ .cache
55
+ nosetests.xml
56
+ coverage.xml
57
+ *.cover
58
+ *.py.cover
59
+ .hypothesis/
60
+ .pytest_cache/
61
+ cover/
62
+
63
+ # Translations
64
+ *.mo
65
+ *.pot
66
+
67
+ # Django stuff:
68
+ *.log
69
+ local_settings.py
70
+ db.sqlite3
71
+ db.sqlite3-journal
72
+
73
+ # Flask stuff:
74
+ instance/
75
+ .webassets-cache
76
+
77
+ # Scrapy stuff:
78
+ .scrapy
79
+
80
+ # Sphinx documentation
81
+ docs/_build/
82
+
83
+ # PyBuilder
84
+ .pybuilder/
85
+ target/
86
+
87
+ # Jupyter Notebook
88
+ .ipynb_checkpoints
89
+
90
+ # IPython
91
+ profile_default/
92
+ ipython_config.py
93
+
94
+ # pyenv
95
+ # For a library or package, you might want to ignore these files since the code is
96
+ # intended to run in multiple environments; otherwise, check them in:
97
+ # .python-version
98
+
99
+ # pipenv
100
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
101
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
102
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
103
+ # install all needed dependencies.
104
+ #Pipfile.lock
105
+
106
+ # UV
107
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ #uv.lock
111
+
112
+ # poetry
113
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
114
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
115
+ # commonly ignored for libraries.
116
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
117
+ #poetry.lock
118
+ #poetry.toml
119
+
120
+ # pdm
121
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
122
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
123
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
124
+ #pdm.lock
125
+ #pdm.toml
126
+ .pdm-python
127
+ .pdm-build/
128
+
129
+ # pixi
130
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
131
+ #pixi.lock
132
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
133
+ # in the .venv directory. It is recommended not to include this directory in version control.
134
+ .pixi
135
+
136
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
137
+ __pypackages__/
138
+
139
+ # Celery stuff
140
+ celerybeat-schedule
141
+ celerybeat.pid
142
+
143
+ # SageMath parsed files
144
+ *.sage.py
145
+
146
+ # Environments
147
+ .env
148
+ .envrc
149
+ .venv
150
+ env/
151
+ venv/
152
+ ENV/
153
+ env.bak/
154
+ venv.bak/
155
+
156
+ # Spyder project settings
157
+ .spyderproject
158
+ .spyproject
159
+
160
+ # Rope project settings
161
+ .ropeproject
162
+
163
+ # mkdocs documentation
164
+ /site
165
+ /site_gallery_tmp/
166
+
167
+ # mkdocs-gallery generated output
168
+ /docs/generated/
169
+
170
+ # Generated 3D HTML scenes (built by scripts/generate_3d_html.py)
171
+ /docs/assets/3d_scene_*.html
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ #.idea/
193
+
194
+ # Abstra
195
+ # Abstra is an AI-powered process automation framework.
196
+ # Ignore directories containing user credentials, local state, and settings.
197
+ # Learn more at https://abstra.io/docs
198
+ .abstra/
199
+
200
+ # Visual Studio Code
201
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
202
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
203
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
204
+ # you could uncomment the following to ignore the entire vscode folder
205
+ # .vscode/
206
+
207
+ # Ruff stuff:
208
+ .ruff_cache/
209
+
210
+ # PyPI configuration file
211
+ .pypirc
212
+
213
+ # Cursor
214
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
215
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
216
+ # refer to https://docs.cursor.com/context/ignore-files
217
+ .cursorignore
218
+ .cursorindexingignore
219
+
220
+ # Marimo
221
+ marimo/_static/
222
+ marimo/_lsp/
223
+ __marimo__/
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.9.10
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Florian Herren, David Straub
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
rundex-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: rundex
3
+ Version: 0.0.0
4
+ Summary: Running and decoupling of the strong coupling and quark masses (JAX port of rundex)
5
+ Author-email: David Straub <straub@protonmail.com>
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE.md
9
+ Requires-Dist: jax>=0.4
10
+ Requires-Dist: diffrax>=0.4
11
+ Requires-Dist: jaxtyping
12
+ Provides-Extra: test
13
+ Requires-Dist: pytest; extra == "test"
14
+ Requires-Dist: mypy; extra == "test"
15
+ Requires-Dist: ruff; extra == "test"
16
+ Requires-Dist: pre-commit; extra == "test"
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest; extra == "dev"
19
+ Requires-Dist: mypy; extra == "dev"
20
+ Requires-Dist: ruff; extra == "dev"
21
+ Requires-Dist: pre-commit; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ # rundex
25
+
26
+ JAX port of [RunDec](https://www.ttp.kit.edu/Progdata/ttp16/ttp16-014/) v3.1 — running and decoupling of the strong coupling αs and quark masses in QCD.
27
+
28
+ Original Mathematica package by K.G. Chetyrkin, J.H. Kühn, M. Steinhauser, and F. Herren.
29
+ References: [hep-ph/0004189](https://arxiv.org/abs/hep-ph/0004189), [arXiv:1703.03751](https://arxiv.org/abs/1703.03751).
30
+
31
+ ## Installation
32
+
33
+
34
+ ```bash
35
+ pip install rundex
36
+ ```
37
+
38
+ Requires Python ≥ 3.10, JAX ≥ 0.4, and [diffrax](https://github.com/patrick-kidger/diffrax).
39
+
40
+
41
+ ## Quick start
42
+
43
+ ```python
44
+ import jax
45
+ jax.config.update("jax_enable_x64", True) # required for physics-level precision
46
+
47
+ from rundex import AlphasExact, AlphasLam, LamExpl, LamImpl
48
+
49
+ # Λ_MS^(5) from αs(MZ)
50
+ lam = LamExpl(0.118, 91.18, nf=5, loops=5) # → 0.2086 GeV
51
+
52
+ # αs(μ) from Λ (analytic expansion)
53
+ als = AlphasLam(lam, mu=1000.0, nf=5, loops=5)
54
+
55
+ # αs(μ) by numerically integrating the RGE
56
+ als = AlphasExact(0.118, mu0=91.18, mu=1000.0, nf=5, loops=5)
57
+
58
+ # Optional: compile once for fixed (nf, loops) to avoid retracing
59
+ from rundex import compiled_AlphasExact
60
+ alphas_exact_5l_nf5 = compiled_AlphasExact(nf=5, loops=5)
61
+ als_fast = alphas_exact_5l_nf5(0.118, 91.18, 1000.0)
62
+ ```
63
+
64
+ > **Note on 64-bit precision**
65
+ > JAX defaults to 32-bit floats. Always call
66
+ > `jax.config.update("jax_enable_x64", True)` **before** importing or calling
67
+ > any `rundex` function. The package itself does not set this flag so it does
68
+ > not interfere with the rest of your JAX code.
69
+
70
+ ## Development
71
+
72
+ ```bash
73
+ git clone ...
74
+ pip install -e ".[dev]"
75
+ pytest
76
+ ```
77
+
78
+ Numerical tests are cross-validated against [rundec-python](https://github.com/apaasch/rundec-python) (CRunDec C++ wrapper), which is a test-only dependency not required by rundex itself.
79
+
80
+ ## Implemented RunDec functions (subset)
81
+
82
+ The following RunDec functions are currently ported to `rundex`:
83
+
84
+ - `LamExpl`
85
+ - `LamImpl`
86
+ - `AlphasLam`
87
+ - `AlphasExact`
88
+ - `AlL2AlH`
89
+ - `AlH2AlL`
90
+ - `mMS2mMS`
91
+ - `mMS2mOS`
92
+ - `mMS2m1S`
93
+ - `mOS2mMS`
94
+ - `mOS2mSI`
95
+ - `DecMqUpOS`
96
+ - `DecMqDownOS`
97
+ - `mL2mH`
98
+ - `mH2mL`
99
+
100
+ Not all RunDec functionality is ported yet.
101
+
102
+ ## Compiled helpers (available for all ported functions)
103
+
104
+ Each ported function above has a compiled helper named `compiled_<FunctionName>`.
105
+ Use these when you call the same function many times with fixed discrete
106
+ settings (for example fixed `nf`, `loops`, and fixed threshold/light-quark data).
107
+
108
+ Examples:
109
+
110
+ - `compiled_LamExpl(nf, loops)`
111
+ - `compiled_LamImpl(nf, loops)`
112
+ - `compiled_AlphasLam(nf, loops)`
113
+ - `compiled_AlphasExact(nf, loops)`
114
+ - `compiled_AlL2AlH(decpar, loops)`
115
+ - `compiled_AlH2AlL(decpar, loops)`
116
+ - `compiled_mMS2mMS(nf, loops)`
117
+ - `compiled_mMS2mOS(nf, loops, mq=None, fdelm=1.0)`
118
+ - `compiled_mMS2m1S(nl, loops, mq=None, fdelm=1.0)`
119
+ - `compiled_mOS2mMS(nf, loops, mq=None, fdelm=1.0)`
120
+ - `compiled_mOS2mSI(nf, loops, mq=None, fdelm=1.0)`
121
+ - `compiled_DecMqUpOS(nf, loops)`
122
+ - `compiled_DecMqDownOS(nf, loops)`
123
+ - `compiled_mL2mH(decpar, loops)`
124
+ - `compiled_mH2mL(decpar, loops)`
125
+
126
+ When to use which:
127
+
128
+ - Use regular functions for one-off calls or frequently changing setup parameters.
129
+ - Use compiled helpers for repeated calls with fixed setup parameters.
rundex-0.0.0/README.md ADDED
@@ -0,0 +1,106 @@
1
+ # rundex
2
+
3
+ JAX port of [RunDec](https://www.ttp.kit.edu/Progdata/ttp16/ttp16-014/) v3.1 — running and decoupling of the strong coupling αs and quark masses in QCD.
4
+
5
+ Original Mathematica package by K.G. Chetyrkin, J.H. Kühn, M. Steinhauser, and F. Herren.
6
+ References: [hep-ph/0004189](https://arxiv.org/abs/hep-ph/0004189), [arXiv:1703.03751](https://arxiv.org/abs/1703.03751).
7
+
8
+ ## Installation
9
+
10
+
11
+ ```bash
12
+ pip install rundex
13
+ ```
14
+
15
+ Requires Python ≥ 3.10, JAX ≥ 0.4, and [diffrax](https://github.com/patrick-kidger/diffrax).
16
+
17
+
18
+ ## Quick start
19
+
20
+ ```python
21
+ import jax
22
+ jax.config.update("jax_enable_x64", True) # required for physics-level precision
23
+
24
+ from rundex import AlphasExact, AlphasLam, LamExpl, LamImpl
25
+
26
+ # Λ_MS^(5) from αs(MZ)
27
+ lam = LamExpl(0.118, 91.18, nf=5, loops=5) # → 0.2086 GeV
28
+
29
+ # αs(μ) from Λ (analytic expansion)
30
+ als = AlphasLam(lam, mu=1000.0, nf=5, loops=5)
31
+
32
+ # αs(μ) by numerically integrating the RGE
33
+ als = AlphasExact(0.118, mu0=91.18, mu=1000.0, nf=5, loops=5)
34
+
35
+ # Optional: compile once for fixed (nf, loops) to avoid retracing
36
+ from rundex import compiled_AlphasExact
37
+ alphas_exact_5l_nf5 = compiled_AlphasExact(nf=5, loops=5)
38
+ als_fast = alphas_exact_5l_nf5(0.118, 91.18, 1000.0)
39
+ ```
40
+
41
+ > **Note on 64-bit precision**
42
+ > JAX defaults to 32-bit floats. Always call
43
+ > `jax.config.update("jax_enable_x64", True)` **before** importing or calling
44
+ > any `rundex` function. The package itself does not set this flag so it does
45
+ > not interfere with the rest of your JAX code.
46
+
47
+ ## Development
48
+
49
+ ```bash
50
+ git clone ...
51
+ pip install -e ".[dev]"
52
+ pytest
53
+ ```
54
+
55
+ Numerical tests are cross-validated against [rundec-python](https://github.com/apaasch/rundec-python) (CRunDec C++ wrapper), which is a test-only dependency not required by rundex itself.
56
+
57
+ ## Implemented RunDec functions (subset)
58
+
59
+ The following RunDec functions are currently ported to `rundex`:
60
+
61
+ - `LamExpl`
62
+ - `LamImpl`
63
+ - `AlphasLam`
64
+ - `AlphasExact`
65
+ - `AlL2AlH`
66
+ - `AlH2AlL`
67
+ - `mMS2mMS`
68
+ - `mMS2mOS`
69
+ - `mMS2m1S`
70
+ - `mOS2mMS`
71
+ - `mOS2mSI`
72
+ - `DecMqUpOS`
73
+ - `DecMqDownOS`
74
+ - `mL2mH`
75
+ - `mH2mL`
76
+
77
+ Not all RunDec functionality is ported yet.
78
+
79
+ ## Compiled helpers (available for all ported functions)
80
+
81
+ Each ported function above has a compiled helper named `compiled_<FunctionName>`.
82
+ Use these when you call the same function many times with fixed discrete
83
+ settings (for example fixed `nf`, `loops`, and fixed threshold/light-quark data).
84
+
85
+ Examples:
86
+
87
+ - `compiled_LamExpl(nf, loops)`
88
+ - `compiled_LamImpl(nf, loops)`
89
+ - `compiled_AlphasLam(nf, loops)`
90
+ - `compiled_AlphasExact(nf, loops)`
91
+ - `compiled_AlL2AlH(decpar, loops)`
92
+ - `compiled_AlH2AlL(decpar, loops)`
93
+ - `compiled_mMS2mMS(nf, loops)`
94
+ - `compiled_mMS2mOS(nf, loops, mq=None, fdelm=1.0)`
95
+ - `compiled_mMS2m1S(nl, loops, mq=None, fdelm=1.0)`
96
+ - `compiled_mOS2mMS(nf, loops, mq=None, fdelm=1.0)`
97
+ - `compiled_mOS2mSI(nf, loops, mq=None, fdelm=1.0)`
98
+ - `compiled_DecMqUpOS(nf, loops)`
99
+ - `compiled_DecMqDownOS(nf, loops)`
100
+ - `compiled_mL2mH(decpar, loops)`
101
+ - `compiled_mH2mL(decpar, loops)`
102
+
103
+ When to use which:
104
+
105
+ - Use regular functions for one-off calls or frequently changing setup parameters.
106
+ - Use compiled helpers for repeated calls with fixed setup parameters.