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

Develop complete draft of docs pages #35

Open
lzachmann opened this issue Feb 24, 2022 · 2 comments
Open

Develop complete draft of docs pages #35

lzachmann opened this issue Feb 24, 2022 · 2 comments

Comments

@lzachmann
Copy link
Contributor

We are using GitHub Actions to do two things: 1) build the Docker image we are using for this work (which is now available for download or use in other actions via the container registry: https://github.com/orgs/csp-inc/packages/container/package/fluvius), and 2) use this image to compile the project docs using Sphinx.

Contributing to the docs

Local development (recommended)

From 'docs/' directory in a shell running in the container, run make clean html. Sphinx uses the 'instructions' in 'docs/source' to build the site. We serve the site from 'docs/build/html/' using GitHub Pages on an orphaned gh-pages branch.

On the remote

Commits pushed to any of the paths / branches specified in the gh-pages.yml workflow (https://github.com/csp-inc/fluvius/blob/ljz/dev/.github/workflows/gh-pages.yml#L5-L14) will trigger a rebuild.

Resources

The docs workflow was cobbled together / inspired by a variety of resources:

@lzachmann
Copy link
Contributor Author

Big lift has been made. Still need to find a Sphinx directive to parse docstrings in src/ directory for an "Internals" menu in the docs.

@lzachmann
Copy link
Contributor Author

@vlandau I think napoleon may be the way to go? It allows for more natural docstring (e.g., Google or NumPy style) formatting. And napoleon actually comes with Sphinx now, so no need to pip install anything else. But we may need to make files in source modules, however....

https://sphinxcontrib-napoleon.readthedocs.io/en/latest/
https://gist.github.com/GLMeece/222624fc495caf6f3c010a8e26577d31

In our case, the docstrings from each submodule would be parsed using sphinx-apidoc -f -o source/ ../src.

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