From 90213f308e8365042c87a4b3793697617e59a83c Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 17 Jul 2026 08:46:56 +0100 Subject: [PATCH] CTI resurrection Phase 3: modern CI caller + readthedocs config (#88) Replaces the 2-year-old main.yml (actions/checkout@v2, set-output, requirements.txt installs) with the standard thin caller of PyAutoHeart's reusable lib-tests.yml (package: autocti). readthedocs.yaml is replaced by a modern .readthedocs.yaml (ubuntu-22.04, py3.12, pip install .[docs], GSL apt package + the arcticpy no-deps build in post_install). Co-Authored-By: Claude Fable 5 --- .github/workflows/main.yml | 81 ++++---------------------------------- .readthedocs.yaml | 25 ++++++++++++ readthedocs.yaml | 15 ------- 3 files changed, 32 insertions(+), 89 deletions(-) create mode 100644 .readthedocs.yaml delete mode 100644 readthedocs.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a9c881a8..cc1d2d47 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,79 +2,12 @@ name: Tests on: [push, pull_request] +# 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. jobs: unittest: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.9, '3.10', '3.11', '3.12'] - steps: - - name: Checkout PyAutoConf - uses: actions/checkout@v2 - with: - repository: rhayes777/PyAutoConf - path: PyAutoConf - - name: Checkout PyAutoFit - uses: actions/checkout@v2 - with: - repository: rhayes777/PyAutoFit - path: PyAutoFit - - name: Checkout PyAutoArray - uses: actions/checkout@v2 - with: - repository: Jammy2211/PyAutoArray - path: PyAutoArray - - name: Checkout PyAutoCTI - uses: actions/checkout@v2 - with: - repository: Jammy2211/PyAutoCTI - path: PyAutoCTI - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Extract branch name - shell: bash - run: | - cd PyAutoCTI - echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Change to same branch if exists in deps - shell: bash - run: | - export PACKAGES=("PyAutoConf" "PyAutoArray" "PyAutoFit") - export BRANCH="${{ steps.extract_branch.outputs.branch }}" - for PACKAGE in ${PACKAGES[@]}; do - pushd $PACKAGE - export existed_in_remote=$(git ls-remote --heads origin ${BRANCH}) - - if [[ -z ${existed_in_remote} ]]; then - echo "Branch $BRANCH did not exist in $PACKAGE" - else - echo "Branch $BRANCH did exist in $PACKAGE" - git fetch - git checkout $BRANCH - fi - popd - done - - name: Install dependencies - run: | - pip3 install --upgrade pip - pip3 install setuptools - pip3 install wheel - pip3 install pytest coverage pytest-cov - pip3 install -r PyAutoConf/requirements.txt - pip3 install -r PyAutoFit/requirements.txt - pip3 install -r PyAutoArray/requirements.txt - pip3 install -r PyAutoArray/optional_requirements.txt - pip3 install -r PyAutoCTI/requirements.txt - pip3 install -r PyAutoCTI/optional_requirements.txt - - name: Run tests - run: | - export ROOT_DIR=`pwd` - export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoConf - export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoFit - export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoArray - export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoCTI - pushd PyAutoCTI - pytest --cov autocti --cov-report xml:coverage.xml + uses: PyAutoLabs/PyAutoHeart/.github/workflows/lib-tests.yml@main + with: + package: autocti + secrets: inherit diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..22c85fe3 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,25 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.12" + apt_packages: + - libgsl-dev + jobs: + post_install: + # arcticpy is a source-only C++ sdist whose own requirements downgrade + # numpy below 2.0 — install numpy first, then build without deps. + - pip install numpy + - pip install arcticpy==2.6 --no-build-isolation --no-deps + +python: + install: + - method: pip + path: . + extra_requirements: + - docs + +sphinx: + configuration: docs/conf.py + fail_on_warning: false diff --git a/readthedocs.yaml b/readthedocs.yaml deleted file mode 100644 index af29d8b1..00000000 --- a/readthedocs.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: 2 - -build: - os: ubuntu-20.04 - tools: - python: "3.11" - apt_packages: - - libgsl-dev - -python: - install: - - requirements: docs/requirements.txt - -sphinx: - configuration: docs/conf.py \ No newline at end of file