Skip to content

Revise citation and licensing details in README #9

Revise citation and licensing details in README

Revise citation and licensing details in README #9

name: rebuild-analysis
# Level-2 rebuild: from a clean checkout, install the package, regenerate the
# manuscript tables and figures from the curated CSVs, and run the test suite.
# No raw hyperspectral cubes, no GPU. The rebuilt outputs are uploaded as a
# run artifact so a reviewer can inspect them without running anything.
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 3 1 * *" # monthly, so bit-rot surfaces before a reviewer finds it
workflow_dispatch:
jobs:
rebuild:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e . --no-deps
- name: Rebuild tables
run: python scripts/export_tables.py
- name: Rebuild figures
run: python scripts/generate_figures.py
- name: Check the rebuild produced something
run: |
test -d outputs/derived/tables || { echo "::error::no tables produced"; exit 1; }
test -d outputs/derived/figures || { echo "::error::no figures produced"; exit 1; }
echo "Tables:"; ls -la outputs/derived/tables
echo "Figures:"; ls -la outputs/derived/figures
- name: Test suite
run: |
python -m pip install pytest
pytest -q
- name: Upload rebuilt outputs
if: always()
uses: actions/upload-artifact@v4
with:
name: rebuilt-analysis
path: outputs/derived/
if-no-files-found: warn