Skip to content
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

Serialization of root-level information in YAML #1013

Closed
ischoegl opened this issue Apr 16, 2021 · 0 comments · Fixed by #1129
Closed

Serialization of root-level information in YAML #1013

ischoegl opened this issue Apr 16, 2021 · 0 comments · Fixed by #1129
Labels
Input Input parsing and conversion (for example, ck2yaml)

Comments

@ischoegl
Copy link
Member

ischoegl commented Apr 16, 2021

Problem description

The addition of YAML serialization of Cantera objects (#984) currently does not allow for the addition of base-level fields within the YAML output. Likewise, the original information from root-level fields that exist in YAML is not preserved. While a fix for the latter is proposed in #881, the former was commented on in #984 but remains to be completed (i.e. akin to the the --extra option of ck2yaml.)

A related question pertains to how to access information from Python for information that was attached at the base level of the YAML file. Specifically, Python's Solution.input_data retrieves input that is specific to the phase, which does not cleanly map to the YAML structure. #881 contains an access routine for description, but leaves access to other root-level fields unaddressed (Edit: implementation was too trivial to leave unaddressed - now proposed as a new Solution.extra property in #881.).

Edit: #1014 implements the conversion of Python dictionaries to C++ AnyMap, which enables the addition of custom information to internal C++ AnyMap variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input Input parsing and conversion (for example, ck2yaml)
Projects
None yet
1 participant