@@ -9,7 +9,7 @@ dependencies = [
99 " scipy==1.11.4" ,
1010 " pandas==2.0.3" ,
1111 " opencv-python-headless==4.8.0.76" ,
12- " imageio==2.31.6" ,
12+ " imageio[ffmpeg] ==2.31.6" ,
1313 " pillow==9.4.0" ,
1414 " matplotlib==3.7.1" ,
1515 " typer>=0.12.4" ,
@@ -40,16 +40,33 @@ cpu = [
4040
4141
4242# ---- uv configuration: point Torch family at cu126 index ----
43+ # ---- uv indexes ----
44+ [[tool .uv .index ]]
45+ name = " pypi"
46+ url = " https://pypi.org/simple"
47+ explicit = false
48+
4349[[tool .uv .index ]]
4450name = " pytorch-cu126"
4551url = " https://download.pytorch.org/whl/cu126"
4652explicit = true
4753
54+ # ---- uv per-package sources with markers ----
55+ # Use CUDA wheels only when installing the `gpu` extra AND on platforms that can use them.
56+ # Fall back to CPU wheels when installing the `cpu` extra.
4857[tool .uv .sources ]
49- torch = { index = " pytorch-cu126" }
50- torchvision = { index = " pytorch-cu126" }
51- torchaudio = { index = " pytorch-cu126" }
52-
58+ torch = [
59+ { index = " pytorch-cu126" , marker = " sys_platform == 'linux' and extra == 'gpu'" },
60+ { index = " pypi" , marker = " sys_platform == 'linux' and extra != 'gpu'" },
61+ ]
62+ torchvision = [
63+ { index = " pytorch-cu126" , marker = " sys_platform == 'linux' and extra == 'gpu'" },
64+ { index = " pypi" , marker = " sys_platform == 'linux' and extra != 'gpu'" },
65+ ]
66+ torchaudio = [
67+ { index = " pytorch-cu126" , marker = " sys_platform == 'linux' and extra == 'gpu'" },
68+ { index = " pypi" , marker = " sys_platform == 'linux' and extra != 'gpu'" },
69+ ]
5370
5471[project .scripts ]
5572mouse-tracking-runtime = " mouse_tracking.cli.main:app"
@@ -98,8 +115,14 @@ addopts = "--benchmark-skip"
98115
99116[dependency-groups ]
100117dev = [
118+ {include-group = " lint" },
119+ {include-group = " test" }
120+ ]
121+ test = [
101122 " pytest>=8.3.5" ,
102123 " pytest-benchmark>=5.1.0" ,
103124 " pytest-cov>=6.1.1" ,
125+ ]
126+ lint = [
104127 " ruff>=0.11.2" ,
105128]
0 commit comments