Skip to content

ci: add automated doc checks (and related starter pack updates)#2099

Merged
dwilding merged 12 commits into
canonical:mainfrom
dwilding:starter-pack-checks
Oct 21, 2025
Merged

ci: add automated doc checks (and related starter pack updates)#2099
dwilding merged 12 commits into
canonical:mainfrom
dwilding:starter-pack-checks

Conversation

@dwilding

@dwilding dwilding commented Oct 11, 2025

Copy link
Copy Markdown
Contributor

This PR does a few things related to the documentation starter pack:

  • Makes sure that the spell checker can be run with make -C docs spelling, makes sure that the spell checker passes, and adds a workflow to run the spell checker on PRs & pushes.

  • Configures the link checker with URLs that are known to fail, and adds a manual workflow to run the link checker. Manual for now because the link checker takes a long time and produces unexpected errors (see my comments for more detail).

  • Adds the update script from the starter pack.

Comment on lines +4 to +7
# The docs have a lot of external links, so the link checker takes a long time to run.
# As of Oct 2025, the link checker fails on many Read the Docs links because RTD's
# servers respond with 429 (Too Many Requests) without allowing retry after delay.
# Given this, it's best to run the workflow manually and inspect the results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe we're talking to RTD about this

Comment thread docs/conf.py

* the specified location based on the storage section of `charmcraft.yaml`, or
* the default location `/var/lib/juju/storage/<storage-name>/<num>`, where num is zero for 'normal'/singular storages or an integer ID for storages that support multiple attachments.
* the default location `/var/lib/juju/storage/<storage-name>/<num>`, where `<num>` is zero for 'normal'/singular storages or an integer ID for storages that support multiple attachments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Minor doc change to avoid adding a spelling exception for "num"

Comment thread docs/Makefile Outdated
@test -d $(VENVDIR) || uv venv --python 3.11 $(VENVDIR)
uv pip install --directory $(VENVDIR) --requirements ../../requirements.txt
uv pip install --directory $(VENVDIR) "ops[testing,tracing] @ ../../.."
uv pip install --directory $(VENVDIR) rst2html vale

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These dependencies are required by the spellchecker. I suppose we could add them to requirements.txt, but then that file would no longer match the starter pack. This part of the Makefile already doesn't match the starter pack

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm curious why the starter pack doesn't include the spellchecker requirements?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does, but it hardcodes them in the Makefile. Actually, now I think about it, why aren't they listed in requirements.txt instead...? I'll investigate that before finishing this PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm updating the starter pack to put the dependencies in requirements.txt (#456). I've preemptively included the same changes here.

Comment thread docs/.sphinx/update_sp.py
@@ -0,0 +1,269 @@
#! /usr/bin/env python

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

File added from the starter pack, unchanged

@@ -0,0 +1,151 @@
#! /usr/bin/env python

@dwilding dwilding Oct 11, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

File added from the starter pack, unchanged except for cleaning up whitespace (which I'm fixing in the starter pack: #448)

@dwilding dwilding changed the title ci: add automated doc checks ci: add automated doc checks (and related starter pack updates) Oct 11, 2025
@dwilding dwilding linked an issue Oct 11, 2025 that may be closed by this pull request
@dwilding dwilding marked this pull request as ready for review October 11, 2025 03:37

@james-garner-canonical james-garner-canonical left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. The separation of the workflows makes sense to me. I guess we weren't running the docs workflows in CI in ops previously, since these are new workflows.

@dwilding

Copy link
Copy Markdown
Contributor Author

Thanks!

I guess we weren't running the docs workflows in CI in ops previously, since these are new workflows.

Yes, that's right

Comment thread docs/.sphinx/version
@dwilding dwilding requested a review from dimaqq October 17, 2025 03:06

@dimaqq dimaqq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aside: could the code and base settings be a github action (or a PYPI package) that can be reused by different projects, rather than everyone copying the same source into their repos?

(obv., that's a question for another day)

@dwilding dwilding merged commit 159aaf3 into canonical:main Oct 21, 2025
53 checks passed
@dwilding dwilding deleted the starter-pack-checks branch October 21, 2025 01:47
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.

Upgrade docs starter pack to latest

3 participants