Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 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
a5645b7
Rebuild rxmc on JAX so autodiff works through log_posterior
beykyle Oct 28, 2026
01f844a
Bring the docs up to date with the JAX rewrite
beykyle Oct 28, 2026
a83a554
Scale the kernel nugget with each point's variance; keep data numpy i…
beykyle Oct 28, 2026
cb16e21
Port and re-run the calibration-basics notebooks on JAX
beykyle Oct 28, 2026
01a248b
Port and re-run the beyond-the-Gaussian notebooks on JAX
beykyle Oct 28, 2026
d64b17e
Port and re-run the reaction and study notebooks on JAX
beykyle Oct 28, 2026
378dc77
Describe the ported notebooks; make scikit-learn validation-only
beykyle Oct 28, 2026
c5acc51
Add an unconstrained parametrisation for gradient samplers
beykyle Oct 28, 2026
ca42507
Add recipe 41: sample with gradients (HMC/NUTS)
beykyle Oct 28, 2026
36d5602
Bound the unconstrained map by each prior's support too
beykyle Oct 28, 2026
af9ea93
Benchmark emcee, dynesty and NUTS per effective sample
beykyle Oct 28, 2026
f28353c
Report emcee's autocorrelation time in the sampler benchmark
beykyle Oct 28, 2026
53ada9f
Add the gradient_based_sampling notebook
beykyle Oct 28, 2026
2e2023c
Add rx.optimize.find_map and find_mle; expose Problem.support
beykyle Oct 28, 2026
2329f8c
Start each benchmarked sampler as it is usually used; add five samplers
beykyle Oct 28, 2026
23db5e9
Add batched log_prior, log_likelihood and prior_transform
beykyle Oct 30, 2026
d4a4d28
Score the sampler benchmark against reference posteriors; tune pocomc…
beykyle Oct 30, 2026
9327957
Give each notebook the sampler the benchmark finds correct and fastest
beykyle Oct 30, 2026
0e92cb5
Commit full notebook runs; run the notebooks quick in CI
beykyle Oct 30, 2026
ad919c4
linear_calibration: start at the MAP, check convergence, read the cov…
beykyle Nov 2, 2026
b405089
normalization: absorb error_models, the 0.x quartic, an honest scorecard
beykyle Nov 2, 2026
3508dcf
robust_likelihoods: four treatments of the same outliers, in shared f…
beykyle Nov 2, 2026
dbafd1f
Remove error_models, error_scale_and_usu and sharing_error_models
beykyle Nov 2, 2026
f2ec799
hierarchical_calibration: show the per-dataset coefficients, read the…
beykyle Nov 2, 2026
cbe77c8
gradient_based_sampling: split R-hat, honest starts, no ESS with dive…
beykyle Nov 2, 2026
fad50fa
gp_discrepancy: converged toy fits, every pull read, honest envelopes
beykyle Nov 2, 2026
2648d16
alpha_ca: unused angles, three evidence runs, terms compared in one s…
beykyle Nov 2, 2026
3fcde27
local_optical: Gross et al. 1967 data, a KD03 check, a two-mode poste…
beykyle Nov 2, 2026
bcd37c4
linear_calibration: enforce the convergence check, with split R-hat
beykyle Nov 3, 2026
c00e88c
normalization: correct what treatment 3 and the quote comparison show
beykyle Nov 3, 2026
9867311
robust_likelihoods: enforce convergence, describe the nu prior truthf…
beykyle Nov 3, 2026
1d0c689
hierarchical_calibration: fix the tau, bump and reference wording
beykyle Nov 3, 2026
ad5d016
gradient_based_sampling: show what the prose claims; fix the quick run
beykyle Nov 3, 2026
93f3f85
gp_discrepancy: split R-hat on the toy fits; what the length scale an…
beykyle Nov 3, 2026
d8e2205
alpha_ca: family weights per run, a timed solver check, honest unused…
beykyle Nov 3, 2026
9baf070
local_optical: start NUTS in both islands and report that it cannot w…
beykyle Nov 3, 2026
e5d7b37
benchmarks: omp on the Gross 1967 data, with a pooled pocomc reference
beykyle Nov 3, 2026
2a09ce1
local_optical: pocomc at 4096/2048; the heavy island is the one at th…
beykyle Nov 4, 2026
1dbe2fb
gp_discrepancy: pocomc at 4096/2048 on the cross-section ladder
beykyle Nov 4, 2026
5b574bb
alpha_ca: pocomc at 4096/2048; the family weights are now reproducible
beykyle Nov 4, 2026
3726aba
alpha_ca: name the kernel amplitude sigma_delta, alpha for parameters…
beykyle Nov 4, 2026
652e943
local_optical: define sigma_stat, heavier rather than larger island, …
beykyle Nov 4, 2026
a7b2617
linear_calibration: one notation for the likelihood
beykyle Nov 4, 2026
c96a280
StudentT's default nu prior is weakly informative; recipe 41 starts h…
beykyle Nov 4, 2026
ce1433a
normalization: omega for every width, treatment 3 named as the refere…
beykyle Nov 4, 2026
51683d3
robust_likelihoods: index the coverage levels directly
beykyle Nov 4, 2026
af53cdf
hierarchical_calibration: alpha_j for the school effects, softer tau …
beykyle Nov 4, 2026
cae16c5
gradient_based_sampling: no duplicate timings, no echoed tuple, clear…
beykyle Nov 4, 2026
ce7b881
gp_discrepancy: current band numbers, coverage after it is computed, …
beykyle Nov 4, 2026
fdd279e
Cut StudentT and the likelihood-parameter hook
beykyle Nov 4, 2026
4d1c511
Docs without StudentT: recipe 9 chooses the likelihood functional
beykyle Nov 4, 2026
f5f4608
predictive_draws(physical=True) maps draws back through the space
beykyle Nov 4, 2026
c2d46bd
Optimisers say when they fail; find_mle by gradient
beykyle Nov 4, 2026
72e08db
Benchmark: rank-normalised R-hat and ESS, chains started about the MAP
beykyle Nov 4, 2026
0c067f0
linear_calibration: 68 % intervals, coverage levels on a 0.05 grid
beykyle Nov 4, 2026
b829381
hierarchical_calibration: coverage levels on a 0.05 grid
beykyle Nov 4, 2026
1dd4693
robust_likelihoods: a global error scale in place of the Student-t
beykyle Nov 4, 2026
5ef12ba
normalization: 68 % bands; the dense mass matrix did not pass its gate
beykyle Nov 4, 2026
76df63f
Fixes from the Phase 1 review
beykyle Nov 4, 2026
eb19a2a
Optimisers: success agrees with n_success; a plateau test that is not…
beykyle Nov 4, 2026
e71b1eb
normalization: empirical coverage of each predictive in place of rang…
beykyle Nov 4, 2026
839f553
Benchmark: chain samplers rerun under rank-normalised R-hat and MAP s…
beykyle Nov 4, 2026
10a776f
benchmarks.md: numbers the check of the rerun found wrong
beykyle Nov 4, 2026
009592b
benchmarks.md, design.md: fixes from the Phase 2 code review
beykyle Nov 5, 2026
5495656
Benchmark references for modes and elastic under rank-normalised R-hat
beykyle Nov 5, 2026
3ab75f6
gp_discrepancy: pocomc at its single-mode setting; 68 % intervals (10…
beykyle Nov 5, 2026
1f32ca1
local_optical: median-one error model, one pocomc run, no NUTS check …
beykyle Nov 5, 2026
a2e38cd
gp_discrepancy: the gate run used the same seeds, not other seeds
beykyle Nov 5, 2026
5a0bd36
alpha_ca: median-one error model, one run per model, p on [0, 16] (50…
beykyle Nov 5, 2026
495dfd6
Phase 3 review fixes in the three slow notebooks; rerun
beykyle Nov 5, 2026
ae2f276
Text fixes from the Phase 3 code review
beykyle Nov 5, 2026
be1a9c7
Benchmark: the notebooks' exact optical-model problems, and cluster jobs
beykyle Nov 5, 2026
8e78cf2
Benchmark cluster runs as array jobs, one task per independent run
beykyle Nov 5, 2026
31d5c05
Benchmarks: a README, and a cluster driver for any subset
beykyle Nov 5, 2026
d8466ad
Coverage levels without the degenerate ends; review code items; rerun
beykyle Nov 5, 2026
30b4289
Benchmark cluster prep: fixes from the 4a review
beykyle Nov 5, 2026
ceddc57
design.md: drop a TensorFlow thread option from the MPI example's XLA…
beykyle Nov 5, 2026
8f9f2ab
Benchmark tests that run in seconds; pocomc run lengths configurable
beykyle Nov 5, 2026
8d4b17d
update readme
beykyle Nov 5, 2026
56598d2
Benchmark cluster prep: fixes from the 4a code review
beykyle Nov 5, 2026
ffdfde4
Benchmark: drop the earlier omp's results
beykyle Nov 5, 2026
a3f231b
Notebooks: fixes from the final review of the five settled notebooks
beykyle Nov 5, 2026
b1e0437
Benchmark cluster jobs: site settings as submit.py options, not edits
beykyle Nov 5, 2026
564096b
alpha_gp's reference: nine dynesty runs check it, not three
beykyle Nov 5, 2026
4aae448
Benchmark refresh of omp, alpha_gp and n40ca_gp from the cluster
beykyle Nov 5, 2026
a605f5a
docs/benchmarks.md: the discussion from the refreshed optical-model r…
beykyle Nov 5, 2026
a2ea56e
Relative terms are refused outside linear comparison space
beykyle Nov 6, 2026
1128c2c
Benchmark: verdicts within a reference's resolution are unresolved
beykyle Nov 6, 2026
61994e9
Docs and notebooks: state the current results, from the three reviews
beykyle Nov 6, 2026
82bf04d
gp_discrepancy: a relative error in log space, and pocomc at 4096/2048
beykyle Nov 6, 2026
ad5793f
Docs render their math; fixes from the verification review
beykyle Nov 6, 2026
73ea7dd
gradient_based_sampling: GP NUTS at target 0.99; vermillion titles
beykyle Nov 6, 2026
ec8c1c3
Benchmark: fifty dynesty runs check alpha_gp's and n40ca_gp's referen…
beykyle Nov 6, 2026
65bb7e8
Benchmark: fifty dynesty runs corroborate alpha_gp; the settings swee…
beykyle Nov 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
152 changes: 28 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,67 @@ 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 torch --index-url https://download.pytorch.org/whl/cpu # pocomc's, without CUDA
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 torch --index-url https://download.pytorch.org/whl/cpu # pocomc's, without CUDA
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
49 changes: 49 additions & 0 deletions .github/workflows/converged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Converged tier

# The numeric claims that need a converged sampler, and a quick run of 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 torch --index-url https://download.pytorch.org/whl/cpu # pocomc's, without CUDA
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
# quick: every sampler budget cut tenfold, to check that each cell
# runs; the committed outputs are full runs (examples/run.py), and
# nbmake does not write over them
env:
RXMC_EXAMPLES_QUICK: "1"
run: |
if [ -d examples ] && ls examples/*.ipynb >/dev/null 2>&1; then
python -m pytest -n 4 --nbmake --nbmake-timeout=900 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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ipython_config.py
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
uv.lock
#uv.lock

# agent/session config
.claude/
Expand Down Expand Up @@ -217,3 +217,6 @@ cython_debug/
.cursorignore
.cursorindexingignore
docs/jupyter_execute/

# cluster job logs (the result files themselves are committed)
benchmarks/results/hpc/logs/
Loading
Loading