Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tensorstore optional #44

Merged
merged 10 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9, '3.10']
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
uses: aganders3/headless-gui@v1
with:
run: python -m tox
env:
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ install_requires =
qtpy
scipy
scikit-image
tensorstore
toolz
zarr

Expand All @@ -56,5 +55,8 @@ testing =
pytest-qt
napari[pyqt5]

all =
tensorstore

[options.package_data]
zarpaint = napari.yaml
4 changes: 2 additions & 2 deletions src/zarpaint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
except ImportError:
__version__ = "unknown"

from ._zarpaint import create_labels, open_tensorstore
from ._zarpaint import create_labels, open_zarr
from ._dims_chooser import DimsSorter, set_axis_labels
from ._watershed import watershed_split
from ._add_3d_points import add_points_3d_with_alt_click
Expand All @@ -12,7 +12,7 @@

__all__ = [
'create_labels',
'open_tensorstore',
'open_zarr',
'DimsSorter',
'set_axis_labels',
'watershed_split',
Expand Down
6 changes: 2 additions & 4 deletions src/zarpaint/_tests/test_copy_data.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from napari.layers import Labels
from zarpaint import copy_data
import numpy as np
import tensorstore as ts
from zarpaint import open_tensorstore
from zarpaint import open_zarr
import zarr

def test_copy_data(make_napari_viewer):
Expand All @@ -19,7 +17,7 @@ def test_copy_data(make_napari_viewer):
def test_copy_data_tensorstore(make_napari_viewer, tmp_path):
viewer = make_napari_viewer()
labels_layer1 = viewer.add_labels(np.random.randint(0, 2**23, size=(10, 20, 30)))
array2 = open_tensorstore(tmp_path/"example.zarr", shape=(2, 10, 20, 30), chunks=(1, 1, 20, 30))
array2 = open_zarr(tmp_path / "example.zarr", shape=(2, 10, 20, 30), chunks=(1, 1, 20, 30))
labels_layer2 = viewer.add_labels(array2)
viewer.dims.set_point(axis=0, value=1)
widget = copy_data()
Expand Down
Loading
Loading