-
Notifications
You must be signed in to change notification settings - Fork 75
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
feat: add basic sphinx docs #1711
Conversation
Uses a modified version of rockcraft's gen_cli_docs.py
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.
Mostly copied this from rockcraft
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.
great!
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.
runner = ignore_env_name_mismatch | ||
source_dir = {tox_root}/{project_name} | ||
|
||
[testenv:build-docs] |
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.
Looking at the CI for this PR, this reminds me of something I did in Snapcraft that I haven't upstreamed: https://github.com/canonical/snapcraft/blob/676e391446225901b5a09cfbfb4d11c186ce752d/.github/workflows/tox.yaml#L42
The problem is that if a command's docstring contains invalid RST text, it won't get caught by lint-docs
in CI. The biggest offender in Snapcraft was single backticks instead of double backticks.
Think it's worthwhile to upstream to starbase?
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.
Probably worth it with a comment about why we're building them :-)
docs/reference/commands.rst
Outdated
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.
Building the docs is giving me a few warnings, one of which is extensions-commands.rst
not being included here.
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.
Fixed!
:maxdepth: 2 | ||
|
||
commands | ||
models/index |
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 link 404's for me from the nav bar
677f28a
to
6f32246
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.
Looks great!!
Adds a Sphinx documentation project and some basic documentation. The purpose is to allow automatic generation of certain reference documentation that would otherwise need to be manually generated for juju.is.
This includes using the Starcraft standard
starbase
sphinx docs, A command documentation generator from rockcraft, and additions to some pydantic models to copy documentation out of what's on juju.is.Fixes #1692