Skip to content

Commit

Permalink
admin/support-py311 (#446)
Browse files Browse the repository at this point in the history
* Support Py311

* Always use latest runners instead of defined versions

* fix multiscene czi bioformats test

* fix ome-tiff-reader tests

* bump isort version

* add py311 to tox

* bumping to latest aicspylibczi

* bump to aicspylibczi 3.1.1

* remove codecov

* fix equality check

* Update setup.py

try to bump Pillow to first version supporting 3.11

---------

Co-authored-by: dmt <[email protected]>
Co-authored-by: Brian Whitney <[email protected]>
Co-authored-by: toloudis <[email protected]>
Co-authored-by: dmt <[email protected]>
Co-authored-by: toloudis <[email protected]>
  • Loading branch information
6 people authored Apr 14, 2023
1 parent 45dd26f commit 4b12e32
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 29 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', 3.11]
os: [
ubuntu-20.04,
ubuntu-latest,
windows-latest,
macos-11,
macos-latest,
]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', 3.11]
os: [
ubuntu-20.04,
windows-latest,
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -130,7 +130,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', 3.11]
os: [
ubuntu-20.04,
ubuntu-latest,
windows-latest,
macos-11,
macos-latest,
]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', 3.11]
os: [
ubuntu-20.04,
windows-latest,
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -123,7 +123,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'
python-version: 3.11
- name: Install Dependencies
run: |
pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-upstreams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', 3.11]
os: [
ubuntu-20.04,
ubuntu-latest,
windows-latest,
macos-11,
macos-latest,
]
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in P
- `TIFF`
- `ND2` -- (`pip install aicsimageio[nd2]`)
- `DV` -- (`pip install aicsimageio[dv]`)
- `CZI` -- (`pip install aicspylibczi>=3.0.5 fsspec>=2022.7.1`)
- `CZI` -- (`pip install aicspylibczi>=3.1.1 fsspec>=2022.8.0`)
- `LIF` -- (`pip install readlif>=0.6.4`)
- `PNG`, `GIF`, [etc.](https://github.com/imageio/imageio) -- (`pip install aicsimageio[base-imageio]`)
- Files supported by [Bio-Formats](https://docs.openmicroscopy.org/bio-formats/latest/supported-formats.html) -- (`pip install aicsimageio bioformats_jar`) (Note: requires `java` and `maven`, see below for details.)
Expand Down Expand Up @@ -55,7 +55,7 @@ optionally installed using `[...]` syntax.
- For multiple additional supported formats: `pip install aicsimageio[base-imageio,nd2]`
- For all additional supported (and openly licensed) formats: `pip install aicsimageio[all]`
- Due to the GPL license, LIF support is not included with the `[all]` extra, and must be installed manually with `pip install aicsimageio readlif>=0.6.4`
- Due to the GPL license, CZI support is not included with the `[all]` extra, and must be installed manually with `pip install aicsimageio aicspylibczi>=3.0.5 fsspec>=2022.7.1`
- Due to the GPL license, CZI support is not included with the `[all]` extra, and must be installed manually with `pip install aicsimageio aicspylibczi>=3.1.1 fsspec>=2022.8.0`
- Due to the GPL license, Bio-Formats support is not included with the `[all]` extra, and must be installed manually with `pip install aicsimageio bioformats_jar`. **Important!!** Bio-Formats support also requires a `java` and `mvn` executable in the environment. The simplest method is to install `bioformats_jar` from conda: `conda install -c conda-forge bioformats_jar` (which will additionally bring `openjdk` and `maven` packages).

## Documentation
Expand Down Expand Up @@ -340,6 +340,7 @@ If you find `aicsimageio` useful, please cite this repository as:
> Eva Maxfield Brown, Dan Toloudis, Jamie Sherman, Madison Swain-Bowden, Talley Lambert, AICSImageIO Contributors (2021). AICSImageIO: Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in Pure Python [Computer software]. GitHub. https://github.com/AllenCellModeling/aicsimageio
bibtex:

```bibtex
@misc{aicsimageio,
author = {Brown, Eva Maxfield and Toloudis, Dan and Sherman, Jamie and Swain-Bowden, Madison and Lambert, Talley and {AICSImageIO Contributors}},
Expand Down
2 changes: 1 addition & 1 deletion aicsimageio/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
"aicsimageio.readers.bioformats_reader.BioformatsReader": "bioformats_jar",
"aicsimageio.readers.default_reader.DefaultReader": "aicsimageio[base-imageio]",
"aicsimageio.readers.lif_reader.LifReader": "readlif>=0.6.4",
"aicsimageio.readers.czi_reader.CziReader": "aicspylibczi>=3.0.5",
"aicsimageio.readers.czi_reader.CziReader": "aicspylibczi>=3.1.1",
"aicsimageio.readers.dv_reader.DVReader": "aicsimageio[dv]",
"aicsimageio.readers.nd2_reader.ND2Reader": "aicsimageio[nd2]",
}
6 changes: 3 additions & 3 deletions aicsimageio/readers/czi_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
except ImportError:
raise ImportError(
"aicspylibczi is required for this reader. "
"Install with `pip install 'aicspylibczi>=3.0.5' 'fsspec>=2022.7.1'`"
"Install with `pip install 'aicspylibczi>=3.1.1' 'fsspec>=2022.7.1'`"
)

###############################################################################
Expand Down Expand Up @@ -82,7 +82,7 @@ class CziReader(Reader):
Notes
-----
To use this reader, install with: `pip install aicspylibczi>=3.0.5`.
To use this reader, install with: `pip install aicspylibczi>=3.1.1`.
"""

@staticmethod
Expand Down Expand Up @@ -369,7 +369,7 @@ def _get_image_data(

# If the dim was provided in the read dims
# we know a single plane for that dimension was requested so remove it
if dim in read_dims or dim is CZI_BLOCK_DIM_CHAR:
if dim in read_dims or dim == CZI_BLOCK_DIM_CHAR:
ops.append(0)

# Otherwise just read the full slice
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def run(self):
format_libs: Dict[str, List[str]] = {
"base-imageio": [
"imageio[ffmpeg]>=2.11.0",
"Pillow>=8.2.0,!=8.3.0,<9",
"Pillow>=9.3",
],
"nd2": ["nd2[legacy]>=0.2.0"],
"dv": ["mrc>=0.2.0"],
"bfio": ["bfio>=2.3.0", "tifffile<2022.4.22"],
# "czi": [ # excluded for licensing reasons
# "fsspec>=2022.7.1",
# "aicspylibczi>=3.0.5",
# "fsspec>=2022.8.0",
# "aicspylibczi>=3.1.1",
# ],
# "bioformats": ["bioformats_jar"], # excluded for licensing reasons
# "lif": ["readlif>=0.6.4"], # excluded for licensing reasons
Expand All @@ -55,7 +55,6 @@ def run(self):
]

test_requirements = [
"codecov>=2.1.4",
"dask[array,distributed]>=2021.4.1,!=2022.5.1",
"docutils>=0.10,<0.16",
"psutil>=5.7.0",
Expand Down Expand Up @@ -91,7 +90,7 @@ def run(self):
"bioformats_jar", # to test bioformats
"bfio>=2.3.0",
"readlif>=0.6.4", # to test lif
"aicspylibczi>=3.0.5", # to test czi
"aicspylibczi>=3.1.1", # to test czi
]

benchmark_requirements = [
Expand Down Expand Up @@ -138,6 +137,7 @@ def run(self):
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
description=(
"Image Reading, Metadata Conversion, and Image Writing for Microscopy Images "
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38, py39, py310, bioformats, czi, base-imageio, dv, lif, nd2, bfio, upstreams, lint
envlist = py38, py39, py310, py311, bioformats, czi, base-imageio, dv, lif, nd2, bfio, upstreams, lint
skip_missing_interpreters = true
toxworkdir={env:TOX_WORK_DIR:.tox}

Expand Down Expand Up @@ -32,8 +32,8 @@ setenv =
extras =
test
deps =
aicspylibczi>=3.0.5
fsspec>=2022.7.1
aicspylibczi>=3.1.1
fsspec>=2022.8.0
commands =
pytest --basetemp={envtmpdir} --cov-report xml --cov-report html --cov=aicsimageio aicsimageio/tests/readers/extra_readers/test_czi_reader.py {posargs}

Expand Down

0 comments on commit 4b12e32

Please sign in to comment.