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

feat: accept file handles as well as paths #161

Merged
merged 2 commits into from
Jul 9, 2023
Merged

Conversation

tlambert03
Copy link
Owner

@tlambert03 tlambert03 commented Jul 9, 2023

this makes it possible to use:

with open('myfile.nd2', 'rb') as fh:
    nd2file = nd2.ND2File(fh)

closes #1

@codecov
Copy link

codecov bot commented Jul 9, 2023

Codecov Report

Merging #161 (c622008) into main (4ea166e) will decrease coverage by 0.12%.
The diff coverage is 89.65%.

@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
- Coverage   93.88%   93.77%   -0.12%     
==========================================
  Files          17       17              
  Lines        2340     2362      +22     
==========================================
+ Hits         2197     2215      +18     
- Misses        143      147       +4     
Impacted Files Coverage Δ
src/nd2/_parse/_chunk_decode.py 86.76% <72.72%> (-0.65%) ⬇️
src/nd2/_util.py 93.05% <80.00%> (-2.40%) ⬇️
src/nd2/readers/protocol.py 91.01% <95.65%> (+0.87%) ⬆️
src/nd2/nd2file.py 97.35% <100.00%> (-0.03%) ⬇️
src/nd2/readers/_legacy/legacy_reader.py 90.34% <100.00%> (ø)
src/nd2/readers/_modern/modern_reader.py 92.02% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 9, 2023

CodSpeed Performance Report

Merging #161 will not alter performances

Comparing accept-file-handle (c622008) with main (4ea166e)

Summary

✅ 13 untouched benchmarks

@tlambert03 tlambert03 merged commit fecd852 into main Jul 9, 2023
16 of 18 checks passed
@tlambert03 tlambert03 deleted the accept-file-handle branch July 9, 2023 23:56
@tlambert03 tlambert03 added the enhancement New feature or request label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support open file handles
1 participant