We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Discovered during 218, reading a yaml file into a CodeList object and dumping it out to yaml again does not work for nested structures.
CodeList
As an example a variable code list with a region-aggregation attributes:
- Price|Carbon: definition: Price of carbon (as reported by the model) unit: US$2010/t CO2 region-aggregation: - Price|Carbon (mean): method: mean
reading it in and writing it out to yaml again:
VariableCodeList.from_directory("variable", "definitions").to_yaml()
gives the following:
Price|Carbon: description: Price of carbon (as reported by the model) unit: US$2010/t CO2 region_aggregation: - Price|Carbon (mean): method: mean
The indentation under region_aggregation is missing which breaks reading the yaml file.
It seems that this is a known issue with pyyaml (yaml/pyyaml#234 and https://stackoverflow.com/questions/25108581/python-yaml-dump-bad-indentation) so it shouldn't be too hard to fix.
The text was updated successfully, but these errors were encountered:
Closed in #218.
Sorry, something went wrong.
phackstock
No branches or pull requests
Discovered during 218, reading a yaml file into a
CodeList
object and dumping it out to yaml again does not work for nested structures.As an example a variable code list with a region-aggregation attributes:
reading it in and writing it out to yaml again:
gives the following:
The indentation under region_aggregation is missing which breaks reading the yaml file.
It seems that this is a known issue with pyyaml (yaml/pyyaml#234 and https://stackoverflow.com/questions/25108581/python-yaml-dump-bad-indentation) so it shouldn't be too hard to fix.
The text was updated successfully, but these errors were encountered: