-
-
Notifications
You must be signed in to change notification settings - Fork 381
Fix MATLAB interface samples #1911
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
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 #1911 +/- ##
=======================================
Coverage 74.28% 74.28%
=======================================
Files 448 448
Lines 55744 55743 -1
Branches 9190 9190
=======================================
Hits 41411 41411
+ Misses 11232 11231 -1
Partials 3101 3101 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9a6a562
to
f8ebb67
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.
@ssun30 ... thanks for addressing!
Out of curiosity: for the Python API, all examples are tested as part of a CI job, see run-examples
in .github/workflows/main.yml
.
The relevant code is:
- name: Run the examples
# See https://unix.stackexchange.com/a/392973 for an explanation of the -exec part.
run: |
ln -s libcantera_shared.so build/lib/libcantera_shared.so.3
export LD_LIBRARY_PATH=build/lib
find samples/python -type f -iname "*.py" \
-exec sh -c 'for n; do echo "$n" | tee -a results.txt && python3 "$n" >> results.txt || exit 1; done' sh {} +
I believe it's possible to do something similar here as it's possible to run MATLAB scripts from the command line:
matlab -r "try, run('rankine.m'), catch, exit(1), end, exit(0)"
where I had set matlab
to
alias matlab="/Applications/MATLAB_R2023b.app/bin/matlab -nojvm -nodesktop"
on macOS (fwiw, I just ran a quick test so the options may not be the greatest selection)
182f7b9
to
bb891cb
Compare
@@ -58,14 +58,9 @@ function delete(s) | |||
|
|||
%% Sim1D Utility Methods | |||
|
|||
function display(s, fname) | |||
function display(s) |
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 sake of consistency with other APIs, the name of the method should be show
, see https://cantera.org/stable/python/onedim.html#cantera.Sim1D.show.
f6520e5
to
4863f99
Compare
Fixed a typo in Interface.concentrations
Changed refine criteria for Diff_flame
for axis for periodic_cstr.m sample
Modified several samples to include this change
test_examples.m
There are numerous changes to class structures to the MATLAB interface that necessitate modifications to our current collection of MATLAB samples.
Changes proposed in this pull request
If applicable, fill in the issue number this pull request is fixing
Closes #1722
Checklist
scons build
&scons test
) and unit tests address code coverage