Skip to content

Consistent logging #270

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

Merged
merged 13 commits into from
Apr 16, 2025
Merged

Consistent logging #270

merged 13 commits into from
Apr 16, 2025

Conversation

banesullivan
Copy link
Contributor

Make logging/debug statements consistently use a logger.

Note: we want to use logging over warnings as warnings will suppress a warning after the first time it is issued. When processing reviews, we want to see any warnings that are issued on a project by project basis

This also adds tqdm for progress monitoring

Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 52.63158% with 18 lines in your changes missing coverage. Please review.

Project coverage is 80.38%. Comparing base (5802ea1) to head (df8e3fd).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/pyosmeta/contributors.py 33.33% 4 Missing ⚠️
src/pyosmeta/github_api.py 33.33% 4 Missing ⚠️
src/pyosmeta/parse_issues.py 71.42% 4 Missing ⚠️
src/pyosmeta/file_io.py 33.33% 2 Missing ⚠️
src/pyosmeta/models/base.py 33.33% 2 Missing ⚠️
src/pyosmeta/utils_clean.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #270      +/-   ##
==========================================
+ Coverage   80.22%   80.38%   +0.16%     
==========================================
  Files          10       11       +1     
  Lines         713      724      +11     
  Branches       92       92              
==========================================
+ Hits          572      582      +10     
- Misses        131      132       +1     
  Partials       10       10              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@willingc willingc left a comment

Choose a reason for hiding this comment

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

I love this approach @banesullivan. Will give a more thorough review when it is out of draft. Thank you!

@banesullivan banesullivan marked this pull request as ready for review April 16, 2025 15:56
except urllib.error.URLError as url_error:
print("Oops - can find the url", file_path, url_error)
except urllib.error.URLError:
logger.error(f"Oops - can find the url: {file_path}", exc_info=True)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
logger.error(f"Oops - can find the url: {file_path}", exc_info=True)
logger.error(f"Oops - I can't find the url: {file_path}", exc_info=True)

Copy link
Member

@lwasser lwasser left a comment

Choose a reason for hiding this comment

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

thank you for cleaning this up @banesullivan let's merge.

@lwasser lwasser merged commit 7ee78f9 into pyOpenSci:main Apr 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants