Open bruno-f-cruz opened 2 months ago
As an example:
with open(path, "w", encoding="utf-8") as f:
f.write(_yaml_dump(manifest_config))
return path
def _yaml_dump(model: BaseModel) -> str:
native_json = json.loads(model.model_dump_json())
return yaml.dump(native_json, default_flow_style=False)
We should add a utility method to dump yamls to file so users don't have to worry about figuring out the encoding settings. This should be solved at the same time as #7