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

Use logger instead of print #353

Merged
merged 6 commits into from
Jan 24, 2024
Merged

Use logger instead of print #353

merged 6 commits into from
Jan 24, 2024

Conversation

hugobuddel
Copy link
Collaborator

Replace some print messages with logging

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8412602) 75.57% compared to head (1adb5e5) 75.57%.
Report is 2 commits behind head on dev_master.

Files Patch % Lines
scopesim/effects/electronic.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           dev_master     #353      +/-   ##
==============================================
- Coverage       75.57%   75.57%   -0.01%     
==============================================
  Files              59       59              
  Lines            7869     7868       -1     
==============================================
- Hits             5947     5946       -1     
  Misses           1922     1922              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@teutoburg teutoburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I be nitpicky about lazy string formatting in logging? 😇

scopesim/effects/electronic.py Outdated Show resolved Hide resolved
scopesim/effects/electronic.py Outdated Show resolved Hide resolved
scopesim/effects/electronic.py Outdated Show resolved Hide resolved
scopesim/effects/electronic.py Outdated Show resolved Hide resolved
@teutoburg teutoburg added the refactor Implementation improvement label Jan 24, 2024
hugobuddel and others added 4 commits January 24, 2024 13:35
Co-authored-by: teutoburg <73600109+teutoburg@users.noreply.github.com>
Co-authored-by: teutoburg <73600109+teutoburg@users.noreply.github.com>
Co-authored-by: teutoburg <73600109+teutoburg@users.noreply.github.com>
Co-authored-by: teutoburg <73600109+teutoburg@users.noreply.github.com>
@hugobuddel
Copy link
Collaborator Author

May I be nitpicky about lazy string formatting in logging? 😇

Thanks. It is better this way, so maybe I was just lazy.

I didn't do it because this message will usually be shown under normal circumstances anyway, so it doesn't help much to make them lazy. But the real reason is that I didn't want to look up how to covert the .3f from f-string to % syntax. Maybe I should have spent 0.1 seconds to try it.

There are still some more print statements to convert; I was just going through some notebooks and tried to clean up their output. Hence also #352 (the tqdm PR).

@hugobuddel hugobuddel merged commit 0b07488 into dev_master Jan 24, 2024
25 checks passed
@hugobuddel hugobuddel deleted the hb/uselogger branch January 24, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Implementation improvement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants