-
-
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
Read YAML using C++ newSolution in Python / access root level data #1129
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1129 +/- ##
==========================================
+ Coverage 73.52% 73.62% +0.10%
==========================================
Files 365 366 +1
Lines 48242 48373 +131
==========================================
+ Hits 35470 35617 +147
+ Misses 12772 12756 -16
Continue to review full report at Codecov.
|
7a4ff1b
to
ec800b8
Compare
@speth / @tsikes ... this PR replaces #881 (access to top-level YAML annotations), with a - hopefully - better fate. I improved the linkage of YAML input in Python and the underlying C++ so both use the C++ version of YAML input for There is currently one failing test (Sundials 5.7 not getting correct Edit: this docker container can reproduce the failure. |
cb136b3
to
dafe140
Compare
Methods are renamed to Species.from_yaml and Species.from_yaml_file
Also update listFromYaml in test_thermo.py
In addition, additional information available in the input file is saved.
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 pretty good to me. I had a couple of suggestions for simplifications, as well as some other minor comments.
ad084ab
to
4b199df
Compare
@speth ... I believe I took care of all the comments. Regarding the transport model, it's possible to replace the C++ |
@speth ... thanks for the clarification. I updated as suggested ... |
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 the updates, @ischoegl, I think this is almost set. I just had a couple of further comments, mainly related to the new factory functions.
@speth ... I implemented the one remaining suggestion for |
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 looks good to me.
Regarding one of your last comments, I would agree that the various global factory functions for new Cantera thermo / kinetics / transport / etc. objects could use some housekeeping. At a minimum, there's both the inconsistency whether they return raw pointers, unique_ptr
or shared_ptr
as well as confusing variability in their names (do we need the Mgr
suffix in newKineticsMgr
?).
Changes proposed in this pull request
newSolution
to parse YAML strings and file inputnewSolution
YamlWriter
(e.g.description
)Also:
Species.fromYaml
in favor ofSpecies.from_yaml
Fix a minor glitch where LaTeX formatting in a figure title crashes example CI runsIf applicable, fill in the issue number this pull request is fixing
Closes #1013, closes #1131, supersedes #881, needed for #692
If applicable, provide an example illustrating new features this pull request is introducing
The
transport_model
is no longerTransport
if not set, but yieldswhere appropriate safeguards are now also implemented in C++.
Further, it is now possible to specify top-level YAML fields for
YamlWriter
. For example inextract_submechanism.py
which produces
Checklist
scons build
&scons test
) and unit tests address code coverage