From 4aa6870c8ae550fe3dec7a5b37ac74537c904d8a Mon Sep 17 00:00:00 2001 From: d33bs Date: Tue, 6 Jan 2026 13:43:34 -0700 Subject: [PATCH 1/8] automatically scale ome-tiff and ome-zarr --- .pre-commit-config.yaml | 4 +- .../learning_to_fly_with_ome-arrow.ipynb | 81 ++++++++-- .../learning_to_fly_with_ome-arrow.py | 7 +- src/ome_arrow/core.py | 5 +- src/ome_arrow/ingest.py | 153 ++++++++++++++++-- tests/test_scaling.py | 89 ++++++++++ 6 files changed, 305 insertions(+), 34 deletions(-) create mode 100644 tests/test_scaling.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a39f5b..6c9cfca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,12 +39,12 @@ repos: - id: yamllint exclude: pre-commit-config.yaml - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.14.8" + rev: "v0.14.10" hooks: - id: ruff-format - id: ruff-check - repo: https://github.com/rhysd/actionlint - rev: v1.7.9 + rev: v1.7.10 hooks: - id: actionlint - repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update diff --git a/docs/src/examples/learning_to_fly_with_ome-arrow.ipynb b/docs/src/examples/learning_to_fly_with_ome-arrow.ipynb index 2dce2d3..4840766 100644 --- a/docs/src/examples/learning_to_fly_with_ome-arrow.ipynb +++ b/docs/src/examples/learning_to_fly_with_ome-arrow.ipynb @@ -34,7 +34,7 @@ "2D image, single-channel - shape (T=1, C=1, Z=1, Y=512, X=512)" ], "text/plain": [ - "" + "" ] }, "execution_count": 2, @@ -129,7 +129,7 @@ "3D image (z-stack), multi-channel (2 channels) - shape (T=1, C=2, Z=22, Y=128, X=128)" ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -167,12 +167,12 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "e438f2316a4b4348b00283242d346c63", + "model_id": "ee038f8ceae842e5b6190bcf038c1318", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "Widget(value='