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
Update logging messages and raising errors #731
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesYou may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation |
This PR is also ready for review. |
Somebody time to review this PR? It would be nice to merge and then update the master branch :) |
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.
I approve, looks good. I have one minor question: in the __init__
of pasatas we have just added a warning about the noisemodel using warnings.warn. Should we not change this to a logger.warning?
I wanted to make 100% sure that warning is raised, even if someone has a log level of ERROR (dont even know if that is possible) so that's why for that one I used warn. But for other warnings, logger.warning should be it (unless we change that in the future). Merging PR. |
Short Description
In this PR the logging and error raising is made similar throughout Pastas, plus I described how this is done (for now). Even if we want to change this in the future that will be easier because it is all consistent throughout Pastas now.
See doc/developers/code_style.rst for a description of the proposed workflow for logging and raising errors.
Checklist before PR can be merged: