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

gempyor Sphinx auto-documentation #493

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

Conversation

emprzy
Copy link
Collaborator

@emprzy emprzy commented Feb 5, 2025

Describe your changes.

This pull request uses Sphinx to generate documentation for the gempyor API, which is (loosely) defined right now as

  • model_info.py,
  • parameters.py,
  • compartments.py,
  • and inference.py.

Sphinx uses pre-existing inline docstring documentation to populate an HTML-coded table of contents with documentation of the submodules. You can find the index.html file at the path:
flepiMoP/flepimop/gempyor_pkg/src/gempyor/docs/build/html/index.html

By review, this PR should consolidate documentation for the gempyor API in an easy-to-navigate directory. Internal users can view documentation of select submodules, classes, and methods without using terminal. Eventually, this could be published for external use.

What does your pull request address? Tag relevant issues.

This pull request addresses GH #458.

@emprzy emprzy changed the base branch from main to dev February 5, 2025 17:19
@TimothyWillard TimothyWillard linked an issue Feb 6, 2025 that may be closed by this pull request
3 tasks
@TimothyWillard TimothyWillard added this to the Software Quality milestone Feb 6, 2025
@TimothyWillard TimothyWillard added documentation Relating to ReadMEs / gitbook / vignettes / etc. gempyor Concerns the Python core. high priority High priority. labels Feb 6, 2025
@TimothyWillard
Copy link
Contributor

I know this is still a draft/WIP so not looking too hard, but looks like the build directory contains the built documentation (I think this, or at least used to be, named _build)? If that's the case we should add that to the .gitignore and scrub those contents from b74f9d7.

@emprzy
Copy link
Collaborator Author

emprzy commented Feb 6, 2025

I know this is still a draft/WIP so not looking too hard, but looks like the build directory contains the built documentation (I think this, or at least used to be, named _build)? If that's the case we should add that to the .gitignore and scrub those contents from b74f9d7.

Sorry, I'm not really following what the implication of this is? Scrub what contents from b74f9d7?

@TimothyWillard
Copy link
Contributor

I know this is still a draft/WIP so not looking too hard, but looks like the build directory contains the built documentation (I think this, or at least used to be, named _build)? If that's the case we should add that to the .gitignore and scrub those contents from b74f9d7.

Sorry, I'm not really following what the implication of this is? Scrub what contents from b74f9d7?

No worries. What I'm saying is:

  1. Am I correct in understanding that flepimop/gempyor_pkg/src/gempyor/docs/build contains the built documentation? Built meaning the HTML files for viewing?
  2. If (1) is yes, then add that directory to the .gitignore and remove the contents of that directory from b74f9d7.

Also, I'm just now noticing (after typing out the full file path above) that the docs are under the source files, that doesn't seem quite right? Shouldn't that be at the top of the python package directory, i.e. flepimop/gempyor_pkg/docs/? I know there's an existing directory there, but putting it under the source (i.e. where python will look to import and parse files) seems like a future problem waiting to happen if not one already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Relating to ReadMEs / gitbook / vignettes / etc. gempyor Concerns the Python core. high priority High priority.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request]: sphinx documentation for gempyor API
2 participants