diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 154a4421..703e86d7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: + with: fetch-depth: 0 - name: Setup Pages id: pages diff --git a/docs/examples/run_coordinate_transform.py b/docs/examples/run_coordinate_transform.py index dcb4786d..54cbeb35 100644 --- a/docs/examples/run_coordinate_transform.py +++ b/docs/examples/run_coordinate_transform.py @@ -72,4 +72,4 @@ # %% # Clean up -tmp_dir.cleanup() \ No newline at end of file +tmp_dir.cleanup() diff --git a/docs/examples/run_single_fov_ome_zarr.py b/docs/examples/run_single_fov_ome_zarr.py index 0d831cf4..384470c1 100644 --- a/docs/examples/run_single_fov_ome_zarr.py +++ b/docs/examples/run_single_fov_ome_zarr.py @@ -98,4 +98,4 @@ # %% # Clean up -tmp_dir.cleanup() \ No newline at end of file +tmp_dir.cleanup() diff --git a/docs/gh-pages-redirect.html b/docs/gh-pages-redirect.html index 065b66e6..b9f23407 100644 --- a/docs/gh-pages-redirect.html +++ b/docs/gh-pages-redirect.html @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/docs/source/_static/switcher.json b/docs/source/_static/switcher.json index 81e37131..2ae2c5c8 100644 --- a/docs/source/_static/switcher.json +++ b/docs/source/_static/switcher.json @@ -3,4 +3,4 @@ "version": "latest", "url": "/main/index.html" } -] \ No newline at end of file +] diff --git a/docs/source/api.rst b/docs/source/api.rst index 73f4579b..8c100757 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -17,4 +17,4 @@ Index ----- * :ref:`genindex` -* :ref:`search` \ No newline at end of file +* :ref:`search` diff --git a/setup.cfg b/setup.cfg index 9f31d092..498f6548 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,10 +34,10 @@ setup_requires = setuptools_scm install_requires = pandas>=1.5.2 pydantic>=1.10.2, <2 - tifffile>=2023.2.3, <2023.3.15 + tifffile>=2023.3.15, <2024.1.30 natsort>=7.1.1 ndtiff>=2.2.1 - zarr>=2.13, <2.16 + zarr>=2.15.0 tqdm pillow>=9.4.0 blosc2 diff --git a/tests/clearcontrol/test_clearcontrol.py b/tests/clearcontrol/test_clearcontrol.py index d2196d80..7a7384d5 100644 --- a/tests/clearcontrol/test_clearcontrol.py +++ b/tests/clearcontrol/test_clearcontrol.py @@ -20,25 +20,27 @@ def mock_clear_control_dataset_path(tmp_path: Path) -> Path: def test_blosc_buffer(tmp_path: Path) -> None: - buffer_path = tmp_path / "buffer.blc" in_array = np.random.randint(0, 5_000, size=(32, 32)) _array_to_blosc_buffer(in_array, buffer_path) - out_array = blosc_buffer_to_array(buffer_path, in_array.shape, in_array.dtype) + out_array = blosc_buffer_to_array( + buffer_path, in_array.shape, in_array.dtype + ) assert np.allclose(in_array, out_array) @pytest.mark.parametrize( "key", - [1, - (slice(None), 1), - (0, [1, 2]), - (-1, np.asarray([0, 3])), - (slice(1), -2), - (np.asarray(0),), - (0, 0, slice(32)), + [ + 1, + (slice(None), 1), + (0, [1, 2]), + (-1, np.asarray([0, 3])), + (slice(1), -2), + (np.asarray(0),), + (0, 0, slice(32)), ], ) def test_CCFOV_indexing( @@ -58,7 +60,13 @@ def test_CCFOV_metadata( mock_clear_control_dataset_path: Path, ) -> None: cc = ClearControlFOV(mock_clear_control_dataset_path) - expected_metadata = {"voxel_size_z": 1.0, "voxel_size_y": 0.25, "voxel_size_x": 0.25, "acquisition_type": "NA", "time_delta": 45.0} + expected_metadata = { + "voxel_size_z": 1.0, + "voxel_size_y": 0.25, + "voxel_size_x": 0.25, + "acquisition_type": "NA", + "time_delta": 45.0, + } metadata = cc.metadata() assert metadata == expected_metadata @@ -79,7 +87,7 @@ def test_CCFOV_cache( assert np.array_equal(cc._cache_array, array) new_array = cc[1] - assert id(new_array) == id(array) # same reference, so cache worked + assert id(new_array) == id(array) # same reference, so cache worked cc.cache = False assert cc._cache_key is None diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index 1d1fa150..8f83a9b2 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -95,7 +95,12 @@ def test_cli_info_ome_zarr(setup_test_data, setup_hcs_ref, verbose): suppress_health_check=[HealthCheck.function_scoped_fixture], deadline=20000 ) def test_cli_convert_ome_tiff( - setup_test_data, setup_mm2gamma_ome_tiffs, f, g, s, chk, + setup_test_data, + setup_mm2gamma_ome_tiffs, + f, + g, + s, + chk, ): _, _, input_dir = setup_mm2gamma_ome_tiffs runner = CliRunner() diff --git a/tests/conftest.py b/tests/conftest.py index 043d154b..ad4ce1c7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -96,7 +96,7 @@ def setup_mm2gamma_ome_tiff_hcs(): f for f in os.listdir(test_data) if os.path.isdir(pjoin(test_data, f)) ] # select datasets with multiple positioons; here they all have 4 positions - hcs_subfolders = [f for f in subfolders if '4p' in f] + hcs_subfolders = [f for f in subfolders if "4p" in f] # specific folder one_folder = pjoin(test_data, hcs_subfolders[0]) diff --git a/tests/fov/test_fov.py b/tests/fov/test_fov.py index 57e19140..9e15d358 100644 --- a/tests/fov/test_fov.py +++ b/tests/fov/test_fov.py @@ -67,7 +67,6 @@ def test_missing_axes(axes: list[str], missing: list[int]) -> None: def test_fov_dict() -> None: - good_collection = FOVDict( { "488": FOV(["y", "x"]), diff --git a/tests/pyramid/test_pyramid.py b/tests/pyramid/test_pyramid.py index 50b76c76..8b46a93d 100644 --- a/tests/pyramid/test_pyramid.py +++ b/tests/pyramid/test_pyramid.py @@ -14,7 +14,6 @@ def _mock_fov( shape: tuple[int, ...], scale: tuple[float, float, float], ) -> Position: - ds_path = tmp_path / "ds.zarr" channels = [str(i) for i in range(shape[1])] @@ -47,7 +46,6 @@ def _mock_fov( @pytest.mark.parametrize("ndim", [2, 5]) def test_pyramid(tmp_path: Path, ndim: int) -> None: - # not all shapes not divisible by 2 shape = (2, 2, 67, 115, 128)[-ndim:] scale = (2, 0.5, 0.5)[-min(3, ndim) :] diff --git a/tests/reader/test_multipagetiff.py b/tests/reader/test_multipagetiff.py index 1396d75e..2957fd53 100644 --- a/tests/reader/test_multipagetiff.py +++ b/tests/reader/test_multipagetiff.py @@ -62,7 +62,6 @@ def test_output_dims_mm2gamma_incomplete( def test_get_zarr_mm2gamma(setup_test_data, setup_mm2gamma_ome_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm2gamma_ome_tiffs mmr = MicromanagerOmeTiffReader(rand_folder, extract_data=True) @@ -73,7 +72,6 @@ def test_get_zarr_mm2gamma(setup_test_data, setup_mm2gamma_ome_tiffs): def test_get_array_mm2gamma(setup_test_data, setup_mm2gamma_ome_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm2gamma_ome_tiffs mmr = MicromanagerOmeTiffReader(rand_folder, extract_data=True) @@ -84,7 +82,6 @@ def test_get_array_mm2gamma(setup_test_data, setup_mm2gamma_ome_tiffs): def test_get_num_positions_mm2gamma(setup_test_data, setup_mm2gamma_ome_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm2gamma_ome_tiffs mmr = MicromanagerOmeTiffReader(rand_folder, extract_data=True) @@ -132,7 +129,6 @@ def test_output_dims_mm1422(setup_test_data, setup_mm1422_ome_tiffs): def test_get_zarr_mm1422(setup_test_data, setup_mm1422_ome_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm1422_ome_tiffs mmr = MicromanagerOmeTiffReader(rand_folder, extract_data=True) @@ -143,7 +139,6 @@ def test_get_zarr_mm1422(setup_test_data, setup_mm1422_ome_tiffs): def test_get_array_mm1422(setup_test_data, setup_mm1422_ome_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm1422_ome_tiffs mmr = MicromanagerOmeTiffReader(rand_folder, extract_data=True) @@ -154,7 +149,6 @@ def test_get_array_mm1422(setup_test_data, setup_mm1422_ome_tiffs): def test_get_num_positions_mm1422(setup_test_data, setup_mm1422_ome_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm1422_ome_tiffs mmr = MicromanagerOmeTiffReader(rand_folder, extract_data=True) diff --git a/tests/reader/test_singlepagetiff.py b/tests/reader/test_singlepagetiff.py index 588003f1..383e6b70 100644 --- a/tests/reader/test_singlepagetiff.py +++ b/tests/reader/test_singlepagetiff.py @@ -65,7 +65,6 @@ def test_output_dims_mm2gamma_incomplete( def test_get_zarr_mm2gamma(setup_test_data, setup_mm2gamma_singlepage_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm2gamma_singlepage_tiffs mmr = MicromanagerSequenceReader(rand_folder, extract_data=True) @@ -76,7 +75,6 @@ def test_get_zarr_mm2gamma(setup_test_data, setup_mm2gamma_singlepage_tiffs): def test_get_array_mm2gamma(setup_test_data, setup_mm2gamma_singlepage_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm2gamma_singlepage_tiffs mmr = MicromanagerSequenceReader(rand_folder, extract_data=True) @@ -89,7 +87,6 @@ def test_get_array_mm2gamma(setup_test_data, setup_mm2gamma_singlepage_tiffs): def test_get_num_positions_mm2gamma( setup_test_data, setup_mm2gamma_singlepage_tiffs ): - _ = setup_test_data _, _, rand_folder = setup_mm2gamma_singlepage_tiffs mmr = MicromanagerSequenceReader(rand_folder, extract_data=True) @@ -136,7 +133,6 @@ def test_output_dims_mm1422(setup_test_data, setup_mm1422_singlepage_tiffs): def test_get_zarr_mm1422(setup_test_data, setup_mm1422_singlepage_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm1422_singlepage_tiffs mmr = MicromanagerSequenceReader(rand_folder, extract_data=True) @@ -147,7 +143,6 @@ def test_get_zarr_mm1422(setup_test_data, setup_mm1422_singlepage_tiffs): def test_get_array_mm1422(setup_test_data, setup_mm1422_singlepage_tiffs): - _ = setup_test_data _, _, rand_folder = setup_mm1422_singlepage_tiffs mmr = MicromanagerSequenceReader(rand_folder, extract_data=True) @@ -160,7 +155,6 @@ def test_get_array_mm1422(setup_test_data, setup_mm1422_singlepage_tiffs): def test_get_num_positions_mm1422( setup_test_data, setup_mm1422_singlepage_tiffs ): - _ = setup_test_data _, _, rand_folder = setup_mm1422_singlepage_tiffs mmr = MicromanagerSequenceReader(rand_folder, extract_data=True) diff --git a/tests/reader/test_zarrfile.py b/tests/reader/test_zarrfile.py index a8c9cb6e..a586e795 100644 --- a/tests/reader/test_zarrfile.py +++ b/tests/reader/test_zarrfile.py @@ -59,7 +59,6 @@ def test_output_dims_mm2gamma(setup_test_data, setup_mm2gamma_zarr): def test_get_zarr_mm2gamma(setup_test_data, setup_mm2gamma_zarr): - _ = setup_test_data src = setup_mm2gamma_zarr mmr = ZarrReader(src) @@ -70,7 +69,6 @@ def test_get_zarr_mm2gamma(setup_test_data, setup_mm2gamma_zarr): def test_get_array_mm2gamma(setup_test_data, setup_mm2gamma_zarr): - _ = setup_test_data src = setup_mm2gamma_zarr mmr = ZarrReader(src) @@ -82,7 +80,6 @@ def test_get_array_mm2gamma(setup_test_data, setup_mm2gamma_zarr): def test_get_image_mm2gamma(setup_test_data, setup_mm2gamma_zarr): - _ = setup_test_data src = setup_mm2gamma_zarr mmr = ZarrReader(src) @@ -94,7 +91,6 @@ def test_get_image_mm2gamma(setup_test_data, setup_mm2gamma_zarr): def test_get_num_positions_mm2gamma(setup_test_data, setup_mm2gamma_zarr): - _ = setup_test_data src = setup_mm2gamma_zarr mmr = ZarrReader(src)