From 54ae325f9958da482aebd7408f9c403c98899d9f Mon Sep 17 00:00:00 2001 From: Eva Maxfield Brown Date: Tue, 23 Aug 2022 23:19:09 -0700 Subject: [PATCH] admin/include-fsspec-dep-for-czi-in-readme (#433) * README note the CZI fsspec compat * Note fsspec install in CZI import error catch * Wrap lif install with string to have proper lif install --- README.md | 4 ++-- aicsimageio/readers/czi_reader.py | 2 +- aicsimageio/readers/lif_reader.py | 2 +- setup.py | 5 ++++- tox.ini | 4 +++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cf4e230d6..0679ed28b 100644 --- a/README.md +++ b/README.md @@ -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`) + - `CZI` -- (`pip install aicspylibczi>=3.0.5 fsspec>=2022.7.1`) - `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`) @@ -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` +- 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, 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` 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`). ## Documentation diff --git a/aicsimageio/readers/czi_reader.py b/aicsimageio/readers/czi_reader.py index a89b7fabe..2bd20e404 100644 --- a/aicsimageio/readers/czi_reader.py +++ b/aicsimageio/readers/czi_reader.py @@ -28,7 +28,7 @@ except ImportError: raise ImportError( "aicspylibczi is required for this reader. " - "Install with `pip install aicspylibczi>=3.0.5" + "Install with `pip install 'aicspylibczi>=3.0.5' 'fsspec>=2022.7.1'`" ) ############################################################################### diff --git a/aicsimageio/readers/lif_reader.py b/aicsimageio/readers/lif_reader.py index 6ab33f02b..4fb00d80d 100644 --- a/aicsimageio/readers/lif_reader.py +++ b/aicsimageio/readers/lif_reader.py @@ -28,7 +28,7 @@ except ImportError: raise ImportError( "readlif is required for this reader. " - "Install with `pip install readlif>=0.6.4`" + "Install with `pip install 'readlif>=0.6.4'`" ) ############################################################################### diff --git a/setup.py b/setup.py index e6bc65abb..330b16217 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,10 @@ def run(self): "nd2": ["nd2[legacy]>=0.2.0"], "dv": ["mrc>=0.2.0"], "bfio": ["bfio>=2.3.0", "tifffile<2022.4.22"], - # "czi": ["aicspylibczi>=3.0.5"], # excluded for licensing reasons + "czi": [ + "fsspec>=2022.7.1", + # "aicspylibczi>=3.0.5", # excluded for licensing reasons + ], # "bioformats": ["bioformats_jar"], # excluded for licensing reasons # "lif": ["readlif>=0.6.4"], # excluded for licensing reasons } diff --git a/tox.ini b/tox.ini index fc3077d1c..633d6b99d 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,9 @@ setenv = PYTHONPATH = {toxinidir} extras = test -deps = aicspylibczi>=3.0.5 +deps = + aicspylibczi>=3.0.5 + fsspec>=2022.7.1 commands = pytest --basetemp={envtmpdir} --cov-report xml --cov-report html --cov=aicsimageio aicsimageio/tests/readers/extra_readers/test_czi_reader.py {posargs}