Skip to content

Commit

Permalink
test: configure linkcheck_allowed_redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfischer committed Dec 5, 2023
1 parent 421e833 commit 82f7fc0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ jobs:
- name: Check links in documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPHINXOPTS: "-W --keep-going"
run: poetry run make -C docs linkcheck
16 changes: 16 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ def canonical_url() -> str:
html_title = f"{project} v{release}"


linkcheck_allowed_redirects = {
r"https://cadquery\.readthedocs\.io/.*": (
r"https://cadquery\.readthedocs\.io/en/latest/.*"
),
r"https://cq-electronics\.readthedocs\.io/.*": (
r"https://cq-electronics\.readthedocs\.io/en/latest/.*"
),
r"https://open-source-rover\.readthedocs\.io/.*": (
r"https://open-source-rover\.readthedocs\.io/en/latest/.*"
),
r"https://sphinxcontrib-cadquery\.readthedocs\.io/.*": (
r"https://sphinxcontrib-cadquery\.readthedocs\.io/en/latest/.*"
),
r"https://www\.sphinx-doc\.org/.*": r"https://www\.sphinx-doc\.org/en/master/.*",
}

linkcheck_ignore = [
"https://roverchallenge.eu/", # SSLCertVerificationError
"https://www.kickstarter.com/", # returns 403 for robots
Expand Down
2 changes: 1 addition & 1 deletion docs/related-projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Documentation
* https://github.com/nasa-jpl/osr-rover-code

Website
https://open-source-rover.readthedocs.io
https://open-source-rover.readthedocs.io/

.. figure:: _static/images/related-projects/jpl-osr-v1.*
:alt: JPL Open Source Rover
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[flake8]
doctests = true
extend-ignore = E203
max-complexity = 6
max-line-length = 88

0 comments on commit 82f7fc0

Please sign in to comment.