KingsburyLab / pyEQL

A Python library for solution chemistry
Other
64 stars 17 forks source link

Overhaul logging system #119

Closed rkingsbury closed 5 months ago

rkingsbury commented 5 months ago

Summary

The warning / logging system in pyEQL has been intentionally verbose and a bit haphazard, prompting confusion on the part of users (see #52 ). This PR overhauls the logging system by

  1. Changing the loggers to conform more closely to python best practices
  2. Adding a log_level kwarg to Solution.__init__ that allows users to control the level of verbosity of the messages they will see in stdout
  3. Using logging levels (INFO/CRITICAL/ERROR/WARNING/DEBUG) rather than warnings in most cases

Closes #52

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 70.23810% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 82.08%. Comparing base (296be67) to head (9612d19). Report is 9 commits behind head on main.

Files Patch % Lines
src/pyEQL/solution.py 62.50% 17 Missing and 1 partial :warning:
src/pyEQL/engines.py 76.92% 3 Missing :warning:
src/pyEQL/equilibrium.py 50.00% 3 Missing :warning:
src/pyEQL/activity_correction.py 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #119 +/- ## ========================================== - Coverage 82.22% 82.08% -0.15% ========================================== Files 10 9 -1 Lines 1463 1457 -6 Branches 294 294 ========================================== - Hits 1203 1196 -7 Misses 221 221 - Partials 39 40 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.