Skip to content

Commit

Permalink
Merge pull request #73 from thewtex/ome-zarr-extension
Browse files Browse the repository at this point in the history
BUG: Detect .ome.zarr as supported by NGFF_ZARR
  • Loading branch information
thewtex committed Mar 7, 2024
2 parents 4078cce + 1c92af3 commit 444421e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ngff_zarr/detect_cli_io_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def detect_cli_io_backend(input: List[str]) -> ConversionBackend:

extension = "".join(Path(input[0]).suffixes).lower()

ngff_zarr_supported_extensions = (".zarr",)
ngff_zarr_supported_extensions = (".zarr", ".ome.zarr")
if extension in ngff_zarr_supported_extensions:
return ConversionBackend.NGFF_ZARR

Expand Down
10 changes: 10 additions & 0 deletions test/test_detect_cli_input_backend.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
from ngff_zarr import ConversionBackend, detect_cli_io_backend


def test_detect_ngff_zarr_input_backend():
extension = ".ome.zarr"
backend = detect_cli_io_backend(
[
f"file{extension}",
]
)
assert backend == ConversionBackend.NGFF_ZARR


def test_detect_itk_input_backend():
extension = ".nrrd"
backend = detect_cli_io_backend(
Expand Down

0 comments on commit 444421e

Please sign in to comment.