You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the introduction of new YAML features (especially in Python), there has been some discussion of minor 'paper cuts'. Below is a list of issues that could/should be addressed:
It would be nice to have constructors that use keyword names that correspond to YAML field names. This is somewhat complicated by the occurrence of hyphens in many top-level fields (e.g. rate-constant for reaction definitions, see Refactor reaction rate evaluators #995); an alternative @classmethodfrom_dict is an approach that does not have this limitation.
At this point, YAML may refer to a file, string, or even a corresponding Python dictionary, where the context isn't always clear. ... probably not an issue
Some of the unpythonic method names are based on historic equivalents for XML and CTI. As those are to be deprecated, a renaming of legacy methods appears to be unwarranted.
The text was updated successfully, but these errors were encountered:
Problem description
After the introduction of new YAML features (especially in Python), there has been some discussion of minor 'paper cuts'. Below is a list of issues that could/should be addressed:
Reaction.fromYaml
,Reaction.listFromFile
,Reaction.listFromYaml
... fix proposed in Reaction rate factories #1061 (now merged)Species.fromYaml
, etc. … fix proposed in Read YAML using C++ newSolution in Python / access root level data #1129 (now merged)Solution.write_yaml
be able to write into a string … added to Pickle serialization of Solution objects #692 (now merged)It would be nice to have constructors that use keyword names that correspond to YAML field names. This is somewhat complicated by the occurrence of hyphens in many top-level fields (e.g.an alternativerate-constant
for reaction definitions, see Refactor reaction rate evaluators #995);@classmethod
from_dict
is an approach that does not have this limitation.dict_to_anymap
in Implement Python dict to C++ AnyMap conversion #1014, it is now possible to pass dictionaries that are equivalent to YAML definitions to the Python API. In Refactor reaction rate evaluators #995, a newReaction.from_dict
is proposed (now merged). The same is possible for various other imports. ... fix proposed in Resolve Yaml paper cuts #1179With Enable serialization of Cantera objects #984, the... probably not an issueinput_data
field was introduced, which corresponds to the dictionary that can be used byfrom_dict
. A consistent naming scheme may be beneficial, especially as the field does not preserve the original parameterization (see Enable modification of user input data fields in Python #1031).It would be nice to allow for mixed... implementation proposed in Resolve Yaml paper cuts #1179, but droppeddict
/YAML string imports fordict_to_anymap
(see Refactor reaction rate evaluators #995).At this point, YAML may refer to a file, string, or even a corresponding Python dictionary, where the context isn't always clear.... probably not an issueinput
, which either refers to a member variable or a class method. As this was initially introduced in WIP: YAML input file format #584 (and/or related PR's), this part of the API is already released in 2.5.1 and thus is difficult to address. ... not sure that this should be addressedAdditional context
Some of the unpythonic method names are based on historic equivalents for XML and CTI. As those are to be deprecated, a renaming of legacy methods appears to be unwarranted.
The text was updated successfully, but these errors were encountered: