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

admin/ship-mypy-type-annotations-drop-py37-add-py310-manage-test-dependencies-separate-for-each-tox-env#397

Merged
evamaxfield merged 22 commits into
mainfrom
admin/ship-type-annotations
May 22, 2022
Merged

admin/ship-mypy-type-annotations-drop-py37-add-py310-manage-test-dependencies-separate-for-each-tox-env#397
evamaxfield merged 22 commits into
mainfrom
admin/ship-type-annotations

Conversation

@evamaxfield

@evamaxfield evamaxfield commented Apr 25, 2022

Copy link
Copy Markdown
Collaborator

Description

Ships type annotations with the library when installed. Now people can define functions based on our types and mypy will correctly resolve them.

This also massively overhauls the testing portions of our library. Extra readers and writers have been moved to their own subdirs in our tests dirs. And each extra reader and writer is tested independently from one another. This is to make it possible to avoid dependency overlap.

Specifically, this relates to how bfio doesn't support and doesn't plan on supporting tifffiles latest releases: PolusAI/bfio#35

However, this somewhat more naturally sets us up better for when we move to a plugin model.

The diff is quite large because of all of these changes but if you look at the codecov, our coverage only minimally changes 🎉

The testing code is now a bit odd imo but something to "not worry about because we actively are trying to make the build 🟢 so we can spend some time prototyping v5"

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 [gh-], adds tiff file format support

Resolves #325
Resolves #373

  • Provide relevant tests for your feature or bug fix.
  • Provide or update documentation for any feature added by your pull request.

Thanks for contributing!

@evamaxfield evamaxfield added the admin Various administrative tasks for the package label Apr 25, 2022
@evamaxfield evamaxfield self-assigned this Apr 25, 2022
@codecov-commenter

codecov-commenter commented Apr 26, 2022

Copy link
Copy Markdown

Codecov Report

Merging #397 (9e6e839) into main (2a62b4e) will increase coverage by 0.87%.
The diff coverage is 98.33%.

@@            Coverage Diff             @@
##             main     #397      +/-   ##
==========================================
+ Coverage   93.65%   94.52%   +0.87%     
==========================================
  Files          49       45       -4     
  Lines        3702     3728      +26     
==========================================
+ Hits         3467     3524      +57     
+ Misses        235      204      -31     
Impacted Files Coverage Δ
aicsimageio/readers/czi_reader.py 96.19% <ø> (+0.97%) ⬆️
aicsimageio/tests/readers/test_ome_tiff_reader.py 96.33% <94.80%> (-3.67%) ⬇️
...eio/tests/readers/extra_readers/test_lif_reader.py 99.13% <98.27%> (ø)
aicsimageio/tests/readers/test_tiff_reader.py 99.03% <98.80%> (-0.97%) ⬇️
aicsimageio/readers/bioformats_reader.py 85.40% <100.00%> (-0.07%) ⬇️
aicsimageio/readers/dv_reader.py 92.85% <100.00%> (+4.76%) ⬆️
aicsimageio/readers/tiff_glob_reader.py 85.35% <100.00%> (+0.64%) ⬆️
...ts/readers/extra_readers/test_bioformats_reader.py 100.00% <100.00%> (ø)
...eio/tests/readers/extra_readers/test_czi_reader.py 98.14% <100.00%> (ø)
...tests/readers/extra_readers/test_default_reader.py 100.00% <100.00%> (ø)
... and 20 more

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 2a62b4e...9e6e839. Read the comment docs.

@evamaxfield evamaxfield changed the title admin/ship-mypy-type-annotations admin/ship-mypy-type-annotations-and-drop-py37 Apr 26, 2022

@AetherUnbound AetherUnbound left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good! Just one note on what looks like some debug code.

Comment thread aicsimageio/readers/tiff_glob_reader.py Outdated
@evamaxfield evamaxfield changed the title admin/ship-mypy-type-annotations-and-drop-py37 admin/ship-mypy-type-annotations-drop-py37-manage-test-dependencies-separate-for-each-tox-env May 18, 2022
@toloudis

toloudis commented May 18, 2022

Copy link
Copy Markdown
Collaborator

Sorry if I missed this, or forgot, but why can we drop 3.7? its end of life date is still more than 1 year away

@evamaxfield

Copy link
Copy Markdown
Collaborator Author

Sorry if I missed this, or forgot, but why can we drop 3.7? its end of life date is still more than 1 year away

numpy, dask, pandas, scipy, tifffile, have all dropped py37. I am following their cycle.

@toloudis

Copy link
Copy Markdown
Collaborator

Sorry if I missed this, or forgot, but why can we drop 3.7? its end of life date is still more than 1 year away

numpy, dask, pandas, scipy, tifffile, have all dropped py37. I am following their cycle.

Wonder if this PR is the place to add 3.10

@evamaxfield

Copy link
Copy Markdown
Collaborator Author

Sorry if I missed this, or forgot, but why can we drop 3.7? its end of life date is still more than 1 year away

numpy, dask, pandas, scipy, tifffile, have all dropped py37. I am following their cycle.

Wonder if this PR is the place to add 3.10

Yep I am going to do it here and close the other PR

@evamaxfield evamaxfield changed the title admin/ship-mypy-type-annotations-drop-py37-manage-test-dependencies-separate-for-each-tox-env admin/ship-mypy-type-annotations-drop-py37-add-py310-manage-test-dependencies-separate-for-each-tox-env May 20, 2022
@evamaxfield evamaxfield requested a review from AetherUnbound May 20, 2022 19:00
@evamaxfield

Copy link
Copy Markdown
Collaborator Author

@toloudis @AetherUnbound if possible wanna give this a look over? It's ready!! and Jpype 1.4.0 was released so we can officially ship 3.10 too!

f"Received URI: {self._path}, which points to {type(self._fs)}."
)

# Handle deprecated parameter

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

😈

@toloudis toloudis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not looking forward to mergeing with other outstanding PRs but i like the changes.

@evamaxfield evamaxfield merged commit ae4fde0 into main May 22, 2022
@evamaxfield evamaxfield deleted the admin/ship-type-annotations branch May 22, 2022 01:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

admin Various administrative tasks for the package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 3.10 wheels for aicsimageio and aicspylibczi Ship type annotations with library

4 participants