Read YAML using C++ newSolution in Python / access root level data#1129
Read YAML using C++ newSolution in Python / access root level data#1129speth merged 25 commits intoCantera:mainfrom
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.
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 ... |
|
@speth ... I implemented the one remaining suggestion for |
speth
left a comment
There was a problem hiding this comment.
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
newSolutionto parse YAML strings and file inputnewSolutionYamlWriter(e.g.description)Also:
Species.fromYamlin favor ofSpecies.from_yamlFix 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_modelis no longerTransportif 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.pywhich produces
Checklist
scons build&scons test) and unit tests address code coverage