polystore 0.2.1__tar.gz → 0.2.2__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.
- {polystore-0.2.1/src/polystore.egg-info → polystore-0.2.2}/PKG-INFO +2 -1
- {polystore-0.2.1 → polystore-0.2.2}/pyproject.toml +2 -1
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/__init__.py +2 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/imagej_runtime.py +18 -0
- {polystore-0.2.1 → polystore-0.2.2/src/polystore.egg-info}/PKG-INFO +2 -1
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore.egg-info/requires.txt +1 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_imagej_runtime.py +9 -1
- {polystore-0.2.1 → polystore-0.2.2}/LICENSE +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/README.md +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/setup.cfg +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/array_payload.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/async_init.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/atomic.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/backend_registry.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/base.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/bioformats_java.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/bioformats_storage.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/config.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/constants.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/disk.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/exceptions.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/fiji_stream.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/filemanager.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/formats.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/lazy_imports.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/memory.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/metadata_migration.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/metadata_writer.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/napari_stream.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/ome_zarr_storage.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/omero_local.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/omero_tables.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/omero_text.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/roi.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/roi_converters.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/__init__.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/_streaming_backend.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/base.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/handlers/__init__.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/handlers/fiji_images.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/handlers/fiji_rois.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/identity.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/__init__.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/batching/__init__.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/core/__init__.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/core/batch_engine.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/core/contracts.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/core/window_projection.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/fiji/__init__.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/fiji/fiji_batch_processor.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/napari/__init__.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/napari/layer_key.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/napari/napari_batch_processor.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/viewer_transport.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming_constants.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/utils.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/virtual_workspace.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/zarr.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/zarr_batch.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore/zmq_config.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore.egg-info/SOURCES.txt +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore.egg-info/dependency_links.txt +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/src/polystore.egg-info/top_level.txt +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_array_payload.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_backend_registry.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_basic.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_bioformats_java.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_bioformats_storage.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_disk_backend.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_disk_coverage.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_disk_more.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_filemanager_backends.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_filemanager_extended.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_lazy_package_exports.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_memory_backend.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_memory_coverage.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_memory_type_authority.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_napari_batch_processor.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_ome_zarr_storage.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_omero_image_plane_batch.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_omero_tables.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_omero_text.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_png_format.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_roi.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_streaming_identity.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_streaming_metadata.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_streaming_receiver_core.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_streaming_shared_memory.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_viewer_transport.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_zarr_backend.py +0 -0
- {polystore-0.2.1 → polystore-0.2.2}/tests/test_zarr_batch.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polystore
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Framework-agnostic multi-backend storage abstraction for ML and scientific computing
|
|
5
5
|
Author-email: Tristan Simas <tristan.simas@mail.mcgill.ca>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -58,6 +58,7 @@ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
|
58
58
|
Requires-Dist: coverage>=7.3.2; extra == "dev"
|
|
59
59
|
Requires-Dist: genbadge[coverage]; extra == "dev"
|
|
60
60
|
Requires-Dist: pandas>=2.3.1; extra == "dev"
|
|
61
|
+
Requires-Dist: jpype1>=1.4.0; extra == "dev"
|
|
61
62
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
62
63
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
63
64
|
Provides-Extra: docs
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "polystore"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Framework-agnostic multi-backend storage abstraction for ML and scientific computing"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -94,6 +94,7 @@ dev = [
|
|
|
94
94
|
"coverage>=7.3.2",
|
|
95
95
|
"genbadge[coverage]",
|
|
96
96
|
"pandas>=2.3.1",
|
|
97
|
+
"jpype1>=1.4.0",
|
|
97
98
|
"black>=23.0.0",
|
|
98
99
|
"ruff>=0.1.0",
|
|
99
100
|
]
|
|
@@ -40,6 +40,7 @@ from .filemanager import FileManager
|
|
|
40
40
|
from .formats import DEFAULT_IMAGE_EXTENSIONS, FileFormat
|
|
41
41
|
from .imagej_runtime import (
|
|
42
42
|
FIJI_IMAGEJ_RUNTIME,
|
|
43
|
+
ImageJJvmTeardown,
|
|
43
44
|
ImageJRuntimePolicy,
|
|
44
45
|
ImageJRuntimeUnavailableError,
|
|
45
46
|
)
|
|
@@ -96,6 +97,7 @@ __all__ = [
|
|
|
96
97
|
"Backend",
|
|
97
98
|
"MemoryType",
|
|
98
99
|
"FileFormat",
|
|
100
|
+
"ImageJJvmTeardown",
|
|
99
101
|
"ImageJRuntimePolicy",
|
|
100
102
|
"ImageJRuntimeUnavailableError",
|
|
101
103
|
"FIJI_IMAGEJ_RUNTIME",
|
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import logging
|
|
6
6
|
import time
|
|
7
7
|
from dataclasses import dataclass
|
|
8
|
+
from enum import Enum
|
|
8
9
|
from typing import Any
|
|
9
10
|
|
|
10
11
|
logger = logging.getLogger(__name__)
|
|
@@ -14,6 +15,20 @@ class ImageJRuntimeUnavailableError(RuntimeError):
|
|
|
14
15
|
"""Raised when an ImageJ distribution cannot use its declared Java runtime."""
|
|
15
16
|
|
|
16
17
|
|
|
18
|
+
class ImageJJvmTeardown(Enum):
|
|
19
|
+
"""JPype teardown behavior owned by an ImageJ process runtime."""
|
|
20
|
+
|
|
21
|
+
PROCESS_EXIT = False
|
|
22
|
+
DESTROY_JVM = True
|
|
23
|
+
|
|
24
|
+
def configure(self) -> None:
|
|
25
|
+
"""Apply this teardown behavior before the process starts its JVM."""
|
|
26
|
+
|
|
27
|
+
import jpype.config
|
|
28
|
+
|
|
29
|
+
jpype.config.destroy_jvm = self.value
|
|
30
|
+
|
|
31
|
+
|
|
17
32
|
@dataclass(frozen=True, slots=True)
|
|
18
33
|
class ImageJRuntimePolicy:
|
|
19
34
|
"""Own the endpoint and managed Java requirement for an ImageJ runtime."""
|
|
@@ -22,6 +37,7 @@ class ImageJRuntimePolicy:
|
|
|
22
37
|
java_fetch: str
|
|
23
38
|
java_vendor: str
|
|
24
39
|
java_version: str
|
|
40
|
+
jvm_teardown: ImageJJvmTeardown
|
|
25
41
|
initialization_retry_delays_seconds: tuple[float, ...] = ()
|
|
26
42
|
|
|
27
43
|
@property
|
|
@@ -66,6 +82,7 @@ class ImageJRuntimePolicy:
|
|
|
66
82
|
def configure_java(self, scyjava_module: Any) -> None:
|
|
67
83
|
"""Select managed Java before startup or validate the active JVM."""
|
|
68
84
|
|
|
85
|
+
self.jvm_teardown.configure()
|
|
69
86
|
if scyjava_module.jvm_started():
|
|
70
87
|
self.require_compatible_active_java(scyjava_module)
|
|
71
88
|
return
|
|
@@ -105,5 +122,6 @@ FIJI_IMAGEJ_RUNTIME = ImageJRuntimePolicy(
|
|
|
105
122
|
java_fetch="always",
|
|
106
123
|
java_vendor="zulu-jre",
|
|
107
124
|
java_version="21",
|
|
125
|
+
jvm_teardown=ImageJJvmTeardown.PROCESS_EXIT,
|
|
108
126
|
initialization_retry_delays_seconds=(1.0, 2.0),
|
|
109
127
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polystore
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Framework-agnostic multi-backend storage abstraction for ML and scientific computing
|
|
5
5
|
Author-email: Tristan Simas <tristan.simas@mail.mcgill.ca>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -58,6 +58,7 @@ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
|
58
58
|
Requires-Dist: coverage>=7.3.2; extra == "dev"
|
|
59
59
|
Requires-Dist: genbadge[coverage]; extra == "dev"
|
|
60
60
|
Requires-Dist: pandas>=2.3.1; extra == "dev"
|
|
61
|
+
Requires-Dist: jpype1>=1.4.0; extra == "dev"
|
|
61
62
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
62
63
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
63
64
|
Provides-Extra: docs
|
|
@@ -6,6 +6,7 @@ import pytest
|
|
|
6
6
|
|
|
7
7
|
from polystore.imagej_runtime import (
|
|
8
8
|
FIJI_IMAGEJ_RUNTIME,
|
|
9
|
+
ImageJJvmTeardown,
|
|
9
10
|
ImageJRuntimePolicy,
|
|
10
11
|
ImageJRuntimeUnavailableError,
|
|
11
12
|
)
|
|
@@ -49,7 +50,10 @@ class _ImageJ:
|
|
|
49
50
|
return self.gateway
|
|
50
51
|
|
|
51
52
|
|
|
52
|
-
def test_fiji_runtime_selects_managed_java_before_initialization() -> None:
|
|
53
|
+
def test_fiji_runtime_selects_managed_java_before_initialization(monkeypatch) -> None:
|
|
54
|
+
import jpype.config
|
|
55
|
+
|
|
56
|
+
monkeypatch.setattr(jpype.config, "destroy_jvm", True)
|
|
53
57
|
scyjava = _ScyJava(started=False, java_version="21.0.8")
|
|
54
58
|
imagej = _ImageJ(scyjava)
|
|
55
59
|
|
|
@@ -58,6 +62,7 @@ def test_fiji_runtime_selects_managed_java_before_initialization() -> None:
|
|
|
58
62
|
assert gateway is imagej.gateway
|
|
59
63
|
assert scyjava.constraints == [{"fetch": "always", "vendor": "zulu-jre", "version": "21"}]
|
|
60
64
|
assert imagej.calls == [("sc.fiji:fiji", "headless")]
|
|
65
|
+
assert jpype.config.destroy_jvm is False
|
|
61
66
|
|
|
62
67
|
|
|
63
68
|
def test_runtime_accepts_compatible_active_java_without_reconfiguration() -> None:
|
|
@@ -90,6 +95,7 @@ def test_runtime_reports_an_unparseable_active_java_version() -> None:
|
|
|
90
95
|
java_fetch="always",
|
|
91
96
|
java_vendor="example-jre",
|
|
92
97
|
java_version="21",
|
|
98
|
+
jvm_teardown=ImageJJvmTeardown.PROCESS_EXIT,
|
|
93
99
|
)
|
|
94
100
|
scyjava = _ScyJava(started=True, java_version="unknown")
|
|
95
101
|
|
|
@@ -132,6 +138,7 @@ def test_runtime_retries_initialization_only_before_jvm_start(monkeypatch) -> No
|
|
|
132
138
|
java_fetch="always",
|
|
133
139
|
java_vendor="example-jre",
|
|
134
140
|
java_version="21",
|
|
141
|
+
jvm_teardown=ImageJJvmTeardown.PROCESS_EXIT,
|
|
135
142
|
initialization_retry_delays_seconds=(0.1, 0.2),
|
|
136
143
|
)
|
|
137
144
|
scyjava = _ScyJava(started=False, java_version="21")
|
|
@@ -162,6 +169,7 @@ def test_runtime_preserves_final_failure_after_retry_schedule() -> None:
|
|
|
162
169
|
java_fetch="always",
|
|
163
170
|
java_vendor="example-jre",
|
|
164
171
|
java_version="21",
|
|
172
|
+
jvm_teardown=ImageJJvmTeardown.PROCESS_EXIT,
|
|
165
173
|
initialization_retry_delays_seconds=(0.0, 0.0),
|
|
166
174
|
)
|
|
167
175
|
scyjava = _ScyJava(started=False, java_version="21")
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
{polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/core/window_projection.py
RENAMED
|
File without changes
|
|
File without changes
|
{polystore-0.2.1 → polystore-0.2.2}/src/polystore/streaming/receivers/fiji/fiji_batch_processor.py
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
|
|
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
|
|
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
|