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 sphinx documentation for Python bindings and GitHub action workflow to push to GitHub pages #5243
base: master
Are you sure you want to change the base?
Conversation
Under what url would the documentation appear? Where would something from opm-common appear? Will this always be the documentation for current master? Would we have release documentation on the side? |
@blattms I believe it will appear at something like https://opm.github.io/opm-simulators/
I think: https://opm.github.io/opm-common/ |
Added sphinx documentation for the opm.simulators.BlackOilSimulator Python module. Added GitHub action workflow to deploy sphinx documentation to GitHub Pages.
Rebased |
jenkins build this please |
Dynamically extract sphinx documentation release version from dune.module version.
jenkins build this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have settings access so I can't active it but this looks good to me at least.
@blattms Good point, I did not think about versions. I think we can get versioning with GitHub pages, see for example: https://github.com/devanshshukla99/sphinx-versioned-docs and https://www.codingwiththomas.com/blog/my-sphinx-best-practice-for-a-multiversion-documentation-in-different-languages. But it seems like it is not very commonly used? Maybe we should try Read the Docs instead? Since they appear to have a more well established workflow for versioning? @vkip What do you think? |
@blattms I played a little bit with https://github.com/devanshshukla99/sphinx-versioned-docs and I think we can use this to get versioned docs. We have to tag the commits we want to include, then the sphinx build will collect the versions from those commits. After the build is completed, all versions will then be included in the sphinx |
No real strong opinion here. As you mention RTD versioning is well established, but as long as it works this is fine by me. |
Use the Python module sphinx-versioned-docs to get versioned docs. Currently, there is only a version for the HEAD of the master branch but release versions can be added later by specifying a release tag.
jenkins build this please |
Dumb questions from me:
I know it is surprising if you see how I behave in this project 😅, but I do not have any admin power here. Seems like only @alfbr, @atgeirr, or @totto82 can change settings. |
@blattms It is executed for each merge/push to the master branch but only if anything inside the
We can choose to tag certain commits (e.g. releases) and have those included in the version selector in the lower left corner of the page. Here is an example from another GitHub page: This page has included versions for git tags "v0.1", "v1.0", "v1.1", and "v1.2" and for the current head of the "main" branch. The currently "active" documentation among those versions is the "main" as indicated with green color. Let me know if we need more information than this tag information. |
Can we merge this? Or will this interfere with the release process? |
Builds on #5242 which should be merged first.
Added sphinx documentation for the
opm.simulators.BlackOilSimulator
Python module. Also added GitHub action workflow to deploy the documentation to GitHub Pages.For this to work, someone with admin rights for the opm-simulators GitHub repository has to go to https://github.com/OPM/opm-simulators and then to the menu
Settings->Pages
and set the branch name for deployment togh-pages
, see screenshot below:See also: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site