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

Import mappings from external repo #268

Conversation

phackstock
Copy link
Contributor

closes #267.

Changes

  • There is now a new configuration class called NomenclatureConfig. Example:
repositories:
  common-definitions:
    url: https://github.com/IAMconsortium/common-definitions.git/
definitions:
  region:
    repository: common-definitions
  variable:
    repository: common-definitions
mappings:
  repository: common-definitions
  • In analogy to the readthedocs configuration this configuration must be in a file called .nomenclature.yaml located in the root of the repository.

Open questions

  • I'm open for suggestions on the name of the configuration class and the configuration file. I just had to put something there for now.
  • With the option now to instantiate CodeList and RegionProcessor objects entirely from and external repository, the from_directory methods of both classes no longer accurately reflect their functions.
  • Additionally, the folders for definitions is currently required to exist, even if it's empty.

Maybe the last two points are better addressed in a follow-up PR though.

Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

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

Looks good overall, a few minor comments and suggestions inline.

nomenclature/codelist.py Outdated Show resolved Hide resolved
nomenclature/codelist.py Outdated Show resolved Hide resolved
nomenclature/definition.py Outdated Show resolved Hide resolved
nomenclature/processor/region.py Outdated Show resolved Hide resolved
nomenclature/config.py Show resolved Hide resolved
Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @phackstock!

@phackstock phackstock merged commit b4cbb53 into IAMconsortium:main Jul 26, 2023
11 checks passed
@phackstock phackstock deleted the feature/import-mappings-from-external-repo branch July 26, 2023 13:55
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.

Enable using model mappings from external repository
2 participants