Skip to content

Commit 16b8f1b

Browse files
authored
PYTHON-5888 Improve linkcheck usability (mongodb#2886)
1 parent 1215d2f commit 16b8f1b

3 files changed

Lines changed: 21 additions & 24 deletions

File tree

.evergreen/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ post:
4545
- func: "cleanup"
4646

4747
tasks:
48+
- name: linkcheck
49+
commands:
50+
- command: subprocess.exec
51+
type: test
52+
params:
53+
binary: bash
54+
args:
55+
- .evergreen/just.sh
56+
- docs-linkcheck
57+
working_dir: src
58+
4859
- name: resync_specs
4960
commands:
5061
- command: subprocess.exec
@@ -56,6 +67,14 @@ tasks:
5667
working_dir: src
5768

5869
buildvariants:
70+
- name: linkcheck
71+
display_name: "Link Check"
72+
run_on: rhel80-small
73+
cron: '0 0 * * *'
74+
patchable: true
75+
tasks:
76+
- name: linkcheck
77+
5978
- name: resync_specs
6079
display_name: "Resync Specs"
6180
run_on: rhel80-small

.github/workflows/test-python.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -154,27 +154,6 @@ jobs:
154154
- name: Build docs
155155
run: just docs
156156

157-
linkcheck:
158-
name: Link Check
159-
runs-on: ubuntu-latest
160-
steps:
161-
- uses: actions/checkout@v6.0.3
162-
with:
163-
persist-credentials: false
164-
- name: Install uv
165-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
166-
with:
167-
enable-cache: true
168-
python-version: "3.10"
169-
- name: Install just
170-
run: uv tool install rust-just
171-
- name: Install dependencies
172-
run: just install
173-
- name: Build docs
174-
run: just docs-linkcheck
175-
env:
176-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
178157
typing:
179158
name: Typing Tests
180159
runs-on: ubuntu-latest

doc/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@
9898
linkcheck_workers = 1
9999
# Give slow redirects more time before retrying.
100100
linkcheck_timeout = 60
101-
102-
# Ignore anchors in links since they may not be added to the page right away.
103-
linkcheck_anchors_ignore_for_url = [r"https://github.com/.*"]
101+
# Ignore anchors in links
102+
linkcheck_anchors = False
104103

105104
# Pass GitHub token to avoid rate-limiting on GitHub links.
106105
if github_token := os.environ.get("GITHUB_TOKEN"):

0 commit comments

Comments
 (0)