Skip to content

Release v0.7

Compare
Choose a tag to compare
@phackstock phackstock released this 23 Nov 10:06
· 126 commits to main since this release
a17beae

New features

Improved tag replacement logic. Occurrences of {tag} inside a code object are now replaced with the tag name if the tag in question does not feature the attribute in question.

For further details please see https://nomenclature-iamc.readthedocs.io/en/stable/user_guide/codelist.html#the-tag-feature.

Breaking changes

The CodeList classes now contain dictionaries mapping the name of a code to a Code object. Previously instead of the Code object, a dictionary was used. Therefore attribute access has changed.

As an example, to access the file attribute of a code called "code1", previously we would have used codelist["code1"]["file"].
This will no longer work, instead codelist["code1"].file, has to be used.

In order to make this attribute access work, the allowed names of attributes have been restricted to valid, non-keyword, python identifiers. An attribute called "iso2" is allowed while an attribute called "while" or "2iso" is not. This restriction is enforced using a pydantic validator.

What's Changed

Full Changelog: v0.6...v0.7