Add dimensions option to CLI validate-scenarios #421
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributes to #404
Adds a
--dimensions
option to thevalidate-scenarios
command and sets this variable as described here.The additional test for implicit dimension setting is separate from original tests to preserve slightly cleaner code because of a technical detail on how the
dimensions
variable is set by the test CLI runner ((None,)
/('',)
instead of()
).Test harmonisation between
validate-project
andvalidate-scenarios
will come in upcoming PR to ensure the tests: 1) check exit code, 2) check type of exception, 3) check error message.Setting
dimensions
according tonomenclature.yaml
is done in the CLI function(s) to overrideDataStructureDefinition
's standard order of explicit dimensions ->nomenclature.yaml
-> default to["region", "variable"]
. In this way, ifnomenclature.yaml
does not setdimensions
(=None
), it checksdefinitions
subfolders (as previously implemented and now updated forvalidate-project
)