-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
94 lines (81 loc) · 3.51 KB
/
Copy pathpyproject.toml
File metadata and controls
94 lines (81 loc) · 3.51 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
[project]
name = "multicam-sim"
version = "0.1.0"
description = "A typed multi-camera scene simulator: pinhole projection + occlusion, emitting a triangulation-ready manifest."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "Bamdad Dashtban" }]
keywords = ["multi-view-geometry", "pinhole", "occlusion", "simulation", "computer-vision"]
dependencies = ["pydantic>=2.7", "numpy>=1.26"]
[project.optional-dependencies]
# Offscreen renderer backend (multicam_sim.dsl.render / .depth). Pixels are NOT
# the contract, so this is optional and intentionally kept out of CI.
render = ["pyrender>=0.1.45", "trimesh>=4.0"]
# Photoreal Kubric/Blender backend (multicam_sim.dsl.kubric_backend). Kubric
# CANNOT pip-install cleanly: it needs Blender's bundled Python and native libs.
# This extra only pulls the Python package; to actually render, use the maintained
# image: `docker run --rm kubricdockerhub/kubruntu python3 <script>.py`. Pixels are
# NOT the contract, so like `render` this is optional and kept out of CI. See
# docs/kubric.md.
kubric = ["kubric>=0.1.1"]
# 2D keypoint/skeleton overlay exporter (multicam_sim.overlay). Light pure-drawing
# dependency; installed in dev so the frames path is exercised in CI.
overlay = ["pillow>=10.0"]
# MP4 output for the overlay exporter. Heavy video encoder kept optional.
overlay-mp4 = ["pillow>=10.0", "imageio[ffmpeg]>=2.34"]
[project.urls]
Homepage = "https://github.com/bamdadd/multicam-sim"
Repository = "https://github.com/bamdadd/multicam-sim"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/multicam_sim"]
[dependency-groups]
dev = [
"pytest>=8.0",
"ruff>=0.6",
"mypy>=1.11",
"pre-commit>=3.8",
# the real consumer reader — the smoke triangulates through its DLT.
"multicam-occlusion",
# light drawing dep for the overlay exporter's frames path (exercised in CI).
"pillow>=10.0",
]
[tool.uv]
# pyrender declares PyOpenGL==3.1.0 (a hard `==`), and that release's OSMesa
# bindings lack OSMesaCreateContextAttribs -- which pyrender's own OSMesa platform
# imports, so its headless path dies with
# "ImportError: cannot import name 'OSMesaCreateContextAttribs'".
# The pin cannot be widened from the `render` extra (uv rejects `pyopengl>=3.1.7`
# against `==3.1.0` as unsatisfiable), so it is overridden here. pyopengl reaches
# the graph only via the `render` extra, which CI never installs.
# See docs/renderer-eval.md.
override-dependencies = ["pyopengl>=3.1.7"]
[tool.uv.sources]
# path dep to the sibling checkout; CI checks the repo out at ../multicam-occlusion.
multicam-occlusion = { path = "../multicam-occlusion", editable = true }
[tool.ruff]
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
[tool.mypy]
# 3.12 so mypy parses NumPy's PEP 695 `type` aliases in its bundled stubs;
# the package itself runs on 3.11+ (see requires-python).
python_version = "3.12"
strict = true
files = ["src"]
# The optional renderer backend (render extra) ships no stubs and is never
# installed in CI; treat its imports as missing so mypy stays clean without it.
[[tool.mypy.overrides]]
module = ["pyrender.*", "trimesh.*", "kubric.*", "kubric"]
ignore_missing_imports = true
# Pillow/imageio are optional and imported lazily; keep mypy clean without them.
[[tool.mypy.overrides]]
module = ["PIL.*", "PIL", "imageio.*", "imageio"]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "-q"
testpaths = ["tests"]