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

Remove dimensions implicit default from DataStructureDefinition #422

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

dc-almeida
Copy link
Collaborator

Removes implicit default dimensions ["region", "variable"] from DataStructureDefinition, instead defaulting to definitions subdirectories.
Running workflows without definitions subdirectories is also possible as long as nomenclature.yaml sets the dimensions and respective external repos (see test_mapping_from_external_repository's configuration file).
For project validation, dimensions defaults to either those in nomenclature.yaml or to definitions subdirectories (without either, it fails).

@dc-almeida dc-almeida self-assigned this Nov 13, 2024
@dc-almeida dc-almeida added the enhancement New feature or request label Nov 13, 2024
@dc-almeida dc-almeida changed the title Remove dimensions implicit default Remove dimensions implicit default from DataStructureDefinition Nov 13, 2024
@dc-almeida dc-almeida marked this pull request as ready for review November 13, 2024 10:51
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.

A few more minor comments, then good to be merged from my side!

docs/user_guide/config.rst Show resolved Hide resolved
* Each "dimension" to be used for validation (default: *variable* and *region*) must
have its own sub-directory in the *definitions* folder. The dimension names usually
follow the column names of the IAMC data format.
* Each "dimension" to be used for validation must have its own sub-directory in
Copy link
Member

Choose a reason for hiding this comment

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

Is this still true? So if we only import variables from an external repo, do we need a definitions/variable folder?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was wondering how to rewrite this clearly and succinctly. With this PR, if dimensions are imported from external repos, it's only necessary to specify the subfolders if no dimensions are specified in nomenclature.yaml.

nomenclature/definition.py Outdated Show resolved Hide resolved
tests/test_cli.py Outdated Show resolved Hide resolved
tests/test_definition.py Outdated Show resolved Hide resolved
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.

Good to merge from my side.

@dc-almeida dc-almeida merged commit e180be5 into IAMconsortium:main Nov 14, 2024
11 checks passed
@dc-almeida dc-almeida deleted the dimensions-implicit-default branch December 17, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants