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
16 changes: 1 addition & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
runs-on: ${{ matrix.os }}
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_FROZEN: 1
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -71,11 +70,6 @@ jobs:
python-version: "3.13"
gui: jupyter
canvas: pygfx
# pyside6 is struggling with 3.9
- os: ubuntu-latest
python-version: "3.9"
gui: pyqt
canvas: vispy
- os: ubuntu-latest
python-version: "3.11"
gui: pyqt
Expand All @@ -84,14 +78,7 @@ jobs:
python-version: "3.13"
gui: pyqt
canvas: pygfx
- os: macos-15
gui: wxpython
python-version: "3.9"
canvas: vispy
- os: windows-latest
gui: jupyter
python-version: "3.9"
canvas: pygfx


steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -156,7 +143,6 @@ jobs:
runs-on: ubuntu-latest
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_FROZEN: 1
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ ENV/
# IDE settings
.vscode/
.idea/
uv.lock
14 changes: 0 additions & 14 deletions docs/cookbook/embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,3 @@ each one.
````

{{ screenshot: examples/cookbook/multi_ndv.py }}

## A minimal microscope dashboard using `openwfs`

You can use `ndv` to take an external image source (i.e. a widefield camera) and
show its content in real-time in a custom widget embedding `ArrayViewer`. The
script below uses [`openwfs`](https://github.com/IvoVellekoop/openwfs) to
generate synthetic images of a sample and continuously update the view, and
allows to move the field of view over the X and Y axis.

````python title="examples/cookbook/microscope_dashboard.py"
--8<-- "examples/cookbook/microscope_dashboard.py"
````

{{ screenshot: examples/cookbook/microscope_dashboard.py }}
171 changes: 0 additions & 171 deletions examples/cookbook/microscope_dashboard.py

This file was deleted.

45 changes: 17 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"

# read more about configuring hatch at:
# https://hatch.pypa.io/latest/config/build/
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]

# https://peps.python.org/pep-0621/
[project]
name = "ndv"
dynamic = ["version"]
description = "Simple, fast-loading, n-dimensional array viewer, with minimal dependencies."
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
license = { text = "BSD-3-Clause" }
authors = [
{ name = "Talley Lambert", email = "talley.lambert@gmail.com" },
Expand All @@ -29,7 +23,6 @@ classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -38,10 +31,11 @@ classifiers = [
]
dependencies = [
"cmap >=0.3",
"numpy >=1.23",
"psygnal >=0.10",
"pydantic >=2.9",
"typing_extensions >= 4.0",
"numpy >=2.1.0; python_version >= '3.13'",
"numpy >=1.26.0; python_version >= '3.12'",
"psygnal >=0.12",
"pydantic >=2.10",
"typing_extensions >= 4.10",
]

# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
Expand All @@ -53,18 +47,13 @@ jupyter = [
"jupyter_rfb >=0.3.3",
"glfw >=2.4",
]
pyqt = [
"pyqt6 >=6.4,!=6.6",
"pyqt6 >=6.5.3; python_version >= '3.12'",
"qtpy >=2",
"superqt[iconify] >=0.7.2",
]
pyqt = ["pyqt6 >=6.7", "qtpy >=2", "superqt[iconify] >=0.7.2"]
pyside = [
# defer to superqt's pyside6 restrictions
"superqt[iconify,pyside6] >=0.7.2,<0.7.5",
# https://github.com/pyapp-kit/ndv/issues/59
"pyside6 ==6.6.3; sys_platform == 'win32'",
"numpy >=1.23,<2; sys_platform == 'win32'", # needed for pyside6.6
"numpy >=1.23,<2; sys_platform == 'win32' and python_version < '3.13'", # needed for pyside6.6
"pyside6 >=6.4",
"pyside6 >=6.6; python_version >= '3.12' and sys_platform == 'win32'",
"pyside6 >=6.7; python_version >= '3.12' and sys_platform != 'win32'",
Expand All @@ -74,7 +63,7 @@ wxpython = ["pyconify>=0.2.1", "wxpython >=4.2.2"]

# Supported Canavs backends
vispy = ["vispy>=0.14.3", "pyopengl >=3.1"]
pygfx = ["pygfx>=0.8.0"]
pygfx = ["pygfx==0.9.0", "rendercanvas ==2.0.1", "wgpu==0.19.3"]

# ready to go bundles with pygfx
qt = ["ndv[pygfx,pyqt]", "imageio[tifffile] >=2.20"]
Expand All @@ -91,7 +80,6 @@ array-libs = [
"aiohttp>=3.11.11",
"dask[array]>=2024.8.0",
"jax[cpu]>=0.4.30",
"numpy>=1.23",
"pooch>=1.8.2",
"pyopencl>=2025.1",
"pyopencl[pocl]>=2025.1 ; sys_platform == 'linux'",
Expand All @@ -113,13 +101,14 @@ dev = [
"ipykernel>=6.29.5",
"ipython>=8.18.1",
"mypy>=1.14.1",
"pdbpp>=0.10.3 ; sys_platform != 'win32'",
"pre-commit>=4.1.0",
"pdbpp>=0.12.1 ; sys_platform != 'win32'",
"prek>=0.3.4",
"pydevd>=3.4.1",
"pyright>=1.1.404",
"pytest-xdist>=3.8.0",
"rich>=13.9.4",
"ruff>=0.9.4",
"pyright>=1.1.404",
"types-wxpython",
"pydevd",
"types-wxpython>=0.9.7",
]
docs = [
"mkdocs >=1.6.1",
Expand All @@ -140,7 +129,7 @@ ndv = { workspace = true }
# https://docs.astral.sh/ruff
[tool.ruff]
line-length = 88
target-version = "py39"
target-version = "py310"
src = ["src"]
fix = true
unsafe-fixes = true
Expand Down Expand Up @@ -196,7 +185,7 @@ ignore_missing_imports = true
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
[tool.pyright]
include = ["src"]
pythonVersion = "3.9"
pythonVersion = "3.10"
enableExperimentalFeatures = true
# reportMissingImports = false
reportOptionalMemberAccess = "none"
Expand Down
3 changes: 1 addition & 2 deletions src/ndv/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
from contextlib import suppress
from enum import Enum, IntFlag, auto
from functools import cache
from typing import TYPE_CHECKING, Annotated, Any, NamedTuple, cast
from typing import TYPE_CHECKING, Annotated, Any, NamedTuple, TypeAlias, cast

from pydantic import PlainSerializer, PlainValidator
from typing_extensions import TypeAlias

if TYPE_CHECKING:
from qtpy.QtCore import Qt
Expand Down
Loading
Loading