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

Fix many warning from PYTHONDEVMODE=1 #2849

Merged
merged 3 commits into from
Nov 25, 2023

Conversation

luizirber
Copy link
Member

Address #974 (comment), down from 281 warnings to 24 after dib-lab/screed#106 is merged and a new screed version is available.

Most warnings were ResourceWarnings for unclosed files in tests, but there were a couple in src/sourmash too. Preferred to use a context manager with screed.open or when passing the file to another library (like numpy), but for tests changed a lot of code to use Path(...).read_text().splitlines() instead.

The remaining 24 warnings are due to duplicate files in ZipStorage, punting it for later because they will require more attention when modifying src/sourmash/sbt_storage.py.

@luizirber luizirber requested a review from a team November 24, 2023 20:22
@luizirber luizirber changed the title Fixes many warning from PYTHONDEVMODE=1 Fix many warning from PYTHONDEVMODE=1 Nov 24, 2023
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

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

Comparison is base (32d46dd) 86.23% compared to head (7690233) 86.23%.

Files Patch % Lines
src/sourmash/sig/__main__.py 60.52% 13 Missing and 2 partials ⚠️
src/sourmash/commands.py 50.00% 5 Missing and 2 partials ⚠️
src/sourmash/command_compute.py 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2849      +/-   ##
==========================================
- Coverage   86.23%   86.23%   -0.01%     
==========================================
  Files         130      130              
  Lines       14752    14756       +4     
  Branches     2617     2622       +5     
==========================================
+ Hits        12722    12725       +3     
- Misses       1730     1731       +1     
  Partials      300      300              
Flag Coverage Δ
hypothesis-py 25.80% <0.00%> (-0.01%) ⬇️
python 92.82% <59.32%> (-0.01%) ⬇️
rust 50.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@ctb ctb left a comment

Choose a reason for hiding this comment

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

🙇

@luizirber luizirber merged commit 17bc030 into latest Nov 25, 2023
32 of 34 checks passed
@luizirber luizirber deleted the lirber/20231122_devmode_warnings branch November 25, 2023 18:08
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.

2 participants