-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathpyproject.toml
More file actions
260 lines (227 loc) · 7.88 KB
/
pyproject.toml
File metadata and controls
260 lines (227 loc) · 7.88 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# ============================================================================
# INSTALLATION INSTRUCTIONS
# ============================================================================
# Installation (two steps):
# 1. uv sync --python 3.12
# 2. uv pip install torch-scatter --find-links https://data.pyg.org/whl/torch-2.7.0+cu128.html
#
# System packages also required:
# - Linux: sudo apt-get install nodejs npm graphviz
# - macOS: brew install node graphviz
# ============================================================================
# ============================================================================
# Project Metadata
# ============================================================================
[project]
name = "gtsfm"
version = "0.2.0"
description = "Georgia Tech Structure from Motion - End-to-end SfM pipeline based on GTSAM"
readme = "README.md"
requires-python = ">=3.12,<3.13"
license = {text = "BSD-3-Clause"}
keywords = ["computer-vision", "structure-from-motion", "sfm", "3d-reconstruction"]
# ============================================================================
# Core Dependencies (Production)
# ============================================================================
dependencies = [
# Python essentials
"python-dotenv",
# Dask and related (for parallel computation)
"asyncssh",
"dask==2025.9.1",
"distributed==2025.9.1",
"lz4==4.4.4",
"msgpack==1.1.1", # Note: msgpack-python in conda, msgpack in PyPI
"bokeh",
"toolz==1.1.0",
"tornado==6.5.2",
# Core functionality and APIs
"hydra-core",
"matplotlib>=3.5",
"networkx",
"numpy==2.2.6",
"open3d",
"pandas==2.3.3",
"pillow>=9.0.0",
"scikit-learn",
"scipy",
"seaborn",
# 3rd party algorithms for different modules
"kornia>=0.7.3",
"pycolmap==3.11.1",
# IO
"h5py",
"plotly>=5.0",
"tabulate",
"simplejson",
"pyparsing>=3.0.9",
"psycopg2-binary", # Note: psycopg2 in conda, psycopg2-binary in PyPI (easier to install)
# Testing
"parameterized",
"wget",
# PyTorch (sources configured below for GPU/CPU selection)
"torch>=2.5.0,<2.8.0",
"torchvision>=0.20.0,<0.23.0",
# Computer vision
"opencv-python>=4.5.4.60",
"pydegensac",
"colour",
"trimesh[easy]",
"gtsam-develop==4.3a1.dev202604240153",
"pydot",
# Dust3r/Mast3r
"roma",
"tqdm",
"einops",
"tensorboard",
"pyglet<2",
"huggingface-hub[torch]==0.34.4",
# 3D Gaussian Splatting
"gsplat==1.5.3",
"torchmetrics==1.7.3",
"tyro==0.9.24",
"Flask>=3.0,<4.0",
# AnySplat
"dacite",
"lightning",
"sk-video",
"e3nn",
"colorspacious",
"plyfile",
"imageio==2.37.0",
"imageio-ffmpeg",
"visu3d==1.5.3",
"etils==1.7.0",
"nbformat==5.10.4",
]
# ============================================================================
# Optional Dependencies (Extras)
# ============================================================================
[project.optional-dependencies]
complete = [
"xformers==0.0.30 ; sys_platform == 'linux'",
]
# Multi-GPU support (only needed for distributed computing with multiple GPUs per node)
# Requires CUDA-aware hardware and drivers
multi-gpu = [
"dask-cuda>=24.8.0 ; sys_platform == 'linux'",
"cuda-bindings~=12.0 ; sys_platform == 'linux'", # keep in sync with multi-gpu
]
# All optional features combined (for power users and clusters)
all = [
"xformers==0.0.30 ; sys_platform == 'linux'",
"dask-cuda>=24.8.0 ; sys_platform == 'linux'",
"cuda-bindings~=12.0 ; sys_platform == 'linux'", # keep in sync with multi-gpu
]
# ============================================================================
# Development Dependencies
# ============================================================================
[dependency-groups]
dev = [
# Formatting and linting
"black",
"isort",
"flake8",
"mypy",
"pylint",
# Testing
"pytest",
"pytest-cov",
"coverage",
]
# ============================================================================
# Dependency Sources
# ============================================================================
[tool.uv.sources]
# PyTorch: Use CUDA 12.8 on Linux (for Blackwell support), CPU on macOS
torch = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux'" },
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
]
torchvision = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux'" },
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
]
# ============================================================================
# PyTorch Indexes
# ============================================================================
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu121"
url = "https://download.pytorch.org/whl/cu121"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
# ============================================================================
# Build System
# ============================================================================
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# ============================================================================
# UV Configuration
# ============================================================================
[tool.uv]
# Default groups to include
default-groups = ["dev"]
# Package as editable install (for development)
package = true
# ============================================================================
# Black Configuration (Code Formatting)
# ============================================================================
[tool.black]
line-length = 120
target-version = ['py311', 'py312']
skip-string-normalization = false
# ============================================================================
# Pylint Configuration (Linting)
# ============================================================================
[tool.pylint.messages_control]
disable = ["invalid-name"]
[tool.pylint.format]
max-line-length = 120
[tool.pylint.typecheck]
generated-members = ["numpy.*", "torch.*", "cv2.*", "cv.*", "scipy.*", "gtsam.*"]
# ============================================================================
# Flake8 Configuration (Style Checking)
# Note: Flake8 doesn't read from pyproject.toml natively
# This is for reference. Use setup.cfg or .flake8 file instead
# Or use a plugin like flake8-pyproject to enable pyproject.toml support
# ============================================================================
[tool.flake8]
max-line-length = 120
ignore = ["E201", "E202", "E203", "E231", "W291", "W293", "E303", "W391", "E402", "W503"]
# ============================================================================
# MyPy Configuration (Type Checking)
# ============================================================================
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
# ============================================================================
# Pytest Configuration (Testing)
# ============================================================================
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
addopts = "-v --cov=gtsfm --cov-report=html --cov-report=term"
# ============================================================================
# Coverage Configuration (Test Coverage)
# ============================================================================
[tool.coverage.run]
source = ["gtsfm"]
omit = ["*/tests/*", "*/test_*.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]