Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.11"
python-version: "3.13"
enable-cache: true
- run: uv sync --group doc
- run: uv run zensical build --clean
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
Expand All @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.11"
python-version: "3.12"
enable-cache: true
- run: uv sync --group doc
- run: uv run zensical build --clean
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
max-parallel: 2
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| :----------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| **Status** | [![Docs][badge-docs]][link-docs] [![Tests][badge-tests]][link-tests] |
| **Package** | [![PyPI][badge-pypi]][link-pypi] [![Python][badge-python]][link-pypi] |
| **Meta** | [![Hatch][badge-hatch]][link-hatch] [![uv][badge-uv]][link-uv] [![Ruff][badge-ruff]][link-ruff] [![prek][badge-prek]][link-prek] [![License][badge-license]][link-license] |
| **Meta** | [![SPEC 0][badge-spec0]][link-spec0] [![Hatch][badge-hatch]][link-hatch] [![uv][badge-uv]][link-uv] [![Ruff][badge-ruff]][link-ruff] [![prek][badge-prek]][link-prek] [![License][badge-license]][link-license] |
| **Cite** | [![DOI][badge-doi]][link-doi] |

[badge-docs]: https://github.com/czbiohub-sf/iohub/actions/workflows/docs.yml/badge.svg
Expand All @@ -13,6 +13,8 @@
[badge-python]: https://img.shields.io/pypi/pyversions/iohub
[badge-hatch]: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg
[badge-uv]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json
[badge-spec0]: https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038
[link-spec0]: https://scientific-python.org/specs/spec-0000/
[badge-ruff]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
[badge-prek]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json
[badge-license]: https://img.shields.io/badge/License-BSD--3--Clause-blue.svg
Expand Down Expand Up @@ -44,8 +46,7 @@ used at the Biohub and in the broader imaging community.

### Write

- OME-Zarr ([OME-NGFF v0.5](https://ngff.openmicroscopy.org/0.5/), OME-NGFF v0.4)
- Multi-page TIFF stacks organized in a directory hierarchy that mimics OME-NGFF (WIP)
- OME-Zarr ([OME-NGFF v0.5](https://ngff.openmicroscopy.org/0.5/))

## Quick start

Expand Down
5 changes: 1 addition & 4 deletions docs/examples/run_multi_fov_hcs_ome_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@
)

with open_ome_zarr(
store_path,
layout="hcs",
mode="w-",
channel_names=["DAPI", "GFP", "Brightfield"],
store_path, layout="hcs", mode="w-", channel_names=["DAPI", "GFP", "Brightfield"], implementation="tensorstore"
) as dataset:
# Create and write to positions
# This affects the tile arrangement in visualization
Expand Down
89 changes: 69 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,45 @@
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "uv-dynamic-versioning>=0.7.0"]
requires = ["hatchling", "uv-dynamic-versioning>=0.14.0"]

[project]
name = "iohub"
description = "N-dimensional bioimaging data I/O with OME metadata in Python"
authors = [
{name = "CZ Biohub and iohub contributors", email = "iohub@czbiohub.org"},
{name = "Biohub and iohub contributors", email = "iohub@czbiohub.org"},
]
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.11"
requires-python = ">=3.12"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Image Processing",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
]
dependencies = [
"pandas>=1.5.2",
"pandas>=2",
"pydantic>=2.8.2",
"pydantic_extra_types>=2.9.0",
"tifffile>=2025.5.21",
"natsort>=7.1.1",
"natsort>=8.4.0",
"ndtiff>=2.2.1",
"zarr>=3.0.8",
"zarr>=3.1.6",
"rich",
"tqdm",
"pillow>=9.4.0",
"blosc2",
"xarray>=2024.1.1",
"dask[array]",
"zarrs>=0.2.3",
]
dynamic = ["version"]

Expand All @@ -52,13 +53,18 @@ Source = "https://github.com/czbiohub-sf/iohub"
tensorstore = [
"tensorstore>=0.1.64",
]

[project.entry-points."iohub.zarr-implementations"]
zarr = "iohub.core.implementations.zarr_python:ZarrPythonImplementation"
tensorstore = "iohub.core.implementations.tensorstore:TensorStoreImplementation"

[dependency-groups]
test = [
"iohub[tensorstore]",
"ngff-zarr[validate]",
"pytest>=5.0.0",
"pytest>=9.0.2",
"pytest-cov",
"hypothesis>=6.61.0",
"hypothesis>=6.151.0",
"requests>=2.22.0",
"wget>=3.2",
"ome-zarr>=0.12.0",
Expand All @@ -67,7 +73,7 @@ acquire-zarr = [
"acquire-zarr",
]
doc = [
"zensical>=0.0.11",
"zensical>=0.0.29",
"mkdocstrings-python>=2.0.2",
"mkdocs-click>=0.8",
]
Expand All @@ -93,15 +99,58 @@ style = "pep440"
bump = true
fallback-version = "0.0.0"

[tool.pytest]
minversion="9.0"
strict = true
testpaths = [ "tests" ]
addopts = [
"-ra",
"--import-mode=importlib",
]

[tool.ruff]
line-length = 120

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = "dynamic"

[tool.ruff.lint]
select = ["E", "F", "W", "I"]
ignore = ["E203", "E731"]
src = [ "src" ]
extend-include = [ "*.ipynb" ]
format.quote-style = "double"
format.indent-style = "space"
format.docstring-code-format = true
format.docstring-code-line-length = "dynamic"
lint.select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"NPY", # NumPy-specific rules
"PERF", # Perflint
"PT", # pytest
"PTH", # pathlib
"RUF", # Ruff-specific rules
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle warnings
]
lint.ignore = [
"B008", # function calls in argument defaults are fine when result is immutable
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # __magic__ methods are often self-explanatory
"D107", # Missing docstring in __init__
"D203", # no blank line before class docstring (conflicts with D211)
"D213", # docstrings start immediately after opening triple quote (conflicts with D212)
"D400", # first line should end with period (doesn't work with single-line docstrings)
"D401", # first line in imperative mood
"E203", # slice whitespace (handled by formatter)
"E501", # line too long (formatter handles code; long comments are acceptable)
"E731", # lambda assignments are convenient
]
lint.per-file-ignores."*/__init__.py" = [ "F401" ]
lint.per-file-ignores."docs/*" = [ "D", "I", "NPY002", "PTH", "PERF401", "BLE001" ]
lint.per-file-ignores."tests/*" = [ "D" ]
lint.pydocstyle.convention = "numpy"
1 change: 1 addition & 0 deletions src/iohub/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
iohub

=====

N-dimensional bioimaging data I/O with OME metadata in Python
Expand Down
Loading
Loading