Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
111 lines (99 loc) · 3.6 KB
/
Copy pathpyproject.toml
File metadata and controls
111 lines (99 loc) · 3.6 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
[project]
name = "pixaboost"
version = "0.1.0"
description = "Reconstruction 3D (GLB) haute fidelite d'une piece photographiee, via Pixal3D multi-vues."
requires-python = ">=3.11,<3.12"
dependencies = [
"numpy>=2.1",
"pillow>=12.3.0",
"scipy>=1.17.1",
"trimesh>=5.0.0",
]
[project.optional-dependencies]
gui = [
"paramiko>=3.5,<5",
"PyQt6>=6.6,<7",
]
# SAM 3 click segmentation (F14). Deliberately NOT in `dev`: it pulls ~3 GB of
# wheels and the gate must stay installable on free CI. Everything in
# `backends/sam3.py` imports it lazily. See ADR-0014.
segmentation = [
"torch>=2.6",
# Required, not optional: Sam3ImageProcessor refuses to build without it,
# and the failure surfaces inside from_pretrained rather than at import.
"torchvision>=0.21",
"transformers>=4.60",
]
[project.scripts]
pixaboost = "pixaboost.cli:main"
pixaboost-gui = "pixaboost.gui.__main__:main"
[dependency-groups]
dev = [
"paramiko>=3.5,<5",
"PyQt6>=6.6,<7",
"pytest>=8.3",
"pytest-cov>=6.0",
"ruff>=0.9",
"mypy>=1.14",
"poethepoet>=0.32",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/pixaboost"]
# ---------------------------------------------------------------------------
# Task runner. Canonical surface: `uv run poe <task>`.
# `make <task>` delegates here on platforms that have GNU make (CI, RunPod).
# See DECISIONS.md ADR-0002.
# ---------------------------------------------------------------------------
[tool.poe.tasks]
setup = { cmd = "uv sync --all-groups", help = "Install the CPU dev environment from scratch" }
lint = { cmd = "ruff check src tests", help = "Lint" }
fmt = { cmd = "ruff format src tests", help = "Format" }
typecheck = { sequence = [
"typecheck-host",
"typecheck-linux",
], help = "Static type check on both platforms", ignore_fail = false }
typecheck-host = { cmd = "mypy src", help = "Static type check for this machine" }
# CI runs on Linux. A gate that is green here and red there is not a gate:
# ctypes.WinDLL type-checked on Windows and broke the pipeline on push.
typecheck-linux = { cmd = "mypy src --platform linux", help = "Static type check as CI sees it" }
test = { cmd = "pytest tests/unit tests/integration -q", help = "CPU tests (no GPU, no network)" }
check = { sequence = [
"lint",
"typecheck",
"test",
], help = "Full CPU gate. Must be green before any commit.", ignore_fail = false }
bench-build = { cmd = "python -m pixaboost.bench.build", help = "Render the synthetic benchmark into data/bench" }
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-markers"
markers = [
"gpu: requires a CUDA GPU (never runs in CPU CI)",
"network: requires network access (never runs in CPU CI)",
]
[tool.ruff]
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "NPY", "RUF"]
[tool.mypy]
python_version = "3.11"
packages = ["pixaboost"]
mypy_path = "src"
strict = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = ["trimesh.*", "open3d.*", "scipy.*", "lpips.*"]
ignore_missing_imports = true
# Optional heavyweight extras, imported lazily inside `backends/`.
#
# `follow_imports = "skip"` is the important half: without it the gate's verdict
# depends on whether `--extra segmentation` happens to be installed. It was
# green on a machine without transformers and red on one with it, which is a
# gate that cannot be trusted. Skipping makes both machines agree.
[[tool.mypy.overrides]]
module = ["torch.*", "torchvision.*", "transformers.*"]
ignore_missing_imports = true
follow_imports = "skip"