Skip to content

Formalize YAML metadata fields #56

@ischoegl

Description

@ischoegl

Abstract

Based on a discussion in Cantera/cantera#881, the description of metadata appears to not be fully formalized. At the moment, ck2yaml creates note and description fields. See @speth's comment

Just because ck2yaml currently creates a field named note doesn't mean should formalize that as the way of storing metadata. I know there are multiple pseudo-standards for organizing metadata in Chemkin mechanism comments which could be used to populate more semantically useful fields. For example, I know RMG puts the SMILES for each species as the comment following each species name in the SPECIES section, and information on the source of the reaction rate before each reaction. If ck2yaml gets smart enough to do this, I'd rather the note field be empty except when it doesn't know what else to do.

Motivation

Defining note and description now with potentially moving to other ways of storing metadata in the future will create potential issues in terms of backward compatibility. At the moment, note contains CHEMKIN comments that qualify as metadata if the YAML file is generated by ck2yaml. I.e. if someone uses a YAML file generated by ck2yaml in 2.5, and then revisits a problem in, say, 3.1, the YAML note fields should still be supported/readable? I strongly believe that once ck2yaml creates a precedent of defining specific fields it will be difficult to change in future releases.

With Cantera 2.5 still in alpha stage, there's a (rapidly closing) window of opportunity to 'future-proof' metadata fields by renaming note and description to meta and treating them as a generic AnyValue fields. It thus can be a string (as in the current implementation) for 2.5 or any other structure down the road.

Possible Solutions

Rename note and description to meta in YAML files (sed replacements in current YAML data), update converters and parsers.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions