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] Make build actually strict #535

Merged
merged 11 commits into from
Jun 21, 2024
Merged

[Docs] Make build actually strict #535

merged 11 commits into from
Jun 21, 2024

Conversation

antonymilne
Copy link
Contributor

@antonymilne antonymilne commented Jun 18, 2024

Description

We run mkdocs build with --strict in order to catch errors like broken links, but this isn't doing anything because by default the messages are raised with level iNFO and not the required WARNING that would then be elevated to ERROR by --strict. See https://www.mkdocs.org/user-guide/configuration/#validation for explanation of these options.

mkdocs serve is just for development purposes so shouldn't fail with warnings, hence I removed --strict there.

Linkchecker still works as before, which is an external tool outside mkdocs and checks the built documentation by following external links. Since we now ignore links to our RTD docs themselves (see #524) it is essential we make our checks stricter so that we don't miss broken internal links within our own docs.

Changes to fix warnings include:

  • Fix broken anchor links (due to renaming)
  • Fix missing .md extension

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

@antonymilne antonymilne marked this pull request as ready for review June 18, 2024 11:14
@antonymilne antonymilne changed the title Make docs build actually strict [Docs] Make build actually strict Jun 18, 2024
Copy link
Contributor

@maxschulz-COL maxschulz-COL left a comment

Choose a reason for hiding this comment

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

lgtm!

vizro-ai/hatch.toml Outdated Show resolved Hide resolved
vizro-ai/hatch.toml Show resolved Hide resolved
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen left a comment

Choose a reason for hiding this comment

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

I just looked at the new warnings. It shouldn't be too strict, and we should fix them. They also made it clear that there are a couple of broken links because of renamings of titles 😅

Maybe @stichbury can help you with this?

vizro-core/mkdocs.yml Show resolved Hide resolved
@huong-li-nguyen huong-li-nguyen added Status: Ready for Review ☑️ Issue/PR is ready for review - all tests have passed Docs 🗒️ Issue/PR for markdown and API documentation labels Jun 18, 2024
@stichbury
Copy link
Contributor

I just looked at the new warnings. It shouldn't be too strict, and we should fix them. They also made it clear that there are a couple of broken links because of renamings of titles 😅

Maybe @stichbury can help you with this?

Sure, happy to fix these in the next sprint, just stick me on the ticket and I'll pick it up w/c 24th June.

@huong-li-nguyen
Copy link
Contributor

huong-li-nguyen commented Jun 21, 2024

Sure, happy to fix these in the next sprint, just stick me on the ticket and I'll pick it up w/c 24th June.

@stichbury - I hope you don't mind I took this over! I actually just wanted to check in this PR whether I've introduced any new broken anchor links with the recent PRs I've just merged. And it turned out that I did add some broken anchor links again 😅 It's very good that we have the strict check in place now!

When I started to fix them, I just fixed all of them 😄 We also plan to do the release on Monday, so probably better to have the docs fixed until then 👍

Feel free to review the changes though 🙏

@stichbury
Copy link
Contributor

@stichbury - I hope you don't mind I took this over!

Of course not, and thank you 🌟 that's a big help and timesaver for me.

Copy link
Contributor

@stichbury stichbury left a comment

Choose a reason for hiding this comment

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

Looks great. Always good to be strict 🎓

@huong-li-nguyen huong-li-nguyen merged commit e447c24 into main Jun 21, 2024
40 checks passed
@huong-li-nguyen huong-li-nguyen deleted the docs/strict-checks branch June 21, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs 🗒️ Issue/PR for markdown and API documentation Status: Ready for Review ☑️ Issue/PR is ready for review - all tests have passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants