-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix validation of campaign configs #143
Fix validation of campaign configs #143
Conversation
Without this fix, I'm seeing an error when I use the
|
I'm not sure how this was missed in my testing of #138. |
I'm testing this as part of my work on adding the |
That is strange. I wonder how we both missed that. I'm able to reproduce the error now.
Using this change, configuration validation passes (although this statement prints twice, as I suppose would be expected) and the jobs are launched. Thanks for making this change! |
Yes. If that bothers you, we probably don't need to print out anything if things work as expected. Most users won't care about the details if there isn't a problem. |
@forsyth2, let me know if you want me to include that change. |
@forsyth2, I'm running into more issues as I test the cryosphere configuration. The testing with the water cycle configuration was a little too simple because all the options in So I'm putting this PR in draft mode and will push some other fixes, hopefully soon. |
c9abfc6
to
42434c4
Compare
This merge switches to first merging user and campaign config files and only validating after the merge. This slightly complicates the logic for getting the campaign (if any) because defaults have not yet been parsed at that point. But it does mean we only validate once (so only one validation success is printed) and it means that defaults will not override the campaign config options, as was happening before this merge.
42434c4
to
5bc7af5
Compare
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 @xylar. I tested on the following four cases and everything seems to work.
campaign = "water_cycle"
campaign = "none"
- Campaign unspecified
campaign = "water_cycle"
overridingsets
assets = 'qbo',
@forsyth2, thanks very much for testing. I think you can merge this whenever you're ready. |
@xylar I'm working on some automated tests for this. Is it ok for me to push them to your branch before merging? |
The commit I would add to this branch is here: forsyth2@245b735 |
@forsyth2, that looks good to me. |
This merge switches to first merging user and campaign config files and only validating after the merge. This slightly complicates the logic for getting the campaign (if any) because defaults have not yet been parsed at that point. But it does mean we only validate once (so only one validation success is printed) and it means that defaults will not override the campaign config options, as was happening before this merge.