-
Notifications
You must be signed in to change notification settings - Fork 38
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 error message in variable definition check #2313
Fix error message in variable definition check #2313
Conversation
afa8cf2
to
e4e6da4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2313 +/- ##
==========================================
+ Coverage 93.74% 93.78% +0.03%
==========================================
Files 238 238
Lines 13153 13153
==========================================
+ Hits 12330 12335 +5
+ Misses 823 818 -5 ☔ View full report in Codecov by Sentry. |
e4e6da4
to
bf3cc14
Compare
I just updated the commit so as not to have the same error with the |
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 taking the time to contribute! Looks good, just a minor suggestion to make the error message even more readable.
If you'd like to add a unit tests for this, see here for an example of how to write such a test:
|
Co-authored-by: Bouwe Andela <[email protected]>
Thanks for the suggestions, I will also update the error message in similar functions to have something more "uniform". |
Would you still like to add a test, or shall we merge this as-is? |
29299d1
to
87ebf1c
Compare
Hi @bouweandela I have tried to uniformize the RecipeErrors and tests them for: Note that there are two errors (currently added tests with ESMValCore/esmvalcore/_recipe/check.py Lines 71 to 73 in 6f30fa6
ESMValCore/esmvalcore/_recipe/check.py Lines 84 to 87 in 6f30fa6
This is because the error was raised before by the yamale.validate check. Therefore, for me, it would make sense to do any of these:
Let me know which one you prefer |
@bouweandela, this is already okay and ready to merge by my side. Please, let me know if you find anything else missing! |
Would you like to add yourself to the list of authors? |
Done, thank you! |
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.
excellent work, gents 🍻
Description
This PR should correct the bug of not correctly raising the error message in the variable check of the recipe.
Closes #2312
Link to documentation:
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: