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

Docs link check #80

Merged
merged 7 commits into from
Nov 7, 2023
Merged

Docs link check #80

merged 7 commits into from
Nov 7, 2023

Conversation

lochhh
Copy link
Collaborator

@lochhh lochhh commented Nov 2, 2023

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
This PR

  • checks for broken/redirected links in the documentation using the Sphinx linkcheck builder.
  • centralises websites commonly referenced in the documentation to ease the management of external links.

What does this PR do?
This PR

  • updates redirected URLs to the redirect locations (as indicated by the Sphinx linkcheck builder).
  • creates aliases to base URLs of websites referenced more than once by collecting these under myst_url_schemes in conf.py.

References

This PR addresses #75.

How has this PR been tested?

The docs have been built locally.

Does this PR require an update to the documentation?

We may want to add linkcheck as an option in the docs: building the docs locally and/or include this step in the GitHub build docs workflow.

Checklist:

  • The code has been tested locally
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@lochhh lochhh requested a review from niksirbi November 2, 2023 17:14
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (45955d3) 98.05% compared to head (eee216f) 98.05%.

❗ Current head eee216f differs from pull request most recent head f890628. Consider uploading reports for the commit f890628 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files           8        8           
  Lines         308      308           
=======================================
  Hits          302      302           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niksirbi niksirbi linked an issue Nov 2, 2023 that may be closed by this pull request
@niksirbi niksirbi marked this pull request as ready for review November 3, 2023 09:07
Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

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

This is fantastic @lochhh! Will save us so much tume and headspace.

I have two comments:

  1. Should we document this in the CONTRIBUTING guide? Perhaps mention in the Editind the documetation section that external urls should be added to conf.py

  2. I found out I can run sphinx-build -b linkcheck docs/source docs/build locally to include link checking during the build. I have to add this to the relevant GitHub action, right?

docs/source/conf.py Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Nov 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@niksirbi
Copy link
Member

niksirbi commented Nov 7, 2023

This all seems to work fine now. Should we merge?

@lochhh
Copy link
Collaborator Author

lochhh commented Nov 7, 2023

This all seems to work fine now. Should we merge?

yep. Thanks for the review! I'll rebase #79 once this is merged.

@niksirbi niksirbi merged commit 08dd736 into main Nov 7, 2023
22 checks passed
@niksirbi niksirbi deleted the docs-link-check branch November 7, 2023 11:24
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.

Use the Sphinx external links extension
2 participants