Skip to content
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

Logging & Import Updates #123

Merged
merged 46 commits into from
Mar 4, 2020
Merged

Logging & Import Updates #123

merged 46 commits into from
Mar 4, 2020

Conversation

wtgee
Copy link
Member

@wtgee wtgee commented Mar 2, 2020

  • Logger updates
    • The panoptes-utils modules use loguru for logging with it disabled by default. There are no settings changed from the default.
    • The get_root_logger has been entirely revamped and simplified to use loguru but with settings appropriate for use in POCS.
  • Consistent use of relative imports.
  • Misc. cleanup.

Part of #90
Closes #89

@codecov-io
Copy link

codecov-io commented Mar 2, 2020

Codecov Report

Merging #123 into develop will decrease coverage by 0.7%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #123      +/-   ##
===========================================
- Coverage     69.9%   69.19%   -0.71%     
===========================================
  Files           26       26              
  Lines         1904     1753     -151     
  Branches       274      234      -40     
===========================================
- Hits          1331     1213     -118     
+ Misses         509      482      -27     
+ Partials        64       58       -6
Impacted Files Coverage Δ
panoptes/utils/library.py 95% <100%> (ø) ⬆️
panoptes/utils/social/twitter.py 100% <100%> (+18.18%) ⬆️
panoptes/utils/logger.py 100% <100%> (+2.43%) ⬆️
panoptes/utils/database/__init__.py 90% <100%> (+0.52%) ⬆️
panoptes/utils/theskyx.py 91.66% <100%> (ø) ⬆️
panoptes/utils/images/polar_alignment.py 97.77% <100%> (ø) ⬆️
panoptes/utils/database/file.py 95.89% <100%> (-0.32%) ⬇️
panoptes/utils/utils.py 92.04% <100%> (-0.18%) ⬇️
panoptes/utils/rs232.py 86.36% <100%> (-0.25%) ⬇️
panoptes/utils/messaging.py 57.28% <100%> (ø) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a0633a...13f67d2. Read the comment docs.

@wtgee wtgee mentioned this pull request Mar 2, 2020
8 tasks
@wtgee wtgee added this to the v0.2.0 - The Cleanup milestone Mar 2, 2020
@wtgee wtgee added the logging label Mar 2, 2020
wtgee added 16 commits March 2, 2020 13:05
* README updates
    * Adding TOC to README
* Restoring tests with caplog.
* `make_pretty_image` works for `fz` files.
* Fixing make_pretty_image for fz files
* Switching library to `loguru` for easier logs.
* Disabled in `panoptes-utils` by default.
* Logs in JSON to daily rotated file. Later can upload that file.
* More complete conda file.
* Docker builds pip and pyyaml, then conda file, then requirements.txt.
* Adding loguru dependency
* root logger can take file name or dir.
* Better docstring.
* Removed old logger tests.
* Better logger tests.
* Suppress error removing handler from caplog for testing. Not sure why it appears.
@wtgee wtgee merged commit 4631a2b into panoptes:develop Mar 4, 2020
@wtgee wtgee deleted the logging-updates-90 branch March 4, 2020 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Figure out a per-module/per-logger logging strategy
2 participants