Skip to content

Commit 17794c5

Browse files
committed
Document linkcheck policy and contributor test commands
Explain how to run full local linkcheck and the pytest suite through Nox, including report locations and the use of temporary repositories in tests. Describe exact-base filtering and cache-miss generation for PRs and merge queues. Distinguish informational full checks after main pushes from failing daily monitoring, and point contributors to uploaded reports and job summaries when investigating link failures.
1 parent 2264501 commit 17794c5

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

‎source/contribute.rst‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,41 @@ command:
158158
The guide will be browsable via http://localhost:8000.
159159

160160

161+
Checking links
162+
==============
163+
164+
To check links locally, run:
165+
166+
.. code-block:: bash
167+
168+
nox -s linkcheck
169+
170+
This checks all links, except those explicitly excluded in ``source/conf.py``.
171+
Reports are written to ``build/output.txt`` and ``build/output.json``.
172+
173+
In CI, pull requests and merge queues check external URLs that are absent from
174+
the base revision's linkcheck report. New paths and fragments count as new URLs.
175+
The base report is cached, or generated on demand if the cache is missing.
176+
Local links are still checked.
177+
178+
After pushes to ``main``, full linkcheck reports failures without failing the
179+
aggregate ``check`` job. The daily run at 06:00 UTC checks all links and fails on
180+
broken links. Both runs upload reports and list failing URLs in the job summary.
181+
182+
183+
Testing the linkcheck tooling
184+
=============================
185+
186+
When changing the linkcheck tooling, run its pytest suite:
187+
188+
.. code-block:: bash
189+
190+
nox -s tests
191+
192+
Nox installs the test dependencies automatically. The tests use a local HTTP
193+
server and temporary Git repositories. They also run in CI.
194+
195+
161196
Where the guide is deployed
162197
===========================
163198

0 commit comments

Comments
 (0)