Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Tests

# One run per commit: PR events carry the CI; pushes only build main
# (Heart's ws_ci gate reads main-HEAD conclusions). Superseded runs are
# cancelled on PR refs only — a cancelled main run would read as red CI
# (cancelled is in Heart's FAILURE_CONCLUSIONS).
on:
push:
branches: [main]
pull_request:

concurrency:
group: main-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

# Unit tests are defined once, centrally, in PyAutoHeart's reusable workflow
# (Heart owns all health/readiness checking). This thin caller preserves PR-time
# gating: the `unittest` job is the required status check on this repo.
# autoreduce is standalone — no PyAuto* dependency chain is cloned.
jobs:
unittest:
uses: PyAutoLabs/PyAutoHeart/.github/workflows/lib-tests.yml@main
with:
package: autoreduce
secrets: inherit

# The staged workspace's offline-runnable tutorial scripts double as an
# integration smoke of the public API (TargetSpec dials + guard rails, the
# Casertano noise mathematics, the drizzle-dial trade study). Everything
# network-dependent in workspace/ is excluded — archive access does not
# belong in CI. This job moves out with workspace/ when it is extracted to
# the autoreduce_workspace repository.
workspace_smoke:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4

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

- name: Install autoreduce + plotting deps
run: |
pip install --upgrade pip setuptools wheel
pip install -e . matplotlib scipy

- name: Run offline workspace scripts
run: |
set -e
cd workspace
export MPLCONFIGDIR=/tmp/matplotlib
for s in scripts/guides/target_spec.py scripts/guides/noise_maps.py scripts/hst_acs/dials.py; do
echo "::group::$s"
python "$s"
echo "::endgroup::"
done
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ starred = ["starred-astro>=1.6"]
# (mask-only; pulls torch, hence not a base dependency). >=0.3 for the
# ACS-WFC / WFC3-UVIS model registry names.
frames = ["deepCR>=0.3"]
test = ["pytest"]
# drizzle: the one sanctioned heavy-ish test dependency — the nirc2_native
# resampler tests are importorskip-guarded on it, and installing it in CI
# makes them run rather than skip.
test = ["pytest", "drizzle>=2.0"]
dev = ["pytest", "black"]

[tool.pytest.ini_options]
Expand Down
Loading