stilt.config.ModelConfig.to_yaml#

ModelConfig.to_yaml(path=None)[source]#

Return the config as YAML, and write it to path when given.

The file is meant to be edited by hand, so it holds only the settings that were given, top-level and for each met. mets and variants come first. variants is always written, with one entry per met when none were declared, so the file lists the variants that run. The full settings of each variant are kept in the project’s record (stilt.Project.load_record()).

Return type:

str

Parameters:

path (str | Path | None)