Skip to content
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

Improving linkcheck #463

Conversation

eviau-artefactual
Copy link
Contributor

Per sphinx-doc/sphinx#8791 (comment) , adding the -q or quiet option flag to the Sphinx options will allow us to only print out errors (broken URLs).

@eviau-artefactual
Copy link
Contributor Author

Testing this: sphinx-doc/sphinx#10643

@eviau-artefactual
Copy link
Contributor Author

eviau-artefactual commented May 14, 2024

It worked - with a few changes from the action set up in aiven/devportal#1181

The license is https://github.com/aiven/devportal?tab=CC-BY-4.0-1-ov-file#readme - where/how should we make sure we do the attribution ?

@eviau-artefactual
Copy link
Contributor Author

Ok now it should work... but we will only know for sure when we make a change to a .rst file...

Copy link
Member

@replaceafill replaceafill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eviau-artefactual After testing your branch a bit I realized that for my original pain point of linkcheck being too noisy I can instead use make linkcheck SPHINXOPTS='-q' which I think shows me only errors and it's supported by the current Makefile.

Also, don't you think that running the linkcheck target only on changed files could prevent us from detecting broken links early coming from unchanged files?

@eviau-artefactual
Copy link
Contributor Author

About the -q option: note that we are still using it, it's on line 192 in the Makefile - https://github.com/artefactual/archivematica-docs/pull/463/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R192 should be a direct link :)

If there were no external contributors to the documentation, e.g. if it was the work of a single person - it would make sense to linkhceck every link every time... The way I see this, is that right now, PRs can fail tests for things that are not related to the PR itself. If we can figure out a better way to do linkcheck, that is more granular, I think it would be best!

Maybe this conversation belongs in an issue ? If so, I can open one.

@replaceafill
Copy link
Member

About the -q option: note that we are still using it, ...

I think my point is that we have always been able to set the -q flag for the existing linkcheck target. I just didn't know how to do it using SPHINXOPTS.

The way I see this, is that right now, PRs can fail tests for things that are not related to the PR itself.

Maybe that's what we need to fix.

Maybe this conversation belongs in an issue ? If so, I can open one.

Definitely and thank you! I think we've tried to address my pain points and yours in a single PR 😅

@eviau-artefactual
Copy link
Contributor Author

Issue 1690 reference the verbose results and makes them quiet.

Issue 1689 will follow through on the implementation of linkcheck.

Closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants