-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Sourcegen CLib edge cases #1846
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1846 +/- ##
==========================================
- Coverage 74.41% 74.39% -0.02%
==========================================
Files 386 386
Lines 53628 53651 +23
Branches 9063 9071 +8
==========================================
+ Hits 39905 39913 +8
- Misses 10652 10663 +11
- Partials 3071 3075 +4 ☔ View full report in Codecov by Sentry. |
3a2e8ec
to
1597b38
Compare
1597b38
to
dfec1b3
Compare
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.
Thanks, @ischoegl. This generally looks good to me. Just a few minor suggestions.
* Create a reaction path diagram for the fluxes of the Element @c element | ||
* according the the net reaction rates determined by the Kinetics object @c kin. | ||
* @param kin Shared pointer to kinetics object. | ||
* @param element Element used for the calculation of net reaction rates. | ||
* @return shared_ptr<ReactionPathDiagram> |
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.
The @param
and @return
notations here add nothing beyond what's either stated in the prose description above or explicitly given by the argument/return types. I would suggest removing them.
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.
For the current CLib code generation, we only care about the @brief
description, as well as @param
and @return
. From that perspective, the extended docstring is secondary. I updated both docstrings so they are less redundant. In the future, sourcegen
may pick up more information; for the time being, I am trying to make sure that the most relevant docstrings are in place.
shared_ptr<ReactionPathBuilder> m_builder; //!< Shared pointer to ReactionPathBuilder | ||
std::stringstream m_log; //!< Logging stream. |
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.
Not a recommendation for this PR, but I'm getting the impression that ReactionPathBuilder
should just be merged with ReactionPathDiagram
. They seem to be intricately connected and I'm not sure there's any benefit of having the former as a separate class.
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.
Agreed. For this PR, my main concern was to streamline the API; the ReactionPathDiagram
code base definitely needs another look, perhaps with Cantera/enhancements#173? The logging is likewise no longer consistent with our current approaches.
bb81255
to
fc7926b
Compare
@speth ... thanks for the review. The PR should be ready to merge. |
@speth ... this should be done/ready. |
Changes proposed in this pull request
Address several edge cases encountered in CLib
ReactionPathDiagram
as an example (also, C++ API is updated to match Python API)If applicable, fill in the issue number this pull request is fixing
Addresses Cantera/enhancements#220
Checklist
scons build
&scons test
) and unit tests address code coverage