Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

fix/only-close-biofiofile-on-exit-if-not-open-on-entry#341

Merged
evamaxfield merged 6 commits into
mainfrom
unknown repository
Nov 11, 2021
Merged

fix/only-close-biofiofile-on-exit-if-not-open-on-entry#341
evamaxfield merged 6 commits into
mainfrom
unknown repository

Conversation

@tlambert03

Copy link
Copy Markdown
Collaborator

Description

fixes the issue mentioned by @NHPatterson described in #339 (comment), wherein dask.compute() closes a BioFile after reading. (It should only close if the file was not already open when __enter__ was called)

Pull request recommendations:

  • Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
  • Link to any relevant issue in the PR description. Ex: Resolves [Fix release #12], adds tiff file format support
  • Provide relevant tests for your feature or bug fix.
  • Provide or update documentation for any feature added by your pull request.

Thanks for contributing!

@tlambert03 tlambert03 changed the title fix wrapper on opened files fix/only-close-biofiofile-on-exit-if-not-open-on-entry Oct 19, 2021
@evamaxfield evamaxfield added the bug Something isn't working label Oct 19, 2021
@codecov-commenter

codecov-commenter commented Oct 19, 2021

Copy link
Copy Markdown

Codecov Report

Merging #341 (103fc96) into main (2595aca) will decrease coverage by 0.27%.
The diff coverage is 82.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #341      +/-   ##
==========================================
- Coverage   93.96%   93.68%   -0.28%     
==========================================
  Files          47       47              
  Lines        3548     3565      +17     
==========================================
+ Hits         3334     3340       +6     
- Misses        214      225      +11     
Impacted Files Coverage Δ
aicsimageio/utils/dask_proxy.py 86.04% <68.42%> (-13.96%) ⬇️
aicsimageio/readers/bioformats_reader.py 85.47% <100.00%> (-0.07%) ⬇️
...icsimageio/tests/readers/test_bioformats_reader.py 100.00% <100.00%> (ø)
aicsimageio/tests/utils/test_dask_proxy.py 100.00% <100.00%> (ø)
aicsimageio/tests/conftest.py 92.30% <0.00%> (-3.85%) ⬇️
aicsimageio/tests/readers/test_czi_reader.py 96.29% <0.00%> (-3.71%) ⬇️
aicsimageio/readers/ome_tiff_reader.py 98.13% <0.00%> (-0.94%) ⬇️
aicsimageio/readers/czi_reader.py 95.43% <0.00%> (-0.36%) ⬇️

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 2595aca...103fc96. Read the comment docs.

@tlambert03

Copy link
Copy Markdown
Collaborator Author

argh... now I'm running into leaked file handles in tests again 😂 ok, need a bit more time with this one

@evamaxfield

Copy link
Copy Markdown
Collaborator

argh... now I'm running into leaked file handles in tests again joy ok, need a bit more time with this one

I am going to retrigger CI because tiff reader is failing even though there are no changes to it...

@evamaxfield

Copy link
Copy Markdown
Collaborator

Oh yea. Okay there is a bug somewhere. I am assuming the tiff reader failures are happening because of leftover file opens from some other tests. 🤷

@toloudis

Copy link
Copy Markdown
Collaborator

windows ftw

@evamaxfield

Copy link
Copy Markdown
Collaborator

Happy to merge this, looks like Sphinx released an update today that broke our docs: https://pypi.org/project/Sphinx/ so ignore that build.

@tlambert03

Copy link
Copy Markdown
Collaborator Author

thanks! lemme clean up one comment first

@evamaxfield evamaxfield merged commit 1e78ee3 into AllenCellModeling:main Nov 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants