From ae80d30229573b84122310f850e9a633232d8c12 Mon Sep 17 00:00:00 2001 From: Max Freedom Pollard Date: Thu, 3 Sep 2026 23:28:45 -0400 Subject: [PATCH] CI: report the three transport directories, and reproduce the two OpenMC ones build.yml gains the three steps that #11, #13 and #15 could not carry because the token that pushed them lacked the workflow scope: the neutron report, the photon keystone census and the ampoule report, all from the committed data and none needing OpenMC or the network. openmc.yml is a second workflow, on changes to neutron/ or ampoule/ and on demand, that installs OpenMC 0.16 from conda-forge, streams the official ENDF/B-VIII.0 archive once into a cached data directory, and reruns the neutron gate and the ampoule at their quick budgets: the proof that the committed tallies can be regenerated from public code and data. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/build.yml | 6 +++ .github/workflows/openmc.yml | 101 +++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 .github/workflows/openmc.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 967a368..e2213b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,5 +35,11 @@ jobs: run: python transistor/make_datasheet_figure.py - name: compute the ampoule run: python transistor/sealed_unit.py + - name: report the neutron gate from the committed tallies (OpenMC itself runs in openmc.yml) + run: python neutron/report.py + - name: run the photon keystone census from the committed level schemes (no network) + run: python photon/census.py + - name: report the ampoule from the committed tallies (no OpenMC, no network) + run: python ampoule/report.py - name: rebuild index.html run: python build_html.py diff --git a/.github/workflows/openmc.yml b/.github/workflows/openmc.yml new file mode 100644 index 0000000..8004291 --- /dev/null +++ b/.github/workflows/openmc.yml @@ -0,0 +1,101 @@ +name: OpenMC reproductions +on: + push: + branches: [main] + paths: ["neutron/**", "ampoule/**", ".github/workflows/openmc.yml"] + pull_request: + paths: ["neutron/**", "ampoule/**", ".github/workflows/openmc.yml"] + workflow_dispatch: + +# Reproduces the two OpenMC directories at their quick budgets with the +# official ENDF/B-VIII.0 library. The main reproduce job rebuilds every +# results.md and figure from the committed tallies without OpenMC; these jobs +# are the proof that the tallies themselves can be regenerated from public +# code and data. Each job streams the 3.4 GB official archive once and keeps +# about 2 GB of it; the data directory is cached on the fetcher's own hash. +jobs: + neutron: + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v2 + with: + environment-name: openmc + create-args: >- + python=3.12 + openmc=0.16.0=*nompi* + numpy + matplotlib + h5py + init-shell: bash + cache-environment: true + - name: cache the ENDF/B-VIII.0 files the two directories use + uses: actions/cache@v4 + with: + path: neutron/data + key: endfb-viii.0-${{ hashFiles('neutron/data.py') }} + - name: fetch and verify the data + shell: micromamba-shell {0} + run: python neutron/data.py --verify + - name: calibrate against the handbook (quick) + shell: micromamba-shell {0} + run: python neutron/benchmarks.py --quick + - name: run the gate protocol (quick) + shell: micromamba-shell {0} + run: python neutron/gate.py --quick + - name: report + shell: micromamba-shell {0} + run: python neutron/report.py + - uses: actions/upload-artifact@v4 + with: + name: neutron-gate-quick + path: | + neutron/tallies.json + neutron/benchmarks.json + neutron/results.md + figures/fig15_neutron_gate.svg + figures/fig15_neutron_gate.png + + ampoule: + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v2 + with: + environment-name: openmc + create-args: >- + python=3.12 + openmc=0.16.0=*nompi* + numpy + matplotlib + h5py + init-shell: bash + cache-environment: true + - name: cache the ENDF/B-VIII.0 files the two directories use + uses: actions/cache@v4 + with: + path: neutron/data + key: endfb-viii.0-${{ hashFiles('neutron/data.py') }} + - name: fetch and verify the data + shell: micromamba-shell {0} + run: python neutron/data.py --verify + - name: calibrate the photon instrument + shell: micromamba-shell {0} + run: python ampoule/calibrate.py + - name: run the vessel (quick) + shell: micromamba-shell {0} + run: python ampoule/model.py --quick + - name: report + shell: micromamba-shell {0} + run: python ampoule/report.py + - uses: actions/upload-artifact@v4 + with: + name: ampoule-quick + path: | + ampoule/tallies.json + ampoule/calibration.json + ampoule/results.md + figures/fig17_ampoule.svg + figures/fig17_ampoule.png