From 5c62ec769b7ba251f1a55e4b1ebbd521312a5012 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 26 Jun 2026 15:31:18 +1000 Subject: [PATCH 1/3] [linkcheck] Clear residual false positives in weekly lychee report The weekly link checker (#933) flags 8 errors out of ~25k links, all false positives or harmless artifacts on non-content pages: - IEEE Xplore returns "202 Accepted" (anti-bot) for a valid DOI cited in zreferences.html -> add 202 to --accept. - genindex / search / prf-prf are auto-generated utility pages with no source notebook, so the theme's "Download Notebook" button points at a nonexistent _notebooks/.ipynb and renders a second href="None" -> --exclude-path those three pages. - A Journal of Derivatives DOI redirects into a login/paywall loop that exceeds max-redirects; the citation itself is valid -> --exclude it. Configuration is kept inline in the workflow args (rather than a lychee.toml) because lychee runs against the gh-pages checkout, which does not contain repo-root config files. Closes #933 Co-Authored-By: Claude Opus 4.8 --- .github/workflows/linkcheck.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 1c9afee00..567bb58d9 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -24,7 +24,31 @@ jobs: # --root-dir resolves root-relative links (e.g. /_notebooks/*.ipynb, # /_pdf/quantecon-python.pdf) against the gh-pages checkout so they are # not reported as errors. See QuantEcon/lecture-python.myst#906. - args: --root-dir ${{ github.workspace }} --accept 200,403,503 *.html + # + # The flags below clear the residual false positives reported in + # QuantEcon/lecture-python.myst#933. Configuration is kept inline (rather + # than a lychee.toml) because lychee runs against the gh-pages checkout, + # which does not contain repo-root config files. + # --accept 202 IEEE Xplore returns "202 Accepted" (anti-bot) for + # valid links, e.g. doi.org/10.1109/TAC.1977.1101561 + # --exclude-path ... genindex / search / prf-prf are auto-generated + # utility pages with no source notebook, so the + # theme's "Download Notebook" button points at a + # nonexistent _notebooks/.ipynb (and renders a + # second button with href="None"). They carry no + # unique content links, so skipping them loses no + # coverage. + # --exclude Journal of Derivatives DOI redirects into a + # login/paywall loop (exceeds max-redirects); the + # citation itself is valid. + args: >- + --root-dir ${{ github.workspace }} + --accept 200,202,403,503 + --exclude-path genindex.html + --exclude-path search.html + --exclude-path prf-prf.html + --exclude '10\.3905/jod\.2012\.20\.1\.038' + *.html - name: Create Issue From File if: steps.lychee.outputs.exit_code != 0 uses: peter-evans/create-issue-from-file@v6 From e43871b903e52d6f42f5cff72acbcf043e2a5bd4 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 26 Jun 2026 16:08:28 +1000 Subject: [PATCH 2/3] [linkcheck] Escape and anchor --exclude-path regexes lychee treats --exclude-path values as regular expressions, so the unescaped dots in genindex.html / search.html / prf-prf.html were regex wildcards and the patterns were unanchored. Escape the dot and anchor the end ('\.html$') so each matches only the intended generated page. Addresses Copilot review feedback on #934. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/linkcheck.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 567bb58d9..6e447db95 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -44,9 +44,9 @@ jobs: args: >- --root-dir ${{ github.workspace }} --accept 200,202,403,503 - --exclude-path genindex.html - --exclude-path search.html - --exclude-path prf-prf.html + --exclude-path 'genindex\.html$' + --exclude-path 'search\.html$' + --exclude-path 'prf-prf\.html$' --exclude '10\.3905/jod\.2012\.20\.1\.038' *.html - name: Create Issue From File From 57d248a78751501dc23bcdd72ce9ad1039f790be Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 26 Jun 2026 17:15:46 +1000 Subject: [PATCH 3/3] Force on-demand GPU runners (spot=false) AWS spot reclamation has been interrupting the g4dn.2xlarge GPU notebook builds mid-run, discarding the whole build. Add spot=false to the RunsOn runner spec in all four GPU workflows (cache, ci, collab, publish) so they run on on-demand instances. Rolls out the org-wide decision in QuantEcon/meta#330; mirrors QuantEcon/lecture-jax#327. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/cache.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/collab.yml | 2 +- .github/workflows/publish.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 30be2cb75..ecf5b666a 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: cache: - runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb" + runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb/spot=false" steps: - uses: actions/checkout@v7 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee62abc58..8beb472c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: type: string jobs: preview: - runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb" + runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb/spot=false" permissions: contents: read pull-requests: write diff --git a/.github/workflows/collab.yml b/.github/workflows/collab.yml index 6edcb01e1..bd406a305 100644 --- a/.github/workflows/collab.yml +++ b/.github/workflows/collab.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: execution-checks: - runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=ubuntu24-gpu-x64/volume=80gb" + runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=ubuntu24-gpu-x64/volume=80gb/spot=false" permissions: issues: write # required for creating issues on execution failure container: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 20f543543..465aecf27 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,7 +6,7 @@ on: jobs: publish: if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') - runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb" + runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb/spot=false" steps: - name: Checkout uses: actions/checkout@v7