Skip to content

Commit

Permalink
ENH: Make tensorflow,torch,zarr packages optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Leengit committed Sep 16, 2024
1 parent 513aba4 commit 9bdcb46
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Install histomics_stream
run: |
pip install .
pip install .[tensorflow,torch,zarr]
- name: Lint with flake8
run: |
Expand Down
1 change: 0 additions & 1 deletion histomics_stream/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ def __call__(self, slide):

# Do the work.
if not re.compile(r"\.zarr$").search(filename):

# create large_image, prioritizing tiff source over openslide
try:
import large_image_source_tiff
Expand Down
13 changes: 11 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,28 @@ readme = "README.md"
requires-python = ">=3.6"
authors = [{name = "Lee A. Newberg", email = "[email protected]"}]
maintainers = [{name = "Lee A. Newberg", email = "[email protected]"}]
keywords = ["tensorflow", "whole slide image", "stream", "machine learning"]
keywords = ["tensorflow", "torch", "whole slide image", "stream", "machine learning"]
classifiers = ["License :: OSI Approved :: Apache Software License"]
dependencies = [
"imagecodecs",
"itk",
"numcodecs",
"numpy",
"scipy",
]
dynamic = ["version", "description"]

[project.optional-dependencies]
tensorflow = [
"tensorflow<3.0.0",
"keras",
]
torch = [
"torch<2.0.0",
]
zarr = [
"zarr",
]
dynamic = ["version", "description"]

[project.urls]
Source = "https://github.com/DigitalSlideArchive/HistomicsStream"
Expand Down

0 comments on commit 9bdcb46

Please sign in to comment.