-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add linkcheck test for the docs #6543
Conversation
I'm -1 on putting this on travis, but +1 on having this in our tox env. The reason is that linkcheck is really slow. And we should be using the |
True that |
Fair enough. Tests take ~20 min, and linkcheck takes ~11 min |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
You can probably speed it up if you add a few more ignores: linkcheck_ignore = [
...,
r'https://github\.com/readthedocs/readthedocs\.org/issues',
r'https://github\.com/readthedocs/readthedocs\.org/pull',
r'https://docs\.readthedocs\.io/\?rtd_search',
r'https://readthedocs\.org/search',
] |
@mgeier Confirmed the speedup locally, 3min instead of 10min. |
be30dd8
to
9b2b724
Compare
the links refer to the issues and PRs of readthedocs.org on github, as well as the search pages of readthedocs.io and docs.readthedocs.io
9b2b724
to
d70c062
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine. While I feel our tests already take forever, this seems like a worthwhile check.
There are definitely some broken links in our docs (mostly example code) that could be fixed.
Since it is hard for big documentations to keep all links up with changes in a project, it's a good idea to check the links are working, to prevent broken links as in #6525 and #6541.
Luckily
sphinx
has this feature built in, so I added it to the test suite.To prevent the test suite from false positive breaking, i.e. if a website is temporarily down, I made the test allow_failures in the travis build matrix.
I also added some url patterns to be ignored by the test, since they are only an example case, are local development only or test false positive since the ref is generated by javascript.