-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support directional region validation #440
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That clarifies why I had seen regions with the '>' before!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change requested, then good to merge.
If it's ok, I'd push my proposed change and you can take a look.
Thanks @phackstock for the improvement, very nice! I made one minor suggestion to reduce the duplicated validation-statement, feel free to decide whether that should be merged. Over to you to approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to be merged from my side.
I'd keep the two checks for origin and destination explicit for better readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough @phackstock, but then we can at least make the error messages more specific - what do you think?
Co-authored-by: Daniel Huppmann <[email protected]>
Good point, suggestions are merged. |
This PR implements validation for "directional regions" - when defining a region to report e.g. trade flows, this can be implemented as "China>Europe" using a > character. Both the source and the destination have to be defined in the codelist.