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

Ensure --help examples in docs are always up to date #336

Closed
simonw opened this issue Jul 10, 2018 · 3 comments
Closed

Ensure --help examples in docs are always up to date #336

simonw opened this issue Jul 10, 2018 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Jul 10, 2018

Ideally I would automatically generate the --help output shown in our docs, but I don't think I can get that working with readthedocs.

Instead, I'm going to add a unit test that checks that those extracts in the documentation match the current output of the --help command.

@simonw
Copy link
Owner Author

simonw commented Jul 10, 2018

Easiest way to do this I think would be to make those help blocks separate files in the docs/ directory (publish-help.txt perhaps) and then include them with a sphinx directive: https://reinout.vanrees.org/weblog/2010/12/08/include-external-in-sphinx.html

@simonw simonw closed this as completed in aec3ae5 Jul 11, 2018
@simonw
Copy link
Owner Author

simonw commented Jul 11, 2018

I decided against the unit tests, instead I have a new script called ./update-docs-help.sh which I can run any time I want to refresh the included documentation: aec3ae5#diff-cb15a1e5a244bb82ad4afce67f252543

@simonw
Copy link
Owner Author

simonw commented Jul 24, 2018

Actually I do like the idea of a unit test that reminds me if I've forgotten to update the included files.

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

No branches or pull requests

1 participant