Skip to content

Conversation

@hakonhagland
Copy link
Contributor

@hakonhagland hakonhagland commented Aug 22, 2025

Extend docstrings_simulators.json to 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

@hakonhagland
Copy link
Contributor Author

jenkins build this please

1 similar comment
@totto82
Copy link
Member

totto82 commented Sep 12, 2025

jenkins build this please

}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vscode is "starting" to annoy me just wee little bit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to the club

@akva2
Copy link
Member

akva2 commented Sep 12, 2025

jenkins build this please

"name": "BlackOilSimulator",
"doc": "The BlackOilSimulator class to run simulations using a given Deck."
},
"GasWater": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess this block belongs in the other PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#6075 is in, rebase when convenient.

Copy link
Member

@akva2 akva2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@hakonhagland hakonhagland force-pushed the docstring-template-refactor branch from de2946e to 2f6bf95 Compare September 17, 2025 13:36
@hakonhagland
Copy link
Contributor Author

jenkins build this please

1 similar comment
@hakonhagland
Copy link
Contributor Author

jenkins build this please

@akva2 akva2 merged commit fafa4d8 into OPM:master Sep 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants