Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (164 loc) · 4.96 KB
/
Copy pathpyproject.toml
File metadata and controls
175 lines (164 loc) · 4.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[build-system]
build-backend = "setuptools.build_meta"
requires = [ "setuptools>=77", "setuptools-scm>=8" ]
[project]
name = "cytodataframe"
description = """\
An in-memory data analysis format for single-cell profiles alongside their corresponding images and segmentation \
masks.\
"""
readme = "README.md"
license = "BSD-3-Clause"
authors = [ { name = "Way Science Community" } ]
requires-python = ">=3.11,<3.14"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = [ "version" ]
# ipyvolume, matplotlib, and pywavelets are intentionally dropped from core
# dependencies here: 3D rendering already moved to pyvista/trame (see
# optional-dependencies.viz3d below) before this change, leaving these three
# as dead weight - none are imported anywhere in src/. nest-asyncio2 moved to
# optional-dependencies.viz3d instead of being dropped: pyvista's trame
# notebook backend imports it directly to launch without an explicit
# `await`, and silently falls back to a static (non-interactive) render with
# a UserWarning when it is missing.
dependencies = [
"imagecodecs>=2024.9.22,<2027",
"imageio>=2.37,<3",
"ipython>=8.12.3,<10",
"ipywidgets>=8.1.7,<9",
"opencv-python>=4.10.0.84,<6",
"pandas>=2.2.2,<4",
"polars>=1,<3",
"pyarrow>=16",
"scikit-image>0.19.3",
]
optional-dependencies.all = [
"cytodataframe[ome,viz3d]",
]
# Optional feature stacks. Install with e.g. `pip install cytodataframe[viz3d,ome]`.
# These are imported lazily, so the core package imports fine without them.
optional-dependencies.ome = [
# OME-Arrow image read/write/embedding (to_ome_parquet, OME-Arrow columns).
"ome-arrow>=0.0.3,<0.1.1",
]
optional-dependencies.viz3d = [
# Interactive 3D volume rendering (trame/pyvista views in notebooks).
# nest-asyncio2 lets pyvista launch its notebook trame server without an
# explicit `await`; without it, 3D views silently fall back to a static
# render.
"nest-asyncio2>=1.7,<2",
"pyvista>=0.46.4",
"trame>=3.12",
"trame-vtk>=2.10",
"trame-vuetify>=3.1",
]
[dependency-groups]
dev = [
"black>=24.10,<27",
"cosmicqc>=1.0.1; python_version<'3.13' and python_version>='3.10'",
"coverage>=7.6,<8",
"duckdb>=1.1.3,<2",
"httpcore>=0.18,<1.1",
"hypothesis>=6,<7",
"isort>=5.13.2,<10",
"jupyterlab>=4.3,<5",
"jupyterlab-code-formatter>=3.0.2,<4",
"jupytext>=1.16.4,<2",
# optional-feature stacks needed to exercise the full test suite
"nest-asyncio2>=1.7,<2",
"ome-arrow>=0.0.3,<0.1.1",
"poethepoet>=0.37,<0.49",
"pytest>=8.3.3,<10",
"pytest-cov>=5,<8",
"pyvista>=0.46.4",
"sqlalchemy>=1.3.6,<3",
"trame>=3.12",
"trame-vtk>=2.10",
"trame-vuetify>=3.1",
]
docs = [
"dunamai>=1.22,<2",
"myst-nb>=1.1.2,<2",
"myst-parser>=3,<6",
"pydata-sphinx-theme>=0.16,<0.24",
"sphinx>=9,<9.1",
"sphinx-multiversion",
]
[tool.setuptools]
packages.find.where = [ "src" ]
package-dir = { "" = "src" }
[tool.setuptools_scm]
version_file = "src/cytodataframe/_version.py"
version_scheme = "no-guess-dev"
local_scheme = "no-local-version"
root = "."
[tool.uv]
default-groups = [
"dev",
"docs",
]
sources.sphinx-multiversion = { git = "https://github.com/J-RN/sphinx-multiversion", rev = "a77f0c862dace3a62c18fc866da60ef7dde3873d" }
[tool.ruff]
target-version = "py311"
line-length = 88
fix = true
lint.select = [
# flake8-builtins
"A",
# flake8-annotations
"ANN",
# flake8-comprehensions
"C4",
# mccabe
"C90",
# pycodestyle
"E",
# pyflakes
"F",
# isort
"I",
# pylint
"PL",
# ruff
"RUF",
# flake8-simplify
"SIM",
"W",
]
# Ignore `E402` and `F401` (unused imports) in all `__init__.py` files
lint.per-file-ignores."__init__.py" = [ "E402", "F401" ]
lint.per-file-ignores."docs/src/examples/*.py" = [ "E402", "E501" ]
lint.per-file-ignores."src/cytodataframe/*.py" = [ "ANN401", "PLC0415" ]
lint.per-file-ignores."src/cytodataframe/image.py" = [ "PLR2004" ]
# ignore typing rules for tests
lint.per-file-ignores."tests/*" = [ "ANN201", "PLR0913", "PLR2004", "SIM105" ]
# specify where version replacement is performed
[tool.bandit]
exclude_dirs = [ "tests" ]
[tool.pytest]
ini_options.addopts = "--cov=src/cytodataframe --cov-report=term-missing:skip-covered --no-cov-on-fail"
[tool.coverage]
# settings to avoid errors with cv2 and coverage
# see here for more: https://github.com/nedbat/coveragepy/issues/1653
run.omit = [
"config-3.py",
"config.py",
]
[tool.jupytext]
formats = "ipynb,py:light"
[tool.poe]
# note: quarto commands below expect quarto installed on the local system.
# see here for more information: https://quarto.org/docs/download/
tasks.poster-preview.shell = """
quarto preview \
docs/presentations/2025-sbi2/poster.qmd
"""
tasks.poster-render.shell = """\
quarto render \\\n docs/presentations/2025-sbi2/poster.qmd\n mv \
docs/presentations/2025-sbi2/cytodataframe-2025-poster.pdf \\\n docs/src/_static/cytodataframe-2025-poster.pdf\n\
"""