docs: automate cli docs generation#144
Conversation
They will be automatically generated.
MaikRe
left a comment
There was a problem hiding this comment.
The original introspection tool also contained test code.
While the new code seems functional and correct, moving it all to the sphinx extension loses the test code. Not sure if that is the best course of action.
|
Thanks for the comments, @MaikRe ! Addressed them.
Regarding this, which tests are you referring to? |
There are some minimal tests here: https://github.com/canonical/maas/blob/master/src/tests/docs/test_maas_cli_introspection.py |
These tests will not work in this commit, but this helps in separating the changes for reviewing and understanding the diffs.
Avoids creating unused named variables.
normalize_text does not insert <br>'s anymore, as that was intended for HTML and not markdown, and header #'s were changed for linting reasons.
Extracts it and makes it less dependant on the relative position. Assumes the root is the first parent that is tracked as a git repo.
dbe5533 to
587a57a
Compare
587a57a to
8474da4
Compare
Thanks for the pointer! I brought them with some adaptations and incorporated them into the docs checks CI. There are things we could improve in them, but I believe they are out of the scope of this PR. |
Automates the CLI docs generation, similarly to how the API docs one is currently happening in the new docs.