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

Add generated documentation #4

Closed
johannesjh opened this issue Oct 22, 2022 · 1 comment
Closed

Add generated documentation #4

johannesjh opened this issue Oct 22, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@johannesjh
Copy link
Owner

johannesjh commented Oct 22, 2022

Documentation enhancements: The following two documentation enhancements would be nice to have. Both require setting up of some sort of documentation generator:

  • It would be nice to auto-generate the commandline usage. A quick research about tools that we could use for this:
  • It would be nice to replace the hand-written example (in the README file, section "programmatic usage") with code from a test case... the test case would ensure that the example keeps up to date.

Tooling: Both enhancements require some sort of documentation generator such as sphinx. The generator should run locally and in github ci. Updates to the master branch should automatically update the documentation. Documentation for tagged commits should also be available. Documentation generators such as sphinx are probably able to do these jobs nicely out of the box... we just need to set things up.

  • documentation generator:
  • runtime:
    • locally, a simple poetry run sphinx-build ... or tox run -e docs sphinx-build ... should do the job
    • on github ci, we could use the same call. alternatively, we could use the github actions as documented by sphinx under publishing your html documentation
@johannesjh johannesjh added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Oct 22, 2022
@johannesjh johannesjh added the enhancement New feature or request label Oct 22, 2022
@johannesjh
Copy link
Owner Author

johannesjh commented Oct 23, 2022

Update, I started working on this.

  • I added sphinx-doc
  • I found a way to include the main README file into the sphinx documentation
  • I added pre-commit hooks to make sure the python code is well-documented (and I consequently added a lot of missing docstrings).
  • I used sphinx-argparse to automatically document commandline usage
  • the programmatic usage example is protected by a regression test.

Todos, to be tracked in follow-up tickets:

  • reviewing and improving the documentation.
  • it only runs locally for now, I have not added any github ci yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant