From ea0045c8b6ac63ba8217c90a1410a1019f841472 Mon Sep 17 00:00:00 2001 From: "Alexander V. Hopp" Date: Thu, 20 Aug 2026 12:07:56 +0200 Subject: [PATCH 1/6] Use lychee for linkchecking --- .github/workflows/ci.yml | 13 ++++++++++++- lychee.toml | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 lychee.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d04a798b86..79dbb88a16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,10 +73,21 @@ jobs: pip install tox-uv tox -e lint-${{ matrix.py-version.tox }} + lychee: + name: "Link Check" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + with: + persist-credentials: false + - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 + with: + args: --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md + build-docs: name: "Build Docs" runs-on: ubuntu-latest - needs: [lint] + needs: [lint, lychee] permissions: contents: read pages: write # Required to deploy to GitHub Pages diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 0000000000..5a46fb02a9 --- /dev/null +++ b/lychee.toml @@ -0,0 +1,7 @@ +# External link check. Keep `exclude` in sync with `linkcheck_ignore` in docs/conf.py. +scheme = ["https", "http"] +exclude = [ + "https://github\\.com/b-shields/edbo/blob.*", + "https://doi\\.org/10\\.26434/chemrxiv\\.10001986/v2", + "https://doi\\.org/10\\.1039/D5DD00050E", +] From 5ff0e9d946c9c609336b2efabcc436b52d60065a Mon Sep 17 00:00:00 2001 From: "Alexander V. Hopp" Date: Thu, 20 Aug 2026 12:55:48 +0200 Subject: [PATCH 2/6] Use `dummy ` instead of `linkcheck` builder Checking of external links is no longer handled by the `linkcheck` builder. The `dummy ` builder is used instead, which does not check external links but still checks internal links. --- docs/scripts/check_links.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/scripts/check_links.py b/docs/scripts/check_links.py index a2e3b415ac..8e4c525af7 100644 --- a/docs/scripts/check_links.py +++ b/docs/scripts/check_links.py @@ -1,16 +1,18 @@ -"""Utility for checking the links of the documentation.""" +"""Utility for checking the cross-references of the documentation.""" from subprocess import check_call def check_links() -> None: - """Check whether the links of the documentation are valid.""" - link_call = [ - "sphinx-build", - "-b", - "linkcheck", - "docs", - "docs/build", - ] - - check_call(link_call) + """Check that documentation cross-references resolve (external links: lychee).""" + check_call( + [ + "sphinx-build", + "-b", + "dummy", + "docs", + "docs/build", + "-n", + "-W", + ] + ) From b95d732aacea719e52d6e33cbcb9c5e37fb2ddea Mon Sep 17 00:00:00 2001 From: "Alexander V. Hopp" Date: Thu, 20 Aug 2026 13:41:29 +0200 Subject: [PATCH 3/6] Specify root-dir for lychee --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79dbb88a16..09c0d657ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: persist-credentials: false - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 with: - args: --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md + args: --root-dir ${{ github.workspace }} --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md build-docs: name: "Build Docs" From 00d445f1e7f468d549556b411147f38e0cdd8746 Mon Sep 17 00:00:00 2001 From: "Alexander V. Hopp" Date: Thu, 20 Aug 2026 13:47:08 +0200 Subject: [PATCH 4/6] Add --verbose flag --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09c0d657ea..e7e6c8de1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: persist-credentials: false - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 with: - args: --root-dir ${{ github.workspace }} --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md + args: --verbose --root-dir ${{ github.workspace }} --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md build-docs: name: "Build Docs" From 657127d1145455d6b0d9ae997cd1118317ef8bc6 Mon Sep 17 00:00:00 2001 From: "Alexander V. Hopp" Date: Thu, 20 Aug 2026 14:24:04 +0200 Subject: [PATCH 5/6] Use more verbose output for lychee --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7e6c8de1c..144099239a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: persist-credentials: false - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 with: - args: --verbose --root-dir ${{ github.workspace }} --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md + args: -vv --root-dir ${{ github.workspace }} --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md build-docs: name: "Build Docs" From 22d45fe59cfb17816b5374ee9d62488ffe5c9644 Mon Sep 17 00:00:00 2001 From: "Alexander V. Hopp" Date: Mon, 31 Aug 2026 11:40:50 +0200 Subject: [PATCH 6/6] Remove -n and -W flags from dummy build --- docs/scripts/check_links.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/scripts/check_links.py b/docs/scripts/check_links.py index 8e4c525af7..a374af0e8f 100644 --- a/docs/scripts/check_links.py +++ b/docs/scripts/check_links.py @@ -12,7 +12,5 @@ def check_links() -> None: "dummy", "docs", "docs/build", - "-n", - "-W", ] )