Conversation
Codecov Report
@@ Coverage Diff @@
## main #1513 +/- ##
==========================================
+ Coverage 70.42% 70.49% +0.07%
==========================================
Files 375 376 +1
Lines 58440 58891 +451
Branches 20919 21193 +274
==========================================
+ Hits 41155 41516 +361
- Misses 14262 14316 +54
- Partials 3023 3059 +36
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
63a1047 to
3408368
Compare
035b5f6 to
cf3c529
Compare
|
@speth ... at this point, this is ready for a review. While the line count is a bit larger than expected (a lot of this is due to deprecations, new unit tests and refactored code that otherwise doesn't introduce anything new), this PR should remove a lot of lint from the The central enhancement are new factory functions (while eliminating the need for magic numbers), where I stuck to MATLAB nomenclature for the time being. Every single |
speth
left a comment
There was a problem hiding this comment.
Thanks for taking the time to clean up this interface. It was past due for an overhaul. Besides moving clib away from magic numbers, I appreciate especially the elimination of the manual memory management with backwards semantics (like returning references to objects that the caller was then responsible for deleting) and the expansion of the test suite.
6abc356 to
b05df1f
Compare
|
@speth ... thanks for the review! I definitely appreciate your suggestions, and implemented |
List order/number last as it is not used by all variants; also update order for func_new_advanced in clib.
|
Rebased due to merge conflict with #1511 |
|
Resolved the final comment. Edit: also renamed |
speth
left a comment
There was a problem hiding this comment.
Thanks for the updates, @ischoegl.
I like the new organization for the related Doxygen documentation. However, this still doesn't inform the user what name to pass to newFunc1 or func_new_xyz to get a function of a particular type, so I think we need to find a home for these lists in the documentation, even if they risk being out of date if new Func1 classes are added. I'd say that this is somewhat analogous to the list of thermo models that we maintain here.
|
@speth ... thanks! I believe I took care of everything.
I agree in general. At the same time, the generated doxygen documentation actually does a really good job summarizing everything, although it's probably not easy to find. As the code is largely absent from Python, this would have to be done manually on the website ...
|
|
Right, I think this documentation page is clear that If you don't want a list in a single place, then an example in each derived class's docstring would be an alternative option. |
|
@speth ... I added lists of available types to each of the four doxygen groupings, and mentioned the type of each class in (improved) class docstrings. I hope this addresses the remaining comment 😄 |

Changes proposed in this pull request
Functors are presumably the easiest pathway to create custom functions using API's that are based on
clib. This PR seeks to update the framework to facilitate future usage.Func1&references byshared_ptr<Func1>(avoids raw pointers and requirement to copy objects for various operations)Cabinetclibfunctions that do not rely on hardcoded magic numbers; magic numbers are, however, not deprecated as they are still used by the stable MATLAB toolbox.SharedCabinetIf applicable, fill in the issue number this pull request is fixing
Closes Cantera/enhancements#164
Addresses #752, #567
Directly applicable to Cantera/enhancements#177
Checklist
scons build&scons test) and unit tests address code coverage