-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
104 lines (89 loc) · 2.58 KB
/
pyproject.toml
File metadata and controls
104 lines (89 loc) · 2.58 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
[project]
name = "panopticon"
version = "0.1.0"
description = "GPU-accelerated AI window observer using YOLOv8"
readme = "README.md"
requires-python = ">=3.10"
authors = [{ name = "xransum" }]
license = { text = "MIT" }
dependencies = [
"PyQt6>=6.6.0",
"mss>=9.0.1",
"ultralytics>=8.0.0",
"numpy>=1.24.0",
"opencv-python>=4.9.0",
"Pillow>=10.0.0",
# Platform-specific window enumeration
"python-xlib>=0.33; sys_platform == 'linux'",
"pywin32>=306; sys_platform == 'win32'",
"pyobjc-framework-Quartz>=10.0; sys_platform == 'darwin'",
]
[project.scripts]
panopticon = "panopticon.app:run"
[project.optional-dependencies]
# PyTorch must be installed separately with the correct CUDA variant.
# Use one of the extras below OR install manually:
# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
cuda121 = [
"torch>=2.2.0",
"torchvision>=0.17.0",
]
cpu = [
"torch>=2.2.0",
"torchvision>=0.17.0",
]
[dependency-groups]
dev = [
"ruff>=0.4.0",
"pre-commit>=3.7.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# ---------------------------------------------------------------------------
# uv configuration
# ---------------------------------------------------------------------------
[tool.uv]
# Override the torch index per-platform so uv can resolve the CUDA wheel.
# Users on CPU-only machines can remove the override or use `--extra cpu`.
index-strategy = "unsafe-best-match"
[[tool.uv.index]]
name = "pytorch-cu121"
url = "https://download.pytorch.org/whl/cu121"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cu121", marker = "sys_platform != 'darwin'" },
]
torchvision = [
{ index = "pytorch-cu121", marker = "sys_platform != 'darwin'" },
]
[tool.hatch.build.targets.wheel]
packages = ["panopticon"]
# ---------------------------------------------------------------------------
# Ruff - linting + formatting
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py310"
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long - handled by formatter
"B008", # do not perform function calls in default args
]
[tool.ruff.lint.isort]
known-first-party = ["panopticon"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true