-
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
Features/add cli option #147
Features/add cli option #147
Conversation
Cli accepts any other arguments but nothing is done with it yet
Way to call the option: --dimensions=variable,region,foo
For now it works with --dimensions=variable,region,foo |
Tried to run this, but it seems that tests are now failing if a About the approach:
I still think that something like
would be preferable. |
--dimensions "['variable', 'region', 'foo']"
I spent quite some time on an error because apparently ' and " are not behaving the same: --dimensions "['variable', 'region', 'foo']" works fine, --dimensions '["variable", "region", "foo"]' does not. Am I the only one who does not know that? If not, I will remember to indicate this clearly for the users, that might confuse people too. And yes I will work on the tests execution. |
I didn't know that either, but if there are some examples (in the docs and the tests), it should be relatively straightforward for users to "automatically" use the right structure... |
Yes OK I will do that |
Not working yet...
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.
Looks pretty good overall. Some comments below in line.
One more general comment about testing the failure states of the cli is that maybe we want to test for more than just the exit code. We want to assure that the cli fails in the way intended and not just that it fails in any way. What do you think @danielhuppmann, should this be added here or should this be subject of a possible follow-up PR?
tests/data/non-default_dimensions_failing/definitions/region/regions.yaml
Outdated
Show resolved
Hide resolved
tests/data/non-default_dimensions_passing/definitions/region/regions.yaml
Outdated
Show resolved
Hide resolved
Agree with you @phackstock in principle, but let's do that as a follow-up PR. |
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.
Thanks for addressing all the comments @luciecastella.
Good to be merged from my side.
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.
Thanks @luciecastella, nice work!
Closes #71
This adds a features allowing users to optionally type in the dimensions to check non-default dimensions in the validation of a project.
This is currently done with (edit) : --dimensions "['variable', 'region', 'foo']"