Add sphinx documentation for Python bindings and GitHub action workflow to push to GitHub pages
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 to gh-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
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?
Under what url would the documentation appear?
@blattms I believe it will appear at something like https://opm.github.io/opm-simulators/
Where would something from opm-common appear?
I think: https://opm.github.io/opm-common/
Rebased
jenkins build this please
jenkins build this please
Will this always be the documentation for current master? Would we have release documentation on the side?
@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?
Will this always be the documentation for current master? Would we have release documentation on the side?
@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 _build directory. When we upload this directory to GitHub pages there will be a version selector at the front page similar to the one used at readthedocs. The user can then select the version of the documentation they want to view from that selector.
... @vkip What do you think?
No real strong opinion here. As you mention RTD versioning is well established, but as long as it works this is fine by me.
@vkip, @akva2, and @blattms I added a new commit to address the versioning, see: https://github.com/OPM/opm-simulators/pull/5243/commits/69d3d6caf1fde4c02f6634ac0cc2de966bebc130
jenkins build this please
Dumb questions from me:
- Is this action executed for each merge?
- Is there any version information on the generated pages (e.g. commit or date)?
I know it is surprising if you see how I behave in this project :sweat_smile:, but I do not have any admin power here. Seems like only @alfbr, @atgeirr, or @totto82 can change settings.
Is this action executed for each merge?
@blattms It is executed for each merge/push to the master branch but only if anything inside the python folder was changed.
Is there any version information on the generated pages (e.g. commit or date)?
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?
jenkins build this please
Rebased this PR on master to include the changes in docstrings introduced in #5325.
jenkins build this opm-common=4018 please
@atgeirr / @akva2: Can you have a look here and possibly merge? Thanks :)
Builds on #5242 which should be merged first.
Added sphinx documentation for the
opm.simulators.BlackOilSimulatorPython 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->Pagesand 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
@akva2 can you do this as well? Thanks!
Builds on #5242 which should be merged first.
Added sphinx documentation for the
opm.simulators.BlackOilSimulatorPython 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->Pagesand 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
@akva2 or @blattms or @atgeirr or @alfbr can someone set up the deployment to github pages (as described by Håkon)? Thanks!

