-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (108 loc) · 4.31 KB
/
Copy pathpyproject.toml
File metadata and controls
119 lines (108 loc) · 4.31 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
[project]
name = "panopticon-next"
version = "0.2.13"
description = "Self-hosted control plane for running a fleet of coding agents in isolated containers, governed by configurable workflows."
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
license-files = ["LICENSE"]
dependencies = [
"fastapi>=0.110",
"sqlalchemy[asyncio]>=2.0.50",
"alembic>=1.18.4",
"uvicorn>=0.29",
"httpx>=0.27",
"textual>=8.2.7",
"mcp>=1.27.2,<2",
"aiosqlite>=0.20",
]
[project.urls]
Homepage = "https://unsupervised.com/panopticon"
Repository = "https://github.com/Unsupervisedcom/panopticon-next"
Issues = "https://github.com/Unsupervisedcom/panopticon-next/issues"
[project.scripts]
panopticon = "panopticon.terminal.__main__:main"
panopticon-image-paste = "panopticon.sessionservice.image_paste:main"
[dependency-groups]
dev = [
"pytest>=8",
"mypy>=1.11",
"pytest-asyncio>=1.4.0",
"ruff>=0.6",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/panopticon"]
include = [
"src/panopticon/docker/Dockerfile",
"src/panopticon/docker/entrypoint.sh",
"src/panopticon/docker/install-packaged-source.sh",
"src/panopticon/sessionservice/task_lib.sh",
"src/panopticon/workflows/setup_repo.sh",
"src/panopticon/workflows/setup_repo_lib.sh",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"
asyncio_mode = "auto" # Textual's run_test() pilot uses async tests
[tool.mypy]
python_version = "3.11"
strict = true
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
[tool.ruff]
# Match requires-python's floor / mypy — the minimum syntax we support, not CI's runner.
target-version = "py311"
line-length = 100
[tool.ruff.lint]
# A curated, high-signal "best practices" set — deliberately NOT `ALL` (which bundles
# docstring-everything, annotation rules that duplicate mypy, and formatter-owned rules
# that would bury signal and fight `ruff format`). F carries the headline F401 unused-import
# rule this gate exists for. Noisier sets (PTH/PL/RET/ARG) are left for a follow-up once the
# core set is clean; see plan.md.
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes — includes F401 (unused import), F841 (unused variable)
"I", # isort — import ordering
"UP", # pyupgrade — modernize for the py311 target
"B", # flake8-bugbear — likely-bug patterns
"SIM", # flake8-simplify
"C4", # flake8-comprehensions
"PIE", # flake8-pie — misc lints
"RUF", # Ruff-specific rules
"TID", # flake8-tidy-imports
]
ignore = [
# `ruff format` owns line length: it reflows code but deliberately leaves comments,
# docstrings, and long string/URL literals alone, so E501 here would only ever nag about
# lines the formatter won't touch. Format-check is the real width gate.
"E501",
# Ambiguous-unicode rules: this codebase deliberately uses `—`, `…`, `→`, `≈` in prose,
# docstrings, and comments. That's intentional typography, not a homoglyph mistake.
"RUF001",
"RUF002",
"RUF003",
# Empty methods in ABCs are our optional lifecycle hooks (Workflow.on_transition/provision,
# Store.init, ArtifactStore.link_slug/unlink_slug): a default no-op subclasses may override
# but need not. Making them @abstractmethod would wrongly force every subclass to implement.
"B027",
# `class Foo(str, Enum)` → `StrEnum` changes `str(Foo.X)` from `"Foo.X"` to the value; these
# enums are persisted/serialized, so that semantic shift is out of scope for a lint adoption.
"UP042",
]
[tool.ruff.lint.isort]
known-first-party = ["panopticon"]
[tool.ruff.lint.per-file-ignores]
# Package __init__.py files re-export their public surface via `__all__`; those imports
# are "unused" locally by design.
"__init__.py" = ["F401"]
# Tests lean on bare asserts (S101), assert-by-attribute-access inside `pytest.raises` (B018),
# and lambda stubs for fakes (E731); test fixture classes carry mutable class defaults (RUF012).
"tests/*" = ["S101", "B018", "E731", "RUF012"]
# Textual widgets declare class-level BINDINGS/CSS/COMPONENT_CLASSES as mutable defaults — a
# framework convention the framework reads off the class, not a shared-mutable-state bug.
"src/panopticon/terminal/dashboard.py" = ["RUF012"]