-
-
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
Complete Unit Test Suite for the Matlab Toolbox #1665
base: main
Are you sure you want to change the base?
Conversation
8a95e99
to
ecc6173
Compare
@ssun30 and @rwest ... what are the current plans on this PR and Cantera/enhancements#177? With the old MATLAB toolbox removed, the next Cantera version will only provide for the experimental toolbox. |
Hi Ingmar, finishing the test suite is back on our to-do list and we were aiming to complete it by the end of the month. There is a slight delay so maybe the first week of July we shall have all the unit tests ready. |
8c98850
to
3acff45
Compare
After a year of hiatus this PR is finally ready for review. Thanks to support from Mathworks the plan to make the Matlab toolbox official is back on track. |
69db9aa
to
dd34ebe
Compare
dd34ebe
to
68f9bc8
Compare
Checklist for all unit tests (that can be implemented in MATLAB)
|
83afc64
to
77a33c7
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.
Hi @ssun30 ... thanks for getting back to this! From my side, this looks mostly good to go (despite a minor nit that some newlines at file endings are missing). I did notice that the MATLAB CI run wasn't completed successfully, though.
Overall, it's great to have some of this covered, especially as the plan is to move towards replacing the current CLib with an autogenerated CLib (see Cantera/enhancements#220). Once this is in place, it will be relatively easy to expose parts that are currently missing from the MATLAB API (e.g. Reaction
, Species
, ReactionRate
, SolutionArray
, etc.). One thing that may also be necessary is a MATLAB equivalent to AnyMap
to access the serialization interface - I believe that there's a new dictionary
that was introduced in R2022b.
Previously the buffer length does not account for the null terminator, which causes the string returned from Clib to miss the last character. The correct error code is also implemented. The previous code will incorrectly throw an exception when the string is a single character.
into test class setup and teardown
for unit tests
for unit tests
to avoid calling the corresponding functions in clib and throw a warning
Added ImportPhases Method
0ebe26f
to
1228c04
Compare
Incompatibility Introduced by MATLAB's built-in Intel MKL library
Added transportModel to 'Water' PureFluid phase
1228c04
to
6f778d9
Compare
They will warn the users whether to proceed since single-property setters can cause significant changes to other properties and multi-property setters are recommended.
The CI runner will crash when running this test class since the environment variables are not set properly. Revert this later.
f78869f
to
6c27a13
Compare
@@ -1393,6 +1393,51 @@ function display(tp) | |||
|
|||
end | |||
|
|||
function set.T(tp, t) |
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.
I don't think that we should allow for single setter methods, and would in general avoid requiring input
statements.
Changes proposed in this pull request
If applicable, fill in the issue number this pull request is fixing
Updates to Cantera/enhancements#177
If applicable, provide an example illustrating new features this pull request is introducing
Added tests for rates of progress, rate constants, species rates, and thermodynamic values.
Checklist
scons build
&scons test
) and unit tests address code coverage