diff --git a/.github/workflows/gpy-tutorials.yml b/.github/workflows/gpy-tutorials.yml index 8cd204c..b40de60 100644 --- a/.github/workflows/gpy-tutorials.yml +++ b/.github/workflows/gpy-tutorials.yml @@ -1,7 +1,6 @@ # Execute GPy/*.ipynb against a pinned GPy (CIP-0003). # -# GPy pin: 1.15.0 candidate (SheffieldML/GPy#1235, branch release/1.15.0). -# Switch the install line to `gpy==1.15.0` once that release is on PyPI. +# GPy pin: 1.15.0 on PyPI (SheffieldML/GPy#1235 merged, v1.15.0). # Do not float on GPy devel for the release-gate job. # # East Timor in GPyCrashCourse is loaded from datasets_mirror (PyPI pods 0.1.18 @@ -13,9 +12,8 @@ # climin is installed so SVI.ipynb and optimizer-implementation.ipynb are # required (CIP-0003 skip only applies when the extra is absent). # -# Do not add a "latest PyPI GPy" job until 1.15.0 is published. Current PyPI -# is 1.14.2; these notebooks target 1.15, and GitHub still paints -# continue-on-error jobs as failing checks. +# execute-latest installs current PyPI GPy without a version pin. It matches +# execute while 1.15.0 is latest, and becomes a canary after the next release. name: GPy tutorials on: @@ -54,10 +52,10 @@ jobs: with: python-version: "3.11" - - name: Install GPy 1.15.0 candidate, plotting, Jupyter + - name: Install GPy 1.15.0, plotting, Jupyter run: | python -m pip install --upgrade pip - python -m pip install "gpy[plotting] @ git+https://github.com/SheffieldML/GPy.git@refs/pull/1235/head" + python -m pip install "gpy[plotting]==1.15.0" python -m pip install nbclient ipykernel jupyter_client ipywidgets pods seaborn pandas climin python -c "import GPy, climin; print('GPy', getattr(GPy, '__version__', '?')); print('climin', climin.__file__)" @@ -74,3 +72,40 @@ jobs: name: executed-gpy-notebooks path: executed-gpy/ if-no-files-found: ignore + + execute-latest: + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + MPLBACKEND: Agg + MPLCONFIGDIR: ${{ github.workspace }}/.mplconfig + PYTHONUNBUFFERED: "1" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install latest PyPI GPy, plotting, Jupyter + run: | + python -m pip install --upgrade pip + python -m pip install "gpy[plotting]" + python -m pip install nbclient ipykernel jupyter_client ipywidgets pods seaborn pandas climin + python -c "import GPy, climin; print('GPy', getattr(GPy, '__version__', '?')); print('climin', climin.__file__)" + + - name: Register kernel + run: python -m ipykernel install --user --name python3 + + - name: Execute GPy tutorials + run: bash scripts/run_gpy_tutorials.sh --output-dir executed-gpy-latest + + - name: Upload executed notebooks + if: failure() + uses: actions/upload-artifact@v4 + with: + name: executed-gpy-latest-notebooks + path: executed-gpy-latest/ + if-no-files-found: ignore diff --git a/backlog/infrastructure/2026-10-24_gpy-tutorials-ci-runner.md b/backlog/infrastructure/2026-10-24_gpy-tutorials-ci-runner.md index 24267e5..1059121 100644 --- a/backlog/infrastructure/2026-10-24_gpy-tutorials-ci-runner.md +++ b/backlog/infrastructure/2026-10-24_gpy-tutorials-ci-runner.md @@ -1,7 +1,7 @@ --- id: "2026-10-24_gpy-tutorials-ci-runner" title: "Add nbclient runner and GitHub Actions for GPy tutorials" -status: "In Progress" +status: "Completed" priority: "High" created: "2026-10-24" last_updated: "2026-10-24" @@ -25,7 +25,7 @@ tags: ## Description -Add `scripts/run_gpy_tutorials.sh` (nbclient, `MPLBACKEND=Agg`, per-notebook timeout, climin skip policy) and a GitHub Actions workflow: Python 3.12, install GPy pinned to the 1.15.0 candidate (`gpy==1.15.0` once published; until then `release/1.15.0` or the #1235 SHA) plus `gpy[plotting]`, Jupyter (`nbclient`, `ipykernel`). Upload executed notebooks on failure. Point the README GPy tutorial section at the workflow badge. +Add `scripts/run_gpy_tutorials.sh` (nbclient, `MPLBACKEND=Agg`, per-notebook timeout, climin skip policy) and a GitHub Actions workflow: Python 3.11, install GPy pinned to `gpy[plotting]==1.15.0` plus Jupyter (`nbclient`, `ipykernel`). Upload executed notebooks on failure. Point the README GPy tutorial section at the workflow badge. A second `execute-latest` job installs unpinned `gpy[plotting]`. Skip `SVI.ipynb` and `optimizer-implementation.ipynb` when climin is not installed, with the skip documented. `index.ipynb` has no required code. Fail the job if a required notebook raises. @@ -35,6 +35,8 @@ Skip `SVI.ipynb` and `optimizer-implementation.ipynb` when climin is not install - [x] GitHub Actions workflow pins GPy and runs the script on this repository - [x] README GPy tutorial section shows the workflow badge - [x] Job does not use Plotly Cloud credentials +- [x] `execute` installs `gpy[plotting]==1.15.0` from PyPI +- [x] `execute-latest` installs current PyPI `gpy[plotting]` ## Implementation Notes @@ -52,4 +54,4 @@ Run with cwd such that `import GPy` resolves the library, not this repo's `GPy/` Task created as Ready after CIP-0003 was accepted. -Added `scripts/run_gpy_tutorials.py` / `.sh` and `.github/workflows/gpy-tutorials.yml` (Python 3.12, GPy from SheffieldML/GPy#1235, climin skip). Local execute against the installed GPy passed required notebooks (climin pair skipped). First Actions green run is still pending. +Added `scripts/run_gpy_tutorials.py` / `.sh` and `.github/workflows/gpy-tutorials.yml` (Python 3.11, climin required). PR #24 `execute` went green against the GPy 1.15.0 git candidate. After v1.15.0 on PyPI, pin `execute` to `gpy[plotting]==1.15.0` and restore `execute-latest`. Marked Completed. diff --git a/cip/cip0003.md b/cip/cip0003.md index 3abe508..8081bc3 100644 --- a/cip/cip0003.md +++ b/cip/cip0003.md @@ -70,19 +70,17 @@ ahead of a green run. - **Command:** `nbclient` or `jupyter execute`, `MPLBACKEND=Agg`, per-notebook timeout, kernel from the job env. -- **GPy pin:** install GPy from a version or git SHA recorded in the workflow - (`gpy==1.15.0` once published; until then the `release/1.15.0` branch or - #1235 SHA). Do not float on GPy `devel` for the release-gate run. +- **GPy pin:** `gpy[plotting]==1.15.0` from PyPI (v1.15.0 published + 2026-10-24). Do not float on GPy `devel` for the release-gate run. - **Python:** 3.11 (GPy 1.15 supports it; climin 0.1a1 still `import imp`, which Python 3.12 removed). - **Extras:** `gpy[plotting]` plus Jupyter (`nbclient`, `ipykernel`), `pods`, and `climin` so SVI/optimizer notebooks are required. East Timor in `GPyCrashCourse` is loaded from `lawrennd/datasets_mirror` until - `pods.datasets.east_timor` is on PyPI. Do not run a second job against - current PyPI GPy until 1.15.0 is published: 1.14.2 still uses the Plotly - matplotlib path these tutorials left, and `continue-on-error` still shows - as a failed GitHub check. After the release, switch the pin to - `gpy==1.15.0` (or add a latest job that is the same install). + `pods.datasets.east_timor` is on PyPI. A second Actions job + (`execute-latest`) installs current PyPI `gpy[plotting]` without a + version pin. While 1.15.0 is latest the two jobs match; after the next + GPy release, `execute-latest` is the canary. - **Where:** GitHub Actions **in this repository** (the files under test live here). GPy may later add a complementary job that checks out a **pinned SHA of this repo**; that is GPy's CIP, not this one. @@ -100,7 +98,7 @@ Other directories stay unexecuted until a later CIP. 2. GitHub Actions workflow: Python 3.12, install pinned GPy + extras, run the script, upload executed notebooks on failure. 3. Record the GPy pin and climin skip policy in the workflow comments. -4. First green run against the 1.15.0 candidate; comment on GPy#1235. +4. First green run against the 1.15.0 candidate; comment on GPy#1235 after PyPI pin. 5. Point README GPy tutorial section at the workflow badge. ## Backward Compatibility @@ -119,7 +117,8 @@ check when they edit `GPy/` tutorials. - [x] Manual execute against GPy 1.15.0; inventory failures - [x] Accept CIP after review - [x] Runner script + Actions workflow -- [ ] Green run on GPy 1.15.0 candidate +- [x] Green run on GPy 1.15.0 candidate (PR #24) +- [x] Pin `execute` to PyPI `gpy[plotting]==1.15.0`; restore `execute-latest` - [x] README badge - [ ] Close CIP