arraybridge 0.2.8__tar.gz → 0.2.9__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.
- {arraybridge-0.2.8 → arraybridge-0.2.9}/.github/badges/coverage.svg +1 -1
- {arraybridge-0.2.8 → arraybridge-0.2.9}/PKG-INFO +1 -1
- {arraybridge-0.2.8 → arraybridge-0.2.9}/pyproject.toml +3 -3
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/__init__.py +1 -1
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/decorators.py +3 -17
- {arraybridge-0.2.8 → arraybridge-0.2.9}/.github/workflows/ci.yml +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/.github/workflows/coverage-pages.yml +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/.github/workflows/gpu-tests.yml +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/.github/workflows/publish.yml +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/.gitignore +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/.readthedocs.yml +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/ADDING_NEW_FRAMEWORKS.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/CI_ARTIFACT_UPDATE.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/CI_CUPY_FIX.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/CI_IMPROVEMENTS.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/CONFLICT_VISUALIZATION.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/CONTRIBUTING.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/COVERAGE_AUDIT_PLAN.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/DEPLOYMENT_SUMMARY.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/GPU_TESTING_SETUP.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/LICENSE +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/MERGE_CONFLICT_RESOLUTION.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/MIGRATION_SUMMARY.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/QUICK_FIX_GUIDE.txt +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/README.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/RESOLVED_FILES.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/SETUP_INSTRUCTIONS.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/TESTING.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/Makefile +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/ci-cd.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/.gitignore +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/Makefile +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/README.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/advanced_topics.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/api/converters.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/api/decorators.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/api/exceptions.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/api/index.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/api/types.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/api/utils.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/api_reference.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/ci-cd.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/conf.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/contributing.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/converters.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/decorators.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/examples/basic_conversion.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/examples/decorators.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/examples/index.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/examples/multi_framework.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/gpu_features.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/index.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/installation.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/quickstart.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/stack_utils.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/docs/source/user_guide.rst +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/paper.bib +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/paper.md +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/scripts/release.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/scripts/update_and_release.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/scripts/update_version.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/scripts/verify_release_ready.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/converters.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/converters_registry.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/dtype_scaling.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/exceptions.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/framework_config.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/framework_ops.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/gpu_cleanup.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/oom_recovery.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/slice_processing.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/stack_utils.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/types.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/src/arraybridge/utils.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/__init__.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/conftest.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_converters.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_converters_registry.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_decorators.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_dtype_scaling.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_exceptions.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_framework_config.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_gpu_cleanup.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_integration.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_oom_recovery.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_registry_integration.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_slice_processing.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_stack_utils.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_types.py +0 -0
- {arraybridge-0.2.8 → arraybridge-0.2.9}/tests/test_utils.py +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="114" height="20" role="img" aria-label="coverage: 77.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="114" height="20" role="img" aria-label="coverage: 77.70%"><title>coverage: 77.70%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="114" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="61" height="20" fill="#555"/><rect x="61" width="53" height="20" fill="#97ca00"/><rect width="114" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="315" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">coverage</text><text x="315" y="140" transform="scale(.1)" fill="#fff" textLength="510">coverage</text><text aria-hidden="true" x="865" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">77.70%</text><text x="865" y="140" transform="scale(.1)" fill="#fff" textLength="430">77.70%</text></g></svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arraybridge
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: Unified API for NumPy, CuPy, PyTorch, TensorFlow, JAX, and pyclesperanto with automatic memory type conversion
|
|
5
5
|
Project-URL: Homepage, https://github.com/OpenHCSDev/arraybridge
|
|
6
6
|
Project-URL: Documentation, https://arraybridge.readthedocs.io
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "arraybridge"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.9"
|
|
8
8
|
description = "Unified API for NumPy, CuPy, PyTorch, TensorFlow, JAX, and pyclesperanto with automatic memory type conversion"
|
|
9
9
|
authors = [{name = "Tristan Simas", email = "tristan.simas@mail.mcgill.ca"}]
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -113,13 +113,13 @@ target-version = ["py39", "py310", "py311", "py312"]
|
|
|
113
113
|
|
|
114
114
|
[tool.ruff]
|
|
115
115
|
line-length = 100
|
|
116
|
-
target-version = "0.2.
|
|
116
|
+
target-version = "0.2.9"
|
|
117
117
|
|
|
118
118
|
[tool.ruff.lint]
|
|
119
119
|
select = ["E", "F", "I", "N", "W", "UP"]
|
|
120
120
|
|
|
121
121
|
[tool.mypy]
|
|
122
|
-
python_version = "0.2.
|
|
122
|
+
python_version = "0.2.9"
|
|
123
123
|
warn_return_any = true
|
|
124
124
|
warn_unused_configs = true
|
|
125
125
|
disallow_untyped_defs = false # Too strict for scientific code
|
|
@@ -5,7 +5,7 @@ This package provides automatic memory type conversion, declarative decorators,
|
|
|
5
5
|
and unified utilities for working with multiple array/tensor frameworks.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "0.2.
|
|
8
|
+
__version__ = "0.2.9"
|
|
9
9
|
|
|
10
10
|
from .converters import convert_memory, detect_memory_type
|
|
11
11
|
from .decorators import (
|
|
@@ -167,8 +167,9 @@ def _create_dtype_wrapper(func, mem_type: MemoryType, func_name: str):
|
|
|
167
167
|
scale_func = SCALING_FUNCTIONS[mem_type.value]
|
|
168
168
|
|
|
169
169
|
@functools.wraps(func)
|
|
170
|
-
def dtype_wrapper(image, *args,
|
|
171
|
-
#
|
|
170
|
+
def dtype_wrapper(image, *args, slice_by_slice: bool = False, **kwargs):
|
|
171
|
+
# Get dtype_conversion from kwargs (injected by OpenHCS dtype_config)
|
|
172
|
+
dtype_conversion = kwargs.pop('dtype_conversion', None)
|
|
172
173
|
if dtype_conversion is None:
|
|
173
174
|
dtype_conversion = DtypeConversion.PRESERVE_INPUT
|
|
174
175
|
|
|
@@ -222,16 +223,6 @@ def _create_dtype_wrapper(func, mem_type: MemoryType, func_name: str):
|
|
|
222
223
|
# Check if parameters already exist
|
|
223
224
|
param_names = [p.name for p in new_params]
|
|
224
225
|
|
|
225
|
-
# Add dtype_conversion parameter first (before slice_by_slice)
|
|
226
|
-
if "dtype_conversion" not in param_names:
|
|
227
|
-
dtype_param = inspect.Parameter(
|
|
228
|
-
"dtype_conversion",
|
|
229
|
-
inspect.Parameter.KEYWORD_ONLY,
|
|
230
|
-
default=DtypeConversion.PRESERVE_INPUT,
|
|
231
|
-
annotation=Optional[DtypeConversion],
|
|
232
|
-
)
|
|
233
|
-
new_params.append(dtype_param)
|
|
234
|
-
|
|
235
226
|
# Add slice_by_slice parameter
|
|
236
227
|
if "slice_by_slice" not in param_names:
|
|
237
228
|
slice_param = inspect.Parameter(
|
|
@@ -248,11 +239,6 @@ def _create_dtype_wrapper(func, mem_type: MemoryType, func_name: str):
|
|
|
248
239
|
dtype_wrapper.__doc__ += (
|
|
249
240
|
f"\n\n Additional Parameters " f"(added by {mem_type.value} decorator):\n"
|
|
250
241
|
)
|
|
251
|
-
dtype_wrapper.__doc__ += (
|
|
252
|
-
" dtype_conversion (DtypeConversion, optional): "
|
|
253
|
-
"How to handle output dtype.\n"
|
|
254
|
-
)
|
|
255
|
-
dtype_wrapper.__doc__ += " Defaults to PRESERVE_INPUT (match input dtype).\n"
|
|
256
242
|
dtype_wrapper.__doc__ += (
|
|
257
243
|
" slice_by_slice (bool, optional): " "Process 3D arrays slice-by-slice.\n"
|
|
258
244
|
)
|
|
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
|
|
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
|
|
File without changes
|