Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
7fe34bb
Clear the tree for the 1.0 rewrite
beykyle Sep 10, 2026
1e94204
Move the harvested modules into the 1.0 layout
beykyle Sep 10, 2026
11208e5
Bootstrap the 1.0 rewrite branch
beykyle Sep 10, 2026
09e4973
Add Parameter: an identity-hashed declaration with optional marginal …
beykyle Sep 10, 2026
3d41641
Rewrite transforms to the 1.0 skeleton
beykyle Sep 10, 2026
8e3f4b6
Trim units to the registry, the constants and the angle-grid check
beykyle Sep 10, 2026
53a5aad
Rewrite likelihood to the 1.0 skeleton
beykyle Sep 10, 2026
8c66754
Rewrite terms as stateless declarations with the factory helpers
beykyle Sep 10, 2026
c5835e7
Export terms from the package
beykyle Sep 10, 2026
5e31869
Drop pint: a fixed unit-label table replaces the registry
beykyle Sep 10, 2026
e8a1dd0
Add Dataset: pure data with reported systematics as inert metadata
beykyle Sep 10, 2026
72d0ff6
Add Model and Predictor with |, + and * composition
beykyle Sep 10, 2026
667e3c4
Add Comparison and Constraint: comparison space, masks, reported terms
beykyle Sep 10, 2026
6bf6be6
Export Comparison and Constraint from the package
beykyle Sep 10, 2026
0bf5fb9
Define the alpha+Ca error-model labels once, with a legend
beykyle Sep 10, 2026
086eb65
Add the structured (Woodbury) covariance
beykyle Sep 10, 2026
c7004bc
Export covariance from the package
beykyle Sep 10, 2026
6c11404
Define the error-model ladder in the recipes, not the tests
beykyle Sep 10, 2026
99c39c9
Add Problem: the compile step and the flat sampler interface
beykyle Sep 10, 2026
86963b8
Start the recipe acceptance suite: recipes 1-13
beykyle Sep 10, 2026
b5622d3
Recipes 16-24, joint-block hyperparameters, and an earlier singular c…
beykyle Sep 10, 2026
d47feb2
Recipes 25-38: the driver-loop and hierarchy recipes
beykyle Sep 10, 2026
950ca9a
Recipe 27: pin the exact closed form of the data-built bias
beykyle Sep 10, 2026
5b68139
Rewrite the reaction models as Model subclasses that override bind
beykyle Sep 11, 2026
54b0aaa
Add from_measurement: EXFOR measurements to datasets in internal units
beykyle Sep 11, 2026
60dab9b
Add recipe tests 3, 14, 15 and 37 for the reaction layer
beykyle Sep 11, 2026
a58ddfa
Give terms the block boundaries of a spanning support
beykyle Sep 11, 2026
3fd29de
Return a KernelTerm from kernel() so predictions can find the kernel
beykyle Sep 11, 2026
079f8c1
Rewrite diagnostics on (problem, samples) with a conditional held-out…
beykyle Sep 11, 2026
7b7253a
Rewrite the total predictive band to read everything from the problem
beykyle Sep 11, 2026
3ab41b0
Add recipe tests 7, 17, 18, 28, 30 and 31 for the analysis layer
beykyle Sep 11, 2026
97e07eb
Guard the recipe index: one test file per heading, and the legend too
beykyle Sep 11, 2026
1fa734b
Wire the notebooks: gallery, index test, converged workflow; recipe 3…
beykyle Sep 11, 2026
9a699cb
Add the linear_calibration notebook (recipes 1, 17)
beykyle Sep 11, 2026
29003a3
Add the error_models notebook (recipes 2, 4, 5, 19)
beykyle Sep 11, 2026
b1efa73
Add the normalization_and_covariance_structure notebook (recipes 3, 6…
beykyle Sep 11, 2026
4651913
Export the likelihood functionals from the package
beykyle Sep 11, 2026
c83a497
Add the correlated_observations and robust_likelihoods notebooks
beykyle Sep 11, 2026
789f72e
Add the measurement_to_calibration notebook (recipes 12, 14, 15, 16, …
beykyle Sep 11, 2026
9a38cda
Add the gp_discrepancy notebook (recipes 7, 8, 36)
beykyle Sep 11, 2026
75a2855
Silence the sparse-contour warning in the tempering figure
beykyle Sep 11, 2026
e1ca3fe
Add the hierarchical_calibration notebook (recipes 22, 24, 30, 35, 38)
beykyle Sep 11, 2026
2841d68
Add the alpha_ca_error_model_comparison notebook (recipes 10, 11, 13,…
beykyle Sep 11, 2026
c582470
Port the 0.x regression pins to the 1.0 spelling
beykyle Sep 11, 2026
9def154
Write design.md from the plan of record and add the API reference
beykyle Sep 11, 2026
6a374fd
Rewrite the README as the front door of 1.0
beykyle Sep 11, 2026
e561c3c
Merge branch 'main' into rewrite
beykyle Sep 11, 2026
5cc80f2
update readme
beykyle Sep 11, 2026
39b7165
clean up examples
beykyle Sep 11, 2026
bb1f011
Fix the silent wrong answers found in the PR #44 review
beykyle Sep 11, 2026
b5ee8b6
Word the install notes for 1.0 on main and guard the PyPI workflow
beykyle Sep 11, 2026
9c6e7b5
Score the alpha-Ca held-out angles conditionally on the fit
beykyle Sep 11, 2026
0e7ddca
Fix the rest of the PR #44 review backlog
beykyle Sep 11, 2026
c5634e9
Restructure the examples: delete, rename, recipe 39, shared plot style
beykyle Sep 12, 2026
7281e41
Restyle linear_calibration for the notebook review
beykyle Sep 12, 2026
c385a68
Split error_models and restyle both halves
beykyle Sep 12, 2026
1a3c233
Split robust_likelihoods and add the outlier-rejection loop
beykyle Sep 12, 2026
7566187
Rework normalization_and_covariance_structure around five experiments
beykyle Sep 12, 2026
fc147d7
Rework gp_discrepancy around mean-zero discrepancies
beykyle Sep 12, 2026
5f7bd96
Restyle alpha_ca and add predictive draws with coverage
beykyle Sep 12, 2026
960bd7a
Rebuild the optical-model notebook around a real measurement
beykyle Sep 12, 2026
5bf4969
Format the LaTeX-escape guard with black
beykyle Sep 12, 2026
39b34c1
Rework hierarchical_calibration: BDA3, smaller bumps, new plots
beykyle Sep 12, 2026
2dd803e
Add grid_draws and rebuild the GP and alpha-Ca notebooks on it
beykyle Sep 14, 2026
08f172a
Rewrite linear_calibration: inferred noise, two predictives and their…
beykyle Sep 14, 2026
dab2052
Merge noise_fraction and model_error into proportional_error
beykyle Sep 22, 2026
34d5e26
Accept a plain dict in from_measurement
beykyle Sep 22, 2026
5ed280d
Let a scalar reported normalisation travel to a new grid
beykyle Sep 22, 2026
a955c87
Tighten the linear_calibration prose and re-run it
beykyle Sep 22, 2026
b0819e7
Open error_models with where the Gaussian likelihood comes from
beykyle Sep 22, 2026
f27876e
Sample sharing_error_models with dynesty, one panel per error model
beykyle Sep 22, 2026
cd5b4b2
Add the tempering section to robust_likelihoods (recipe 12)
beykyle Sep 22, 2026
63a4416
Rebuild the two reaction notebooks on the jitr error model
beykyle Sep 22, 2026
10637e2
Drop nbconvert's execution-timing metadata from two notebooks
beykyle Sep 22, 2026
c2f1026
Re-run error_models in order
beykyle Sep 22, 2026
cbcaae8
Finish the rewrite of normalization_and_covariance_structure
beykyle Sep 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 26 additions & 124 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: CI

on:
push:
branches:
- main
branches: [main, rewrite]
pull_request:
branches:
- main
branches: [main, rewrite]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -15,162 +14,65 @@ concurrency:
jobs:
format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'

cache: "pip"
- name: Install validation dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e '.[validation]'

- name: Check source formatting and imports
run: |
python -m isort --check-only src test
python -m black --check src test
python -m ruff check src test

python -m isort --check-only src test examples/*.py
python -m black --check src test examples/*.py
python -m ruff check src test examples/*.py
- name: Check notebook formatting and imports
run: |
python -m nbqa isort --check examples/*.ipynb
python -m black --check --ipynb examples/*.ipynb
python -m ruff check examples/*.ipynb
if [ -d examples ] && ls examples/*.ipynb >/dev/null 2>&1; then
python -m nbqa isort --check examples/*.ipynb
python -m black --check --ipynb examples/*.ipynb
python -m ruff check examples/*.ipynb
else
echo "no notebooks yet"
fi

tests:
# the fast tier: unit tests and the sampler-free / short-chain recipe assertions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install validation dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e '.[validation]'

- name: Locate x4i3 database directory
run: echo "X4I3_DATA_DIR=$(python -c 'import importlib.util, pathlib; print(pathlib.Path(importlib.util.find_spec("x4i3").origin).parent / "data")')" >> "$GITHUB_ENV"

- name: Restore EXFOR database cache
uses: actions/cache@v4
with:
path: ${{ env.X4I3_DATA_DIR }}
key: exfor-db-${{ runner.os }}-${{ hashFiles('requirements.txt') }}

- name: Warm EXFOR database
run: python -c "import x4i3"

- name: Run unit tests
run: python -m pytest test

notebooks:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v4

fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'

cache: "pip"
- name: Install validation dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e '.[validation]' pytest-xdist

- name: Locate x4i3 database directory
run: echo "X4I3_DATA_DIR=$(python -c 'import importlib.util, pathlib; print(pathlib.Path(importlib.util.find_spec("x4i3").origin).parent / "data")')" >> "$GITHUB_ENV"

- name: Restore EXFOR database cache
uses: actions/cache@v4
with:
path: ${{ env.X4I3_DATA_DIR }}
key: exfor-db-${{ runner.os }}-${{ hashFiles('requirements.txt') }}

# single serial download; the concurrent notebook kernels spawned by
# xdist must find the database already in place (x4i3 downloads at
# import time outside pytest, so parallel kernels would race it)
- name: Warm EXFOR database
run: python -c "import x4i3"

- name: Run notebooks with pytest
run: python -m pytest -n 4 --nbmake --nbmake-timeout=1200 examples
python -m pip install -e '.[validation]'
- name: Run the fast tier
# the ten slowest tests are listed so the few-minute budget stays visible
run: python -m pytest --durations=10

docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'

cache: "pip"
- name: Install docs dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e '.[docs]'

- name: Locate x4i3 database directory
run: echo "X4I3_DATA_DIR=$(python -c 'import importlib.util, pathlib; print(pathlib.Path(importlib.util.find_spec("x4i3").origin).parent / "data")')" >> "$GITHUB_ENV"

- name: Restore EXFOR database cache
uses: actions/cache@v4
with:
path: ${{ env.X4I3_DATA_DIR }}
key: exfor-db-${{ runner.os }}-${{ hashFiles('requirements.txt') }}

- name: Warm EXFOR database
run: python -c "import x4i3"

- name: Build HTML docs
run: |
test -L docs/examples || ln -sf ../examples docs/examples
sphinx-build docs docs/_build/html -W --keep-going

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'

- name: Build distributions
run: |
python -m pip install --upgrade pip build
python -m build

- name: Install wheel
run: python -m pip install "$(ls -t dist/*.whl | head -n 1)"

- name: Locate x4i3 database directory
run: echo "X4I3_DATA_DIR=$(python -c 'import importlib.util, pathlib; print(pathlib.Path(importlib.util.find_spec("x4i3").origin).parent / "data")')" >> "$GITHUB_ENV"

- name: Restore EXFOR database cache
uses: actions/cache@v4
with:
path: ${{ env.X4I3_DATA_DIR }}
key: exfor-db-${{ runner.os }}-${{ hashFiles('requirements.txt') }}

- name: Wheel smoke test
run: python -c "import rxmc; import rxmc.config; import rxmc.walker"
if [ -d examples ]; then test -L docs/examples || ln -sf ../examples docs/examples; fi
sphinx-build -W --keep-going docs docs/_build/html
42 changes: 42 additions & 0 deletions .github/workflows/converged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Converged tier

# The numeric claims that need a converged sampler, and the example notebooks.
# Required for pushes and pull requests into main; run by hand on any branch
# with workflow_dispatch. There is deliberately no schedule.

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
converged:
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install validation dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e '.[validation]' pytest-xdist
- name: Run the converged tier
run: python -m pytest -m slow --durations=10
- name: Run the notebooks
run: |
if [ -d examples ] && ls examples/*.ipynb >/dev/null 2>&1; then
python -m pytest -n 4 --nbmake --nbmake-timeout=3600 examples
else
echo "no notebooks yet"
fi
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Build HTML docs
run: |
test -L docs/examples || ln -sf ../examples docs/examples
if [ -d examples ]; then test -L docs/examples || ln -sf ../examples docs/examples; fi
sphinx-build docs docs/_build/html -W --keep-going

- name: Upload pages artifact
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish to PyPI

# Trusted publishing: no token in the repository. Register the pending
# publisher on pypi.org (project rxmc, owner beykyle, repository rxmc,
# workflow publish.yml, environment pypi) before the first tag. Only 1.x and
# later tags publish (0.x lives on tag v0.1.0 and branch legacy/0.x), and the
# build refuses a tag that does not name the version setuptools_scm builds.
on:
push:
tags: ["v[1-9]*"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build sdist and wheel
run: |
python -m pip install --upgrade pip build
python -m build
- name: Check the tag names the built version
run: |
python - <<'EOF'
import glob, os
from packaging.version import Version
tag = os.environ["GITHUB_REF_NAME"].removeprefix("v")
built = os.path.basename(glob.glob("dist/*.whl")[0]).split("-")[1]
if Version(tag) != Version(built):
raise SystemExit(f"tag v{tag} builds version {built}: not publishing")
print(f"publishing {built}")
EOF
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
Loading
Loading