-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Update reactor API #1515
Update reactor API #1515
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1515 +/- ##
==========================================
- Coverage 70.59% 70.51% -0.08%
==========================================
Files 376 376
Lines 58956 59072 +116
Branches 21197 21217 +20
==========================================
+ Hits 41619 41657 +38
- Misses 14264 14339 +75
- Partials 3073 3076 +3
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
614911f
to
6785792
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 Ingmar! The master thing has been a wart for a while now 😊
e9efc3c
to
1676dcd
Compare
@bryanwweber ... Thanks for the review! I addressed one of your comments (and also made sure that the remaining new getters are consistent); I am hoping to convince you about the other suggested change. Edit: Also added a (trivial) fix for #1460 / caught a reference to 'master' in the new Matlab toolbox. |
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 for these updates, @ischoegl. I think a lot of this makes sense, and I appreciate the work towards making the different language interfaces more consistent.
I am somewhat ambivalent about the increased level of magical behavior for these properties where the setter takes a function but the getter just returns a value, but as you note we've already made a change that direction with MassFlowController.mass_flow_rate
, so at least it's increasing consistency.
561e886
to
db1f1c0
Compare
@speth ... I believe I took care of everything, where I opted for Overall, the deprecations got a lot simpler, where an intermittent "3" suffix is not needed.
Agreed, but I think it is ultimately useful and intuitive. We have other properties that return values without having a setter, so it is in a way consistent from that perspective as well. |
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. Just a few minor issues to resolve.
Regarding, @bryanwweber's suggestion, I think I lean slightly toward just expansion_rate
, given the somewhat excessive length of volumetric_expansion_rate
.
db1f1c0
to
87a030c
Compare
Thanks for catching those items, @speth. I corrected them all.
I tend to agree. |
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.
Looks good to me!
Thanks! will rebase as #1521 was just merged, so the one new instance of |
Replace unpythonic reactor setters
87a030c
to
cf4501d
Compare
cf4501d
to
781d41d
Compare
@speth ... could you reapprove? |
Changes proposed in this pull request
Make Python API more pythonic
set_XYZ
methods in Pythonset_master
byprimary
propertyAPI becomes consistent with existing
mfc
behaviorIf applicable, fill in the issue number this pull request is fixing
Closes Cantera/enhancements#160
Closes #1460
If applicable, provide an example illustrating new features this pull request is introducing
InEdit: no change for traditional MATLAB, new functionsclib
, the new functionswall_vdot2
andwall_qdot2
are introduced to preserve current behavior for the old MATLAB toolbox (i.e. no backport) while freeing upwall_vdot
andwall_qdot
for all revised interfaces (i.e. reactor network time is automatically used).wall_expansionRate
andwall_heatRate
for revised interfaces.Checklist
scons build
&scons test
) and unit tests address code coverage