-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adding Sphinx docs to template #318
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
I do quite like this. Sphinx vs MkDocs aside. It's DRY. |
dstansby
reviewed
Mar 20, 2024
samcunliffe
reviewed
Mar 20, 2024
This was referenced Mar 20, 2024
samcunliffe
added a commit
that referenced
this pull request
Mar 24, 2024
matt-graham
added a commit
that referenced
this pull request
Mar 25, 2024
Would resolve #16 as an alternative to #318 Adds MkDocs documentation to template, aiming for a comparable set of features to what is implemented in #318 - automatically built API documentation with Markdown syntax, support for references to external documentation inventories, dark / light mode toggle, GitHub repository link in docs, workflow for automatically testing building docs. Example screenshot of rendered index page  and of API reference page  --------- Co-authored-by: Patrick J. Roddy <patrickjamesroddy@gmail.com> Co-authored-by: Sam Cunliffe <samcunliffe@users.noreply.github.com>
samcunliffe
added a commit
that referenced
this pull request
Mar 25, 2024
Following the discussion in #16, I've tried to summarise (and might have quoted you directly 😄). Picky comments very gratefully received. ## Fixes - #187 ## Relates to - #16 - #318 - #319 --------- Co-authored-by: Matt Graham <matthew.m.graham@gmail.com> Co-authored-by: David Stansby <dstansby@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Would resolve #16
Adds Sphinx documentation to template using
sphinx-autodoc2
to generate API documentation and using MyST parser to allow use of Markdown in docstrings (and documentation pages). Also sets up a few other extensions -sphinx.ext.intersphinx
for automatic links to other documentation with by default only the Python standard library index included, andsphinx.ext.viewcode
to add links to source code. This is set up to use the PyData Sphinx theme which @samcunliffe recommeded on another project. Atox
environmentdocs
is added to simplify building documentation.This was mainly intended as a demonstration that it's possible to get Sphinx set up in a way which will easy for users to use and doesn't require much boilerplate for reference in discussion in #16. It's not clear yet if we would want to go with Sphinx rather than Mkdocs.
I also haven't yet added any default workflows to the template for building docs - ideally we'd want to make it easy to automatically deploy to GitHub pages but this would require some manual intervention from user to specify where GitHub pages site should be generated from. We could as an intermediate step just have a workflow for testing docs build, with a commented out step for subsequently doing deployment on pushes to
main
with instructions to user to do necessary configuration before uncommenting.EDIT: Screenshot of what generated documentation website looks like
To dos
git init