-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (126 loc) · 4.98 KB
/
Copy pathpyproject.toml
File metadata and controls
134 lines (126 loc) · 4.98 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
[project]
name = "deeperfly"
version = "0.1.0"
description = "Markerless 3D pose estimation of tethered Drosophila from a multi-camera rig, in JAX"
readme = "README.md"
requires-python = ">=3.11,<3.14"
license = "GPL-3.0-only"
license-files = ["LICENSE"]
authors = [
{ name = "tkclam", email = "thomas.lam@epfl.ch" },
]
keywords = [
"pose-estimation",
"drosophila",
"neuroscience",
"bundle-adjustment",
"triangulation",
"multi-view-geometry",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Image Recognition",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
]
dependencies = [
# Geometry/BA core (float64, JIT- and grad-friendly), kept on the CPU -- the
# arrays are tiny, so a GPU never helps. CPU JAX is portable on every platform
# and is the only JAX deeperfly installs (the detector is PyTorch).
"jax>=0.10.1",
# The 2D detector (PyTorch). torch loads the original DeepFly2D weights
# directly, uses CUDA on NVIDIA GPUs (its PyPI wheel already bundles CUDA), and
# auto-uses Metal (MPS) on Apple Silicon -- so no extra is needed for either.
"torch>=2.2",
"torchvision>=0.17",
"jaxtyping>=0.3.10",
"numpy>=2.4.6",
"scipy>=1.14",
"h5py>=3.11",
"platformdirs>=4.0",
"rich>=14.0",
"typer>=0.26",
"av>=13",
"opencv-python-headless>=4.13",
"natsort>=8.4.0",
# The interactive web viewer/corrector (`deeperfly gui`): FastAPI + uvicorn
# serve a browser front-end (the compiled assets ship in the wheel under
# deeperfly/gui/web). Kept in the core deps -- they're tiny next to torch/jax
# and `deeperfly gui` is a first-class subcommand, so a plain install must be
# able to run it. The `[standard]` uvicorn extra pulls the WebSocket +
# http-tools speedups; both are still imported lazily (only `gui` needs them).
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
]
[project.urls]
Homepage = "https://github.com/NeLy-EPFL/deeperfly"
Documentation = "https://nely-epfl.github.io/deeperfly/"
Repository = "https://github.com/NeLy-EPFL/deeperfly"
Issues = "https://github.com/NeLy-EPFL/deeperfly/issues"
[project.scripts]
deeperfly = "deeperfly.cli:main"
[build-system]
requires = ["uv_build>=0.11.16,<0.12.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"ipykernel>=7.2.0",
# Notebook plotting only (examples/*.ipynb; not used by the package). Plotly
# draws the interactive figures, which stay interactive when the notebooks are
# rendered into the docs; matplotlib still draws a few static panels in
# pipeline_walkthrough.ipynb.
"matplotlib>=3.10",
"plotly>=6.8.0",
]
test = [
"pytest>=9.0.3",
"pytest-cov>=6.0",
# Exercise the web GUI: FastAPI's TestClient (httpx-backed) drives the API +
# WebSocket in-process, no real server or browser needed. FastAPI/uvicorn
# themselves are core deps; only the httpx test client is test-only.
"httpx>=0.27",
]
docs = [
# The documentation site (MkDocs + Material). The library API reference is
# generated from the source docstrings by mkdocstrings (griffe reads the
# source statically, so the heavy runtime deps are not imported to build it).
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.27",
"ruff>=0.6", # mkdocstrings uses it to format the rendered API signatures
# Renders the example notebooks (examples/*.ipynb) into the site from their
# stored outputs (execute: false), so the Plotly figures stay interactive
# without importing torch/jax at build time.
"mkdocs-jupyter>=0.25",
# Publishes each branch as its OWN version under the site root (main -> the
# release number plus the `stable` alias, dev -> `dev`) by committing built
# sites to the gh-pages branch. Material reads the `versions.json` it writes
# to draw the version selector.
"mike>=2.1",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["tests"]
addopts = "-q"
[tool.ruff.lint]
# Default rules (E4/E7/E9 + F) plus pycodestyle warnings (W) and import sorting (I).
# F722/F821 are off because jaxtyping uses string shape annotations (e.g.
# Float[Array, "n 3"]) that pyflakes misreads as forward references. The pyupgrade
# (UP) rules are deliberately *not* enabled for the same reason: UP037 would strip
# the quotes from those shape strings and break the annotations.
select = ["E4", "E7", "E9", "F", "W", "I"]
ignore = ["F722", "F821"]
[tool.coverage.run]
source = ["deeperfly"]
branch = true
[tool.pyright]
include = ["src/deeperfly"]
# Heavy dynamic JAX/PyTorch plus jaxtyping string annotations make strict checking
# noisy; "basic" surfaces real issues without the flood. Runs as an advisory
# (non-blocking) CI job, not in pre-commit.
typeCheckingMode = "basic"
pythonVersion = "3.11"