-
Notifications
You must be signed in to change notification settings - Fork 365
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (147 loc) · 4.47 KB
/
pyproject.toml
File metadata and controls
164 lines (147 loc) · 4.47 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[project]
name = "ouroboros-ai"
dynamic = ["version"]
description = "Specification-first workflow engine for AI coding agents. Works with Claude Code and Codex CLI."
readme = "README.md"
authors = [
{ name = "Q00", email = "jqyu.lee@gmail.com" }
]
requires-python = ">=3.12"
dependencies = [
"aiosqlite>=0.20.0,<1.0.0",
"anyio>=4.0.0,<5.0.0",
"jsonschema>=4.21.0,<5.0.0",
"pydantic>=2.0.0,<3.0.0",
"prompt-toolkit>=3.0.0,<4.0.0",
"questionary>=2.0.0,<3.0.0",
"pyyaml>=6.0.0,<7.0.0",
"rich>=13.0.0,<15.0.0",
"sqlalchemy[asyncio]>=2.0.0,<3.0.0",
"structlog>=24.0.0,<26.0.0",
"typer>=0.12.0,<1.0.0",
]
[project.optional-dependencies]
claude = ["claude-agent-sdk>=0.1.0,<1.0.0", "anthropic>=0.52.0,<1.0.0"]
copilot = []
litellm = ["litellm>=1.80.0,<=1.82.6"]
dashboard = [
"streamlit>=1.40.0,<2.0.0",
"plotly>=5.24.0,<7.0.0",
"pandas>=2.2.0,<3.0.0",
]
mcp = ["mcp>=1.26.0,<2.0.0"]
tui = ["textual>=1.0.0,<9.0.0"]
all = ["ouroboros-ai[claude,copilot,litellm,mcp,tui,dashboard]"]
[project.scripts]
ouroboros = "ouroboros.cli.main:app"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"
[tool.hatch.build.hooks.vcs]
version-file = "src/ouroboros/_version.py"
[tool.hatch.build]
exclude = [
"/.smoke-home",
"**/node_modules",
]
[tool.hatch.build.targets.wheel]
packages = ["src/ouroboros"]
# Scoped to wheel only: prevent the `packages=` sweep from shipping these
# assets, so the force-include below is the single source of truth and we
# avoid duplicate ZIP local headers (PyPI rejects those). The sdist keeps
# the files at their natural source path so rebuilds from sdist reproduce
# the same wheel via this same config.
exclude = [
"src/ouroboros/opencode/plugin/**",
"src/ouroboros/plugin/schemas/**",
]
[tool.hatch.build.targets.wheel.force-include]
"skills" = "ouroboros/skills"
# Explicit inclusion so `importlib.resources.files("ouroboros.opencode.plugin")`
# reliably finds ouroboros-bridge.ts / package.json / tsconfig.json in the
# installed wheel, independent of hatchling's implicit asset handling.
"src/ouroboros/opencode/plugin" = "ouroboros/opencode/plugin"
# Same pattern for the vendored UserLevel plugin schemas — `_load_schema`
# in `ouroboros.plugin.manifest` resolves them via `importlib.resources`,
# so they must reach the installed wheel as package data, not just the
# source tree.
"src/ouroboros/plugin/schemas" = "ouroboros/plugin/schemas"
[dependency-groups]
dev = [
"ouroboros-ai[claude,litellm,mcp,tui]",
"mypy>=1.19.1",
"pre-commit>=4.5.1",
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
"ruff>=0.14.11",
"types-pyyaml>=6.0.12.20250915",
]
[tool.mypy]
python_version = "3.12"
ignore_missing_imports = true
disable_error_code = [
"union-attr",
"arg-type",
"return-value",
"assignment",
"attr-defined",
"misc",
"call-arg",
"override",
"list-item",
"dict-item",
"operator",
"str-bytes-safe",
"no-any-return",
"import-untyped",
]
[tool.pytest.ini_options]
# asyncio_mode = "auto" per project-context.md
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
[tool.ruff]
line-length = 100
target-version = "py312"
exclude = ["src/ouroboros/_version.py"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # Line too long (handled by formatter)
"ARG002", # Unused method argument (common in interfaces/overrides)
"B017", # assert-raises-exception
"B023", # function-uses-loop-variable
"B904", # raise-without-from-inside-except
"SIM102", # collapsible-if
"SIM105", # suppressible-exception
"SIM108", # if-else-block-instead-of-if-exp
"SIM117", # multiple-with-statements
]
[tool.ruff.lint.isort]
force-single-line = false
force-sort-within-sections = true
known-first-party = ["ouroboros"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["ARG001", "ARG002", "E402"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"