Add support for Python docstring.json template format #6418
Merged
akva2 merged 3 commits intoOPM:masterfrom Sep 23, 2025
Merged
Add support for Python docstring.json template format #6418akva2 merged 3 commits intoOPM:masterfrom
akva2 merged 3 commits intoOPM:masterfrom
Conversation
This was referenced Aug 22, 2025
Contributor
Author
|
jenkins build this please |
1 similar comment
Member
|
jenkins build this please |
akva2
reviewed
Sep 12, 2025
python/docstrings_simulators.json
Outdated
| } | ||
| } | ||
| } | ||
| } No newline at end of file |
Member
There was a problem hiding this comment.
vscode is "starting" to annoy me just wee little bit.
Member
|
jenkins build this please |
akva2
reviewed
Sep 12, 2025
| "name": "BlackOilSimulator", | ||
| "doc": "The BlackOilSimulator class to run simulations using a given Deck." | ||
| }, | ||
| "GasWater": { |
Member
There was a problem hiding this comment.
i guess this block belongs in the other PR.
Contributor
Author
There was a problem hiding this comment.
Yes. I suggest we merge #6075 first with the old docstring format for BlackOil simulator (and no documentation for the GasWater simulator). When that is merged I will rebase this (which will add the documentation for the GasWater simulator back).
akva2
approved these changes
Sep 12, 2025
Member
akva2
left a comment
There was a problem hiding this comment.
With the niggles addressed (or argued against).
- Create unified template structure with 'simulators', 'constructors', and 'common_methods' sections
- Add support for both BlackOil and GasWater simulators
- Use {{name}} and {{class}} placeholders for template expansion
- Eliminates need for duplicate JSON files
- Add 'BlackOil' as 5th parameter to generate_docstring_hpp.py - Prepares for template-based docstring generation - Will work with updated opm-common generate_docstring_hpp.py script
de2946e to
2f6bf95
Compare
Contributor
Author
|
jenkins build this please |
1 similar comment
Contributor
Author
|
jenkins build this please |
This file contains hidden or 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
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.
Extend
docstrings_simulators.jsonto support a template format with different simulator configurations. This will help reduce documentation duplication when we implement support for more than one python simulator, see #6075 for more information. And see also companion PRs OPM/opm-common#4690 and OPM/opm-python-documentation#17