Conversation
|
@edibotopic do you understand why the build of the docs fails in the CI but not when I build it locally via In the CI I these warnings which I assume are the reason the build fails: I don't see those locally. |
FTR, we were able to resolve that - @edibotopic figured out how to ignore these warnings |
Thanks @adombeck . I think it's OK to ignore these warnings for now so that we are better able to support users with these docs. In the long run, we should fix the header levels so that they conform with the rest of the docs. In future, we can work on improving the doc generation and formatting of the rendered output, depending on capacity, etc. |
|
@edibotopic I think this is now ready for an initial review. Please ignore all the commits which are not touching the documentation, those are from #1087. The documentation is very rudimentary for now, we might want to write a more extensive overview of |
For later reference, I pushed a WIP commit which uses gencodo to https://github.com/adombeck/authd/tree/authctl-docs-gencodo |
edibotopic
left a comment
There was a problem hiding this comment.
Excellent work @adombeck .
I've left a few minor suggestions and comments.
Some of the more elaborate synopses tend to push the basic usage example (Use) quite far down, and visually pair it with a separate command, example:
I think that's probably just a limitation of the native Cobra docgen, but it's something we can look at in future.
Yeah, that also annoyed me. I think the description just doesn't belong in the "Synopsis" section. My understanding of a "Synopsis" is that it's only the formal description of how to run the command what command line options it takes (like This is an issue which we could fix with gencodo. |
Thanks for the context @adombeck . I agree, let's wait for gencodo. It's OK for now. |
e52807e to
62920d5
Compare
edibotopic
left a comment
There was a problem hiding this comment.
Great work! Nice to have this in the docs.
Produces prettier docs
So that it can be imported by the docgen tool we're about to add.
Having the "This command requires root privileges." sentence after the `chown -R` command was confusing, it sounded like it was referring to that command instead of the authctl command.
To generate the CLI docs
The auto-generated Cobra markdown docs use headings starting at H2, not H1. That results in Sphinx printing warnings, which causes the build to fail in the CI (but not locally). Let's ignore these kind of warnings for now.
Co-authored-by: Shane Crowley <66971213+edibotopic@users.noreply.github.com>
Co-authored-by: Shane Crowley <66971213+edibotopic@users.noreply.github.com>
Thanks to Shane for spotting that.
62920d5 to
6a6c2f0
Compare
Via `go generate ./docs/...`
daf55f1 to
3409bc3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1179 +/- ##
==========================================
- Coverage 85.99% 85.86% -0.14%
==========================================
Files 98 99 +1
Lines 6685 6685
Branches 111 111
==========================================
- Hits 5749 5740 -9
- Misses 880 888 +8
- Partials 56 57 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The cmd/authctl/internal/docgen tool is an internal build-time tool used to generate the authctl documentation and man page. This change adds it to DH_GOLANG_EXCLUDES to prevent it from being built during package builds, which was causing a dh_missing error since the binary was being built but not installed.
Important
This is based on #1087
Generate authctl docs via cobra.
UDENG-8760