bioio-conversion 2.2.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/PKG-INFO +1 -1
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/converters/ome_zarr_converter.py +17 -7
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/PKG-INFO +1 -1
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/scm_file_list.json +25 -25
- bioio_conversion-2.2.1/bioio_conversion.egg-info/scm_version.json +8 -0
- bioio_conversion-2.2.0/bioio_conversion.egg-info/scm_version.json +0 -8
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.github/CODEOWNERS +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.github/dependabot.yml +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.github/workflows/ci.yml +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.github/workflows/docs.yml +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.gitignore +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/.pre-commit-config.yaml +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/CODE_OF_CONDUCT.md +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/Justfile +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/LICENSE +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/MANIFEST.in +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/README.md +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/__init__.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/bin/cli_batch_convert.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/bin/cli_convert.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/bin/ome_zarr_options.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/converters/__init__.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/converters/batch_converter.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/sharding.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/SOURCES.txt +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/dependency_links.txt +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/entry_points.txt +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/not-zip-safe +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/requires.txt +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/top_level.txt +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/docs/api_reference.rst +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/docs/conf.py +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/docs/index.rst +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/docs/overview.rst +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/pyproject.toml +0 -0
- {bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/setup.cfg +0 -0
{bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/converters/ome_zarr_converter.py
RENAMED
|
@@ -5,6 +5,7 @@ from concurrent.futures import ProcessPoolExecutor
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
7
7
|
|
|
8
|
+
import fsspec
|
|
8
9
|
import numcodecs
|
|
9
10
|
import numpy as np
|
|
10
11
|
import psutil
|
|
@@ -133,8 +134,9 @@ class OmeZarrConverter:
|
|
|
133
134
|
source : str
|
|
134
135
|
Path to the input image (any format supported by BioImage).
|
|
135
136
|
destination : Optional[str]
|
|
136
|
-
|
|
137
|
-
If ``None``, the converter will use the current working
|
|
137
|
+
Local directory or remote URI under which to write the ``.ome.zarr``
|
|
138
|
+
output(s). If ``None``, the converter will use the current working
|
|
139
|
+
directory
|
|
138
140
|
scenes : Optional[Union[int, List[int]]]
|
|
139
141
|
Which scene(s) to export:
|
|
140
142
|
- ``None`` → export all scenes
|
|
@@ -546,13 +548,21 @@ class OmeZarrConverter:
|
|
|
546
548
|
else f"{self.output_basename}_{scene_name}"
|
|
547
549
|
)
|
|
548
550
|
base = re.sub(r"[<>:\"/\\|?*]", "_", base)
|
|
549
|
-
|
|
550
|
-
if
|
|
551
|
+
|
|
552
|
+
if fsspec.utils.get_protocol(self.destination) == "file":
|
|
553
|
+
# Destination is a local path
|
|
554
|
+
out_path = str(Path(self.destination) / f"{base}.ome.zarr")
|
|
555
|
+
else:
|
|
556
|
+
# Destination is a URI (e.g., S3, GCS, etc.)
|
|
557
|
+
out_path = self.destination.rstrip("/") + f"/{base}.ome.zarr"
|
|
558
|
+
|
|
559
|
+
fs, _ = fsspec.core.url_to_fs(self.destination)
|
|
560
|
+
if fs.exists(out_path):
|
|
551
561
|
raise FileExistsError(f"{out_path} already exists.")
|
|
552
562
|
|
|
553
563
|
# (6) Build writer kwargs
|
|
554
564
|
writer_kwargs: Dict[str, Any] = {
|
|
555
|
-
"store":
|
|
565
|
+
"store": out_path,
|
|
556
566
|
"level_shapes": writer_level_shapes_param,
|
|
557
567
|
"dtype": self.output_dtype,
|
|
558
568
|
**{
|
|
@@ -598,7 +608,7 @@ class OmeZarrConverter:
|
|
|
598
608
|
|
|
599
609
|
def _write_auto_layout_shards(
|
|
600
610
|
self,
|
|
601
|
-
out_path:
|
|
611
|
+
out_path: str,
|
|
602
612
|
native_order: str,
|
|
603
613
|
scene_index: int,
|
|
604
614
|
auto_shards: MultiResolutionShapeSpec,
|
|
@@ -632,7 +642,7 @@ class OmeZarrConverter:
|
|
|
632
642
|
pool.submit(
|
|
633
643
|
_write_shard_process,
|
|
634
644
|
self.source,
|
|
635
|
-
|
|
645
|
+
out_path,
|
|
636
646
|
native_order,
|
|
637
647
|
scene_index,
|
|
638
648
|
out_dtype_str,
|
{bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/scm_file_list.json
RENAMED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": [
|
|
3
|
-
".
|
|
3
|
+
"CODE_OF_CONDUCT.md",
|
|
4
|
+
".gitignore",
|
|
4
5
|
"README.md",
|
|
5
|
-
"LICENSE",
|
|
6
|
-
"pyproject.toml",
|
|
7
6
|
"Justfile",
|
|
7
|
+
"pyproject.toml",
|
|
8
8
|
"MANIFEST.in",
|
|
9
|
-
".
|
|
10
|
-
"
|
|
11
|
-
"scripts/benchmark/run_benchmark.sh",
|
|
12
|
-
"scripts/benchmark/data_source.json",
|
|
13
|
-
"scripts/benchmark/benchmark.py",
|
|
14
|
-
"scripts/benchmark/benchmark_results.csv",
|
|
15
|
-
"docs/overview.rst",
|
|
16
|
-
"docs/index.rst",
|
|
17
|
-
"docs/api_reference.rst",
|
|
18
|
-
"docs/conf.py",
|
|
9
|
+
".pre-commit-config.yaml",
|
|
10
|
+
"LICENSE",
|
|
19
11
|
"bioio_conversion/sharding.py",
|
|
20
12
|
"bioio_conversion/__init__.py",
|
|
21
13
|
"bioio_conversion/bin/ome_zarr_options.py",
|
|
22
14
|
"bioio_conversion/bin/cli_convert.py",
|
|
23
15
|
"bioio_conversion/bin/cli_batch_convert.py",
|
|
24
|
-
"bioio_conversion/
|
|
25
|
-
"bioio_conversion/
|
|
26
|
-
"bioio_conversion/
|
|
16
|
+
"bioio_conversion/converters/ome_zarr_converter.py",
|
|
17
|
+
"bioio_conversion/converters/batch_converter.py",
|
|
18
|
+
"bioio_conversion/converters/__init__.py",
|
|
27
19
|
"bioio_conversion/tests/conftest.py",
|
|
28
20
|
"bioio_conversion/tests/test_sharding.py",
|
|
29
|
-
"bioio_conversion/tests/
|
|
30
|
-
"bioio_conversion/tests/
|
|
21
|
+
"bioio_conversion/tests/test_conversion_cli.py",
|
|
22
|
+
"bioio_conversion/tests/test_cli_batch_conversion.py",
|
|
23
|
+
"bioio_conversion/tests/__init__.py",
|
|
31
24
|
"bioio_conversion/tests/resources/s_3_t_1_c_3_z_5.czi",
|
|
25
|
+
"bioio_conversion/tests/resources/s_1_t_1_c_1_z_1.czi",
|
|
32
26
|
"bioio_conversion/tests/resources/s_1_t_1_c_1_z_1.ome.tiff",
|
|
27
|
+
"bioio_conversion/tests/resources/s_3_t_1_c_3_z_5.ome.tiff",
|
|
33
28
|
"bioio_conversion/tests/converters/test_batch_converter.py",
|
|
34
|
-
"bioio_conversion/tests/converters/__init__.py",
|
|
35
29
|
"bioio_conversion/tests/converters/test_ome_zarr_converter.py",
|
|
36
|
-
"bioio_conversion/converters/__init__.py",
|
|
37
|
-
"bioio_conversion/converters/batch_converter.py",
|
|
38
|
-
"bioio_conversion/converters/ome_zarr_converter.py",
|
|
30
|
+
"bioio_conversion/tests/converters/__init__.py",
|
|
39
31
|
".github/PULL_REQUEST_TEMPLATE.md",
|
|
40
|
-
".github/CODEOWNERS",
|
|
41
32
|
".github/dependabot.yml",
|
|
33
|
+
".github/CODEOWNERS",
|
|
34
|
+
".github/workflows/ci.yml",
|
|
35
|
+
".github/workflows/docs.yml",
|
|
42
36
|
".github/ISSUE_TEMPLATE/bug_report.md",
|
|
43
37
|
".github/ISSUE_TEMPLATE/feature_request.md",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
38
|
+
"scripts/benchmark/data_source.json",
|
|
39
|
+
"scripts/benchmark/benchmark_results.csv",
|
|
40
|
+
"scripts/benchmark/benchmark.py",
|
|
41
|
+
"scripts/benchmark/run_benchmark.sh",
|
|
42
|
+
"docs/conf.py",
|
|
43
|
+
"docs/api_reference.rst",
|
|
44
|
+
"docs/index.rst",
|
|
45
|
+
"docs/overview.rst"
|
|
46
46
|
]
|
|
47
47
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion/converters/batch_converter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{bioio_conversion-2.2.0 → bioio_conversion-2.2.1}/bioio_conversion.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|