-
Notifications
You must be signed in to change notification settings - Fork 3
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
Better fail message #32
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
+ Coverage 99.23% 99.24% +<.01%
==========================================
Files 12 12
Lines 394 397 +3
Branches 64 65 +1
==========================================
+ Hits 391 394 +3
Misses 1 1
Partials 2 2
Continue to review full report at Codecov.
|
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.
Why Warning
rather than ValueError
? An error would make more sense no? If users want to ignore it they can put it in a try, except
block.
We can do, although currently there are rather a lot of reasons why it may fail with a ValueError. This sort of warning will still need to be caught anyway. Do we want to ignore all ValueErrors from a single run of silicone in those cases? Quite possibly we do, I suppose. |
So I think given this PR is just about what happens if there's no data, let's think about that first. As a user I'd expect an error with the message you have. Then when we're running Silicone elsewhere (e.g. AR6 stuff) we can put the error handling in there. However in this PR I think an error is still most appropriate. If we wanted to get really fancy, we could create our own ValueError sub-class, NoData, or something. |
I've changed the error message, however I still get this weird tagging problem that means that half of the notepad checks fail. Am I just using a different package for something? |
No the order of columns in dataframes isn't stable. It's annoying but there it is. Just put |
Thanks a lot @Rlamboll @znicholls - this is useful - so we will use a try/except block - but at least the warning will indicate why the particular scenario fails. |
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.
Minor suggestion otherwise lgtm
Co-Authored-By: Zeb Nicholls <zebedee.nicholls@climate-energy-college.org>
Pull request
Please confirm that this pull request has done the following:
CHANGELOG.rst
addedAdding to CHANGELOG.rst
Please add a single line in the changelog notes similar to one of the following: