From 15c013b90f2f56a662487b7b13ea7ce96572a8e9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 19:37:53 +0000 Subject: [PATCH] ci: consume Heart's canonical arcticpy install instead of a local copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The arcticpy recipe had drifted into four shell copies across the CTI repos with no single owner. Heart now owns it as a composite action; this repo drops its copy and asks for it. - .github/workflows/smoke_tests.yml passes `arcticpy: true`, so Heart's smoke-tests.yml runs install-arcticpy before this workspace's epilogue. - .github/scripts/smoke_install.sh loses the recipe, keeping only what is genuinely workspace-specific (the chain install and the autonerves re-pin). This also removes a silent cross-repo coupling: the epilogue's correctness depended on a `pip install --upgrade pip setuptools wheel` line in Heart's workflow, with nothing stating the dependency. - AGENTS.md: the documented recipe said "after numpy+cython" and omitted setuptools, which is a BUILD dependency that --no-build-isolation will not supply and that Python 3.12+ venvs no longer ship. It also omitted scipy and matplotlib, which arcticpy/read_noise.py imports at import time and which --no-deps suppresses — without them `import arcticpy` raises ModuleNotFoundError. Recipe corrected and verified against a clean build. Refs PyAutoLabs/PyAutoHeart#170 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018nDAxBEavkzb6Zkz1cYHef --- .github/scripts/smoke_install.sh | 17 +++++++++++------ .github/workflows/smoke_tests.yml | 4 ++++ AGENTS.md | 20 +++++++++++++++----- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/scripts/smoke_install.sh b/.github/scripts/smoke_install.sh index 276eea0..1514ec1 100755 --- a/.github/scripts/smoke_install.sh +++ b/.github/scripts/smoke_install.sh @@ -4,12 +4,17 @@ # checkout root (the dependency chain is cloned beside `workspace/`). set -e -# arcticpy (the C++ arctic clocking code) is a hard import of autocti but not -# a pip dependency: its sdist is source-only (needs libgsl-dev + cython) and -# its own requirements downgrade numpy below 2.0. -sudo apt-get update && sudo apt-get install -y libgsl-dev -pip install numpy cython -pip install arcticpy==2.6 --no-build-isolation --no-deps +# arcticpy is NOT installed here. It is a hard import of autocti but not a pip +# dependency, and its recipe (source-only C++ sdist, libgsl-dev, a +# numpy-downgrade trap, --no-build-isolation build deps) is fiddly enough that +# four repos had drifted apart carrying copies of it. It now belongs to the +# organ that owns the reusable workflows: +# +# PyAutoHeart/.github/actions/install-arcticpy +# +# and this workspace asks for it with `arcticpy: true` in +# .github/workflows/smoke_tests.yml, which runs it before this epilogue. +# Everything left in this file is genuinely workspace-specific. pip install ./PyAutoNerves ./PyAutoFit ./PyAutoArray ./PyAutoCTI pip install "./PyAutoArray[optional]" diff --git a/.github/workflows/smoke_tests.yml b/.github/workflows/smoke_tests.yml index 454bd95..d59e3da 100644 --- a/.github/workflows/smoke_tests.yml +++ b/.github/workflows/smoke_tests.yml @@ -22,4 +22,8 @@ jobs: uses: PyAutoLabs/PyAutoHeart/.github/workflows/smoke-tests.yml@main with: chain: "PyAutoNerves PyAutoFit PyAutoArray PyAutoCTI" + # `import autocti` needs arcticpy, whose install recipe is owned centrally + # by PyAutoHeart/.github/actions/install-arcticpy rather than copied into + # this workspace's epilogue. Heart runs it before smoke_install.sh. + arcticpy: true secrets: inherit diff --git a/AGENTS.md b/AGENTS.md index 6284e82..2c39269 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,9 +4,16 @@ This is the integration-test suite for **PyAutoCTI**, run in CI to verify the co end-to-end. It is **not** a user-facing workspace — see `../autocti_workspace` for examples and tutorials. These are the canonical, agent-agnostic instructions for this repo. -Dependencies: `autocti`, `autofit`, `autoarray`, and **arcticpy** (source-only C++ sdist — install -with `pip install arcticpy==2.6 --no-build-isolation --no-deps` after numpy+cython, with -`libgsl-dev` present; see `PyAutoCTI/AGENTS.md`). +Dependencies: `autocti`, `autofit`, `autoarray`, and **arcticpy** (source-only C++ sdist; the +full install recipe is in `PyAutoCTI/AGENTS.md` §arcticpy, and CI runs it from +`PyAutoHeart/.github/actions/install-arcticpy`). Short form: + +```bash +sudo apt-get install -y libgsl-dev +pip install --upgrade pip setuptools wheel # setuptools is a BUILD dep; 3.12+ venvs omit it +pip install numpy cython scipy matplotlib +pip install arcticpy==2.6 --no-build-isolation --no-deps +``` ## Repository Structure @@ -30,8 +37,11 @@ python scripts/dataset_1d/model_fit.py # one script, real search (no env applie ``` CI runs the smoke list through PyAutoHeart's reusable smoke workflow (thin caller in -`.github/workflows/smoke_tests.yml`, chain `PyAutoNerves PyAutoFit PyAutoArray PyAutoCTI`; the -arcticpy build lives in `.github/scripts/smoke_install.sh`). +`.github/workflows/smoke_tests.yml`, chain `PyAutoNerves PyAutoFit PyAutoArray PyAutoCTI`). The +arcticpy build is **not** in `.github/scripts/smoke_install.sh` any more: the caller passes +`arcticpy: true` and Heart runs its own `install-arcticpy` action before the epilogue, so the +recipe has one owner instead of a copy per repo. `smoke_install.sh` now holds only the +workspace-specific chain install. ## Conventions