-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
136 lines (120 loc) · 3.23 KB
/
Copy pathpyproject.toml
File metadata and controls
136 lines (120 loc) · 3.23 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pidgeon"
version = "0.1.0"
description = "image alignment with automatic match assessment and adaptive thumbnail estimation"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [
{ name = "Martin Prete", email = "martin.prete@sanger.ac.uk" }
]
# Core deps are permissively licensed and torch-free.
dependencies = [
"numpy>=2.1",
"scipy>=1.13",
"scikit-image>=0.24",
"tifffile>=2024.8.30",
"imagecodecs>=2024.9.22",
"zarr>=3",
"pyyaml>=6.0",
"tqdm>=4.66",
]
[project.optional-dependencies]
# Learned matchers. NOTE: the standard SuperPoint+LightGlue/SuperGlue *weights*
# are released for non-commercial research use only. DISK / ALIKED / SIFT
# weights for LightGlue are more permissive. Pick deliberately.
glue = ["torch>=2.4", "lightglue @ git+https://github.com/cvg/LightGlue"]
# Detector-free dense matcher fallback. RoMa is MIT-licensed, but downloads
# model weights on first use; install deliberately in environments that allow it.
dense = ["torch>=2.4", "romatch[fused-local-corr]>=0.1.1"]
# License-safe classical fallback matcher (SIFT patent has expired).
sift = ["opencv-contrib-python>=4.10"]
plot = ["matplotlib>=3.8"]
spatialdata = ["spatialdata"]
# All optional runtime features. Keep dev tooling separate.
all = ["pidgeon[glue,dense,sift,plot,spatialdata]"]
dev = ["ruff>=0.6", "mypy>=1.11", "pytest>=8.3"]
[project.scripts]
pidgeon = "pidgeon.cli:main"
[tool.hatch.build]
exclude = [
"**/__pycache__",
"**/*.pyc",
"__MACOSX",
"**/._*",
"**/.DS_Store",
"**/*.ipynb",
]
[tool.hatch.build.targets.wheel]
packages = ["src/pidgeon"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.ruff]
target-version = "py312"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I"]
[tool.ruff.lint.isort]
known-first-party = ["pidgeon"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.mypy]
python_version = "3.12"
files = ["src/pidgeon"]
check_untyped_defs = true
no_implicit_optional = true
pretty = true
show_error_codes = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = [
"cv2",
"lightglue",
"lightglue.*",
"scipy.*",
"skimage.*",
"torch",
"tqdm.auto",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"pidgeon.reader",
"pidgeon.tiled",
]
# tifffile, zarr, and NumPy scalar stubs are stricter than these dynamic I/O
# adapter paths. Keep these modules in the mypy run while allowing the stub
# edge cases to be covered by focused runtime tests.
disable_error_code = [
"arg-type",
"assignment",
"call-overload",
"index",
"operator",
"return-value",
"type-var",
]
[[tool.mypy.overrides]]
module = "pidgeon.plot"
# Plot helpers accept matplotlib objects and typed **kwargs that do not map
# cleanly onto matplotlib's broad runtime API.
disable_error_code = [
"arg-type",
"assignment",
"attr-defined",
"call-overload",
]
[dependency-groups]
dev = [
"myst-nb>=1.4.0",
"pydata-sphinx-theme>=0.19.0",
"sphinx>=9.1.0",
"sphinx-autodoc-typehints>=3.12.1",
"sphinx-copybutton>=0.5.2",
]