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/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Experiment INI: CLI overrides > INI settings; exported XML replaces INI dimensio
### ZEN API
- **zen_api** - ZEISS ZEN API client (gRPC stubs)
- Install an authorized compatible wheel separately; no public URL is assumed
- CI installs zen-api 2026.7.1 and zen-api-utils 0.1.0 from OAD release URLs
- CI installs zen-api 2026.11.1 and zen-api-utils 0.2.0 from OAD release URLs

### Development
- **pytest** - Testing
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_and_deploy_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[testing]" build ruff \
"https://github.com/zeiss-microscopy/OAD/releases/download/v2026.07.1/zen_api-2026.7.1-py3-none-any.whl" \
"https://github.com/zeiss-microscopy/OAD/releases/download/zen-api-utils-v0.1.0/zen_api_utils-0.1.0-py3-none-any.whl"
"https://github.com/zeiss-microscopy/OAD/releases/download/v2026.11.1-r1/zen_api-2026.11.1-py3-none-any.whl" \
"https://github.com/zeiss-microscopy/OAD/releases/download/zen-api-utils-v0.2.0-r1/zen_api_utils-0.2.0-py3-none-any.whl"

- name: Check code quality
run: python -m ruff check src/napari_zen_streaming
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_and_deploy_testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[testing]" build ruff \
"https://github.com/zeiss-microscopy/OAD/releases/download/v2026.07.1/zen_api-2026.7.1-py3-none-any.whl" \
"https://github.com/zeiss-microscopy/OAD/releases/download/zen-api-utils-v0.1.0/zen_api_utils-0.1.0-py3-none-any.whl"
"https://github.com/zeiss-microscopy/OAD/releases/download/v2026.11.1-r1/zen_api-2026.11.1-py3-none-any.whl" \
"https://github.com/zeiss-microscopy/OAD/releases/download/zen-api-utils-v0.2.0-r1/zen_api_utils-0.2.0-py3-none-any.whl"

- name: Check code quality
run: python -m ruff check src/napari_zen_streaming
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 0.0.5 - 2026-11-25

### Fixed

- Fail Display acquisition startup promptly when the pixel reader fails or
closes before becoming ready, rather than waiting indefinitely.
- Report reader and stream-close failures, including errors from readers that
have already exited. Drain accepted frames and stop the frame processor
even when reader cleanup fails.

### Changed

- Clarify Display-reader lifecycle types and remove an unused viewer callback.
Add regression tests for failed subscriptions, early stream completion,
stream-close failures, and completed-reader error reporting.
- Require `zen_api_utils>=0.2.0` and remove the plugin's `zen_api` upper bound.
Gateway and installed-utilities compatibility constraints still apply.
- Align CI and installation examples with the public `zen_api==2026.11.1`
and `zen_api_utils==0.2.0` wheels, and add OME-Zarr package keywords.

## 0.0.4 - 2026-11-18

### Fixed
Expand Down
73 changes: 43 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,25 @@ When finished the resulting OME-ZARR, created from the ZEN pixel stream can be s

## Current status

- Release: **0.0.4** ([release notes](_release_notes/v0.0.4.md)).
- Release: **0.0.5** ([release notes](_release_notes/v0.0.5.md)).
- Project phase: alpha / MVP
- Primary OS target: Windows for ZEN Blue and the ZEN API Gateway
- Python target: `>=3.12, <3.15`

### What's new in 0.0.4

- Configured OME-ZARR acquisition preserves active channel names and actual
display colors from the selected ZEN experiment.
- Per-image OMERO display metadata follows channel subscriptions and
single-channel selections across generic scenes, HCS wells, and retained
source tiles.
- Pyramid generation retains these settings so `napari-ome-zarr` opens new
output with the experiment's colors. Missing or invalid colors warn and
use neutral grayscale rather than guessing a biological color.
- See the [0.0.3 release notes](_release_notes/v0.0.3.md) for the preceding
stream-activation and shutdown fixes.
### What's new in 0.0.5

- Display acquisition startup fails promptly if its pixel reader fails or
closes before becoming ready, rather than waiting indefinitely.
- Shutdown reports reader and stream-close errors while still draining
accepted frames and stopping the frame processor.
- Display-reader lifecycle code has clearer types and regression coverage
for startup, early stream completion, and shutdown failures.
- Require `zen_api_utils>=0.2.0`; CI and installation examples use the public
`zen_api==2026.11.1` and `zen_api_utils==0.2.0` wheels. The plugin no longer
imposes its own API upper bound; gateway and utilities compatibility still
apply.
- See the [0.0.4 release notes](_release_notes/v0.0.4.md) for the preceding
OME-Zarr channel-name and display-color improvements.

## Known limitations

Expand Down Expand Up @@ -171,18 +173,20 @@ docs/
Use the same Python environment for the wheels, the plugin, and napari. The
current dependency requirements are:

- `zen_api>=2026.5.1,<=2026.11.1`: choose a version compatible with your ZEN API
- `zen_api>=2026.5.1`: choose a version compatible with your ZEN API
Gateway.
- `zen_api_utils>=0.1.0,<0.2`: utilities have their own version number, separate
- `zen_api_utils>=0.2.0`: utilities have their own version number, separate
from the API release.

For example, install API `2026.7.1` and utilities `0.1.0` from OAD:
The installed utilities may impose additional API version bounds; removing
the plugin's upper bound does not guarantee compatibility with every gateway.
For example, install API `2026.11.1` and utilities `0.2.0` from OAD:

```powershell
$base = "https://github.com/zeiss-microscopy/OAD/releases/download"
python -m pip install `
"$base/v2026.07.1/zen_api-2026.7.1-py3-none-any.whl" `
"$base/zen-api-utils-v0.1.0/zen_api_utils-0.1.0-py3-none-any.whl"
"$base/v2026.11.1-r1/zen_api-2026.11.1-py3-none-any.whl" `
"$base/zen-api-utils-v0.2.0-r1/zen_api_utils-0.2.0-py3-none-any.whl"
```

The backtick is PowerShell's line-continuation character. Alternatively, pass
Expand All @@ -191,7 +195,7 @@ the paths to your downloaded authorized wheels:
```powershell
python -m pip install `
"C:\path\to\authorized\zen_api-<version>-py3-none-any.whl" `
"C:\path\to\authorized\zen_api_utils-0.1.0-py3-none-any.whl"
"C:\path\to\authorized\zen_api_utils-0.2.0-py3-none-any.whl"
```

Replace the example paths and API version with the wheels supplied for your
Expand All @@ -203,16 +207,16 @@ without confirming redistribution rights.
For a published PyPI release:

```powershell
python -m pip install "napari-zenapi-streaming==0.0.4" "napari[pyqt6]" "PyQt6>=6.7,<6.10"
python -m pip install "napari-zenapi-streaming==0.0.5" "napari[pyqt6]" "PyQt6>=6.7,<6.10"
```

To upgrade an existing environment with compatible ZEN wheels installed:

```powershell
python -m pip install --upgrade "napari-zenapi-streaming==0.0.4"
python -m pip install --upgrade "napari-zenapi-streaming==0.0.5"
```

Restart napari after upgrading. Version 0.0.4 writes OME-Zarr 0.6 and does not
Restart napari after upgrading. Version 0.0.5 writes OME-Zarr 0.6 and does not
automatically migrate older stores or add channel colors to existing output.
Use a reader that supports 0.6 and OMERO channel display metadata.

Expand Down Expand Up @@ -496,6 +500,11 @@ A ZEN-started run has no experiment ID known in advance and
therefore continues to accept the global stream; keep only one such
acquisition active at a time.

If the pixel reader fails or closes before it is ready, acquisition startup
fails instead of waiting indefinitely. Shutdown reports reader and stream-close
errors while still draining accepted frames and stopping the frame processor.
An OME-ZARR writer is not started if suspending the Display reader fails.

#### OME-ZARR only (index 2)

Bypasses the pipeline entirely. When **Start** is clicked:
Expand Down Expand Up @@ -880,14 +889,14 @@ python -m build --sdist --wheel
- Tests mock the gateway and cover routing, partial acquisitions, mosaics,
metadata refresh, dtype handling, progress, configuration, and layer
ownership.
- A clean Windows environment passed the full test suite with Python 3.12.15,
napari 0.10.0, PyQt6 6.9.1, ome-writers 0.3.2, ngff-zarr 0.51.0,
zen-api 2026.7.1, and zen-api-utils 0.1.0. This records one tested
environment, not a claim that every gateway version is compatible.
- Release checks include 148 simulated-gateway tests, Ruff lint/format,
focused mypy checks for the Display pipeline, source/wheel builds, and an
installed-wheel configuration and plugin-discovery smoke test. These
checks do not certify every gateway version or real-microscope throughput.
- CI checks Python 3.12-3.14 on Windows, Linux, and macOS. Pushes and pull
requests target `main`; version tags trigger publishing only after tests pass.
- CI supplies the public OAD release wheel URLs for `zen_api==2026.7.1` and
`zen_api_utils==0.1.0` in the same pip command as the plugin installation.
- CI supplies the public OAD release wheel URLs for `zen_api==2026.11.1` and
`zen_api_utils==0.2.0` in the same pip command as the plugin installation.
No ZEN wheel URL secret is required, including for forked pull requests.
- The testing extra installs `PyQt6>=6.7,<6.10`. Both CI workflows set
`QT_API=pyqt6` and `PYTEST_QT_API=pyqt6` to avoid selecting another binding.
Expand All @@ -896,8 +905,12 @@ python -m build --sdist --wheel

- Confirm the pinned OAD release wheels remain reachable and the full CI
matrix passes. Local tests do not replace this check.
- Choose the release version, update `pyproject.toml` and `CHANGELOG.md`, and
verify the tag matches. No release version is selected by the cleanup.
- Keep the version in `pyproject.toml` and `src/napari_zen_streaming/__init__.py`
consistent. Update `CHANGELOG.md`, the README, and
`_release_notes/v<version>.md`, preserving historical release entries.
- Merge the release preparation into `main` after CI passes, then create the
matching annotated `v<version>` tag and GitHub release from that commit.
The tag triggers the PyPI workflow; verify publication before announcing it.
- Install the built wheel in a clean environment, initialize user configuration,
and verify plugin discovery without relying on this checkout.
- On a real ZEN gateway, test watch/start Display modes, manual/auto-triggered
Expand Down
58 changes: 58 additions & 0 deletions _release_notes/v0.0.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# napari-zenapi-streaming v0.0.5

This alpha maintenance release hardens Display-reader startup and shutdown
and updates ZEN dependency installation guidance.

## Changes since v0.0.4

- Abort acquisition startup if the pixel reader fails or closes before
becoming ready, instead of waiting indefinitely.
- Propagate stream-close errors and retrieve failures from readers that have
already exited. Shutdown still drains accepted frames and stops the frame
processor when reader cleanup fails.
- Clarify response, task, and context-manager types, remove an unused viewer
callback, and add focused lifecycle regression tests.
- Require `zen_api_utils>=0.2.0` and remove the plugin's `zen_api` upper bound.
CI and installation examples now use the public `zen_api==2026.11.1` and
`zen_api_utils==0.2.0` wheels.
- Add OME-Zarr and Zarr package-discovery keywords.

## Compatibility and upgrade notes

- Requires Python 3.12-3.14 and `ngff-zarr>=0.51.0`.
- Choose ZEN wheels compatible with your gateway. Installed utilities may
impose their own API version bounds; removing the plugin's upper bound
does not certify every gateway version.
- Acquisition workflows and native GRAY8/GRAY16 pixel handling are unchanged.
- New output remains OME-Zarr 0.6. Existing stores are not migrated or
backfilled with channel colors.

## Installation

Install compatible `zen_api` and `zen_api_utils>=0.2.0` wheels first; they are
required dependencies but are not distributed on PyPI. See the
[README installation instructions](../README.md#installation) for the public
wheel URLs and gateway compatibility guidance.

Then upgrade the plugin in the same environment:

```powershell
python -m pip install --upgrade "napari-zenapi-streaming==0.0.5" "napari[pyqt6]" "PyQt6>=6.7,<6.10"
```

Restart napari after upgrading.

## Validation and limitations

- Full local regression suite: 148 tests passed. Ruff lint/format, focused
mypy checks for the Display pipeline, source/wheel builds, and an
installed-wheel configuration and plugin-discovery smoke test passed.
- CI covers Python 3.12-3.14 on Windows, Linux, and macOS.
- Automated tests use simulated gateway responses; they do not establish
live microscope throughput or end-to-end acquisition completeness.
- Live acquisition requires ZEN Blue and its configured API Gateway on
Windows. Remote Linux clients remain experimental.
- Only 2D GRAY8/GRAY16 frames are supported. Inspect
`acquisition_status.json` before using partial configured-writer output.
- Existing third-party deprecation and Zarr acquisition-report warnings are
not addressed by this release.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "napari-zenapi-streaming"
version = "0.0.4"
version = "0.0.5"
description = "ZEN API streaming plugin for napari"
readme = "README.md"
requires-python = ">=3.12, <3.15"
Expand All @@ -21,7 +21,7 @@ classifiers = [
"Operating System :: OS Independent",
]

keywords = ["napari", "plugin", "microscopy", "ZEN", "streaming", "ZEN-API"]
keywords = ["napari", "plugin", "microscopy", "ZEN", "streaming", "ZEN-API", "OME_ZARR", "ZARR"]

dependencies = [
"napari>=0.9.1",
Expand All @@ -35,8 +35,8 @@ dependencies = [
"ome-writers[acquire-zarr]",
"ngff-zarr[dask-image]>=0.51.0",
"zarr>=3",
"zen_api>=2026.5.1,<=2026.11.1",
"zen_api_utils>=0.1.0,<0.2",
"zen_api>=2026.5.1",
"zen_api_utils>=0.2.0",
]

[project.optional-dependencies]
Expand Down
Loading
Loading