Miscellaneous Python documentation fixes#1196
Conversation
Change the way passthrough functions to Quantity and SolutionArray classes are handled so these functions don't get labeled as "property" in the Sphinx docs and so their arguments will be shown.
This class represents both surfaces and edges
These types all share the same __cinit__ constructor, so the __init__ method also has to have a consistent signature, where the only differences are in optional keyword-only arguments.
Classes that define an __init__ method don't need to have their constructor signature defined in .rst file. Add relevant arguments determined by by _SolutionBase.__cinit__ to derived classes.
Using Sphinx 4.4.0 and Cython 0.29.26, none of these function signatures generate warnings.
WallSurface was replaced by ReactorSurface in Cantera 2.3.
There was a problem hiding this comment.
🎉 ... thanks for this fix @speth! While I'm not exactly sure what fixed the issue, I assume that it has to do with the signatures in the rst files? I verified with the GH artifact that things work. Also, thanks for making the formatting more consistent. Overall, this looks good to go from my perspective.
|
The trick to fixing the "property" labels was realizing that they actually were |
bryanwweber
left a comment
There was a problem hiding this comment.
Phew! Thanks for taking this on @speth. Detail orientation is my jam 😄 As such, I've left 44 comments for further improvements that I noted here! You're welcome 😝
I'll approve it though because they're all minor and you can merge this after updating them without me needing to re-approve.
Co-authored-by: Bryan W. Weber <[email protected]>
The exception to this is where the reference is specifically to the package name, for instance when describing installation with pip or conda.
0eb13ee to
fcaccbd
Compare
Changes proposed in this pull request
SolutionArrayandQuantityclass being labeled aspropertyin the Sphinx docsSolutionkeyword-only (I'm not sure they would have worked as positional arguments in the first place)Reactionclasses keyword-only (again, I think this was implicitly required in practiceWallSurfaceclass.If applicable, fill in the issue number this pull request is fixing
Fixes #1078
Checklist
scons build&scons test) and unit tests address code coverage