Skip to content

Commit

Permalink
Merge pull request #273 from bioimage-io/tifffile
Browse files Browse the repository at this point in the history
Promote tifffile to full dependency
  • Loading branch information
constantinpape authored May 29, 2022
2 parents 79c4d9f + ff22389 commit 28852f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bioimageio/core/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.5.4"
"version": "0.5.4post1"
}
8 changes: 1 addition & 7 deletions bioimageio/core/build_spec/build_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import imageio
import numpy as np
import requests
import tifffile

import bioimageio.spec as spec
import bioimageio.spec.model as model_spec
Expand All @@ -21,12 +22,6 @@
except ImportError:
from typing_extensions import get_args # type: ignore

# need tifffile for writing the deepimagej config
# we probably always have this, but wrap into an ImportGuard just in case
try:
import tifffile
except ImportError:
tifffile = None

#
# utility functions to build the spec from python
Expand Down Expand Up @@ -419,7 +414,6 @@ def get_size(fname, axes):

def _write_sample_data(input_paths, output_paths, input_axes, output_axes, pixel_sizes, export_folder: Path):
def write_im(path, im, axes, pixel_size=None):
assert tifffile is not None, "need tifffile for writing deepimagej config"
assert len(axes) == im.ndim, f"{len(axes), {im.ndim}}"
assert im.ndim in (4, 5), f"{im.ndim}"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ruamel.yaml",
"tqdm",
"xarray",
"tifffile<=2022.4.8", # fixes Syntax error; see https://github.com/bioimage-io/core-bioimage-io-python/pull/259
"tifffile"
],
include_package_data=True,
extras_require={
Expand Down

0 comments on commit 28852f0

Please sign in to comment.