Skip to content
New issue

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

Prototype for a model-registration parser #285

Conversation

danielhuppmann
Copy link
Member

A discussion for a model-registration reminded me of this prototype for a model-registration parser utility, so this PR adds the initial implementation for future use and improvement.

My suggestion is to to a quick review, then merge, and extend features, etc. as the need arises.

Copy link
Contributor

@phackstock phackstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a few updates necessary to make this functional and nice.
If you want you can go ahead with the merge as is but I'd suggest that I'll update your branch for clean up.

nomenclature/__init__.py Outdated Show resolved Hide resolved
nomenclature/__init__.py Outdated Show resolved Hide resolved
nomenclature/__init__.py Outdated Show resolved Hide resolved
nomenclature/__init__.py Outdated Show resolved Hide resolved
nomenclature/__init__.py Outdated Show resolved Hide resolved
nomenclature/__init__.py Outdated Show resolved Hide resolved
nomenclature/__init__.py Outdated Show resolved Hide resolved
@phackstock
Copy link
Contributor

Finally got around to finishing this one.

@phackstock
Copy link
Contributor

I modified RegionAggregationMapping.from_file so that it chooses which parser to use depending on whether we read yaml or excel. In addition I added a to_yaml method so that you can write the class to a file.
With those two components parse_model_registration is nice and compact :)
@danielhuppmann, since this is your PR I think I can't chose you as a reviewer, is this ok or should I open it again under my name so that you can review it properly?

@danielhuppmann
Copy link
Member Author

Thanks for continuing to work on my initial prototype, looks very nice!

@danielhuppmann danielhuppmann merged commit 44bc04e into IAMconsortium:main Dec 12, 2023
8 checks passed
@danielhuppmann danielhuppmann deleted the feature/model-registration-parser branch December 12, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants