-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathpyproject.toml
More file actions
374 lines (341 loc) · 9.19 KB
/
pyproject.toml
File metadata and controls
374 lines (341 loc) · 9.19 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "tunacode-cli"
version = "0.1.96"
description = "Your agentic CLI developer."
keywords = ["cli", "agent", "development", "automation"]
readme = "README.md"
requires-python = ">=3.11,<3.14"
license = {text = "MIT"}
authors = [
{ name = "larock22", email = "noreply@github.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Utilities",
]
dependencies = [
"typer>=0.15.0",
"click>=8.1.0,<8.2.0",
"prompt_toolkit>=3.0.52,<4.0.0",
"tiny-agent-os>=1.2.11",
"pygments>=2.19.2,<3.0.0",
"rich>=14.2.0,<15.0.0",
"defusedxml",
"textual>=4.0.0,<5.0.0",
"pathspec>=0.12.1",
"textual-autocomplete>=4.0.6",
"html2text>=2024.2.26",
"python-Levenshtein>=0.21.0",
"ruff>=0.14.0",
# Transitive dependencies that are directly imported
"httpx>=0.27.0",
"pydantic>=2,<3",
"pyperclip>=1.11.0",
]
[project.scripts]
tunacode = "tunacode.ui.main:app"
[project.optional-dependencies]
dev = [
# Testing frameworks
"pytest>=9.0.1",
"pytest-cov",
"pytest-asyncio>=1.3.0",
"pytest-randomly>=3.15.0", # Test isolation - randomize test order
"pytest-timeout>=2.3.1", # Test isolation - prevent hanging tests
"pytest-json-report>=1.5.0", # JSON test reports for historical tracking
"hypothesis>=6.150.0",
# Code quality and linting
"ruff==0.14.9",
"mypy",
"bandit",
"pylint>=4.0.4",
"deptry>=0.12.0", # Unused dependencies detection
"grimp>=3.14",
# Dead code detection
"vulture>=2.7",
"unimport>=1.0.0",
"autoflake>=2.0.0",
"dead>=1.5.0",
# Development tools
"pre-commit",
"textual-dev",
# Build and distribution
"build",
"twine",
]
[project.urls]
Homepage = "https://tunacode.xyz/"
Repository = "https://github.com/alchemiststudiosDOTai/tunacode"
Issues = "https://github.com/alchemiststudiosDOTai/tunacode/issues"
Documentation = "https://github.com/alchemiststudiosDOTai/tunacode#readme"
# NOTE: tinyagent is now provided by the PyPI distribution `tiny-agent-os`.
# We intentionally do not use a repo-local override.
[tool.ruff]
line-length = 100
src = ["src"]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
"C90", # mccabe complexity
"FIX", # fixme/todo detection
"TD", # todo formatting
]
ignore = [
"E203",
"TD002", # Don't require author in TODOs
"TD003", # Don't require issue link in TODOs
"FIX002", # Allow TODO comments
]
# TODO format: TODO(scope): description [TUN-XXXX]
# Example: TODO(core): refactor message handling [TUN-1234]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"__pycache__",
"build",
"dist",
"venv",
"vulture_whitelist.py",
".osgrep",
"*.lance",
"*.egg-info",
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"tunacode-shared",
"tunacode-tools",
"tunacode-infrastructure",
"tunacode-core",
"tunacode-ui",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"tunacode-shared" = [
"tunacode.configuration*",
"tunacode.constants*",
"tunacode.exceptions*",
"tunacode.indexing*",
"tunacode.lsp*",
"tunacode.prompts*",
"tunacode.templates*",
"tunacode.types*",
"tunacode.utils*",
]
"tunacode-tools" = ["tunacode.tools*"]
"tunacode-infrastructure" = ["tunacode.infrastructure*"]
"tunacode-core" = ["tunacode.core*"]
"tunacode-ui" = ["tunacode.ui*"]
[tool.vulture]
min_confidence = 80
paths = ["src", "tests"]
exclude = ["venv/", "build/", "dist/", ".git/", "__pycache__/", "*.egg-info/", ".osgrep/"]
# Whitelist of false positives
ignore_names = [
# TYPE_CHECKING imports
"ReadStream",
"WriteStream",
"StateManager",
"ModelRequest",
"CommandRegistry",
# Pytest fixtures
"caplog",
"temp_workspace",
"setup_test_environment",
"excinfo",
# Common patterns
"_complete_event", # prompt_toolkit API requirement
"kw", # **kw pattern
"kwargs", # **kwargs pattern
"message", # exception handling
"response_obj", # API responses
# Test parameters and mock arguments
"should_restart", # test parameter
"exc", # exception handling in __aexit__
"exc_type", # exception handling in __aexit__
"tb", # traceback in __aexit__
"style_dict", # Style.from_dict parameter
"style_str", # get_attrs_for_style_str parameter
]
[tool.bandit]
# Skip low-severity warnings for subprocess and assert statements
skips = ["B404", "B603", "B101", "B607", "B110", "B324", "B103", "B604", "B602", "B108"]
# B404: import subprocess
# B603: subprocess without shell=True
# B101: assert statements
# B607: start process with partial path
# B110: try/except/pass
# B324: hashlib (SHA1 for non-security fingerprinting)
# B103: chmod permissions (needed for template dirs)
# B604: shell=True (validated usage in REPL)
# B602: subprocess with shell=True (security utils)
# B108: hardcoded tmp paths (test fixtures)
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
[[tool.mypy.overrides]]
module = ["tunacode.core.agents", "tunacode.core.agents.*"]
warn_return_any = true
disallow_any_expr = true
disallow_any_explicit = true
disallow_any_generics = true
[tool.pylint.messages_control]
# Enable duplicate code detection (R0801)
enable = ["R0801"]
min-similarity-lines = 6
ignore-patterns = ["test_.*", ".*_test.py", "conftest.py"]
[tool.pylint.reports]
# Only show duplicate code messages to reduce noise
reports = false
score = false
[tool.deptry]
# Unused dependencies detection
extend_exclude = ["tests", "scripts", "docs"]
ignore_notebooks = true
[tool.deptry.per_rule_ignores]
# DEP002: Dependencies not imported in source code (but used externally)
# Runtime deps used by Rich/Textual internally or as CLI tools
DEP002 = [
"click", # Used by typer internally
"prompt_toolkit", # Used by textual internally
"pygments", # Used by rich.syntax internally
"python-Levenshtein", # Used by rapidfuzz as optional speedup
"ruff", # CLI tool, not imported
# Dev dependencies (test/lint/build tools - all CLI tools)
"pytest",
"pytest-cov",
"pytest-asyncio",
"pytest-randomly",
"pytest-timeout",
"pytest-json-report",
"hypothesis",
"mypy",
"bandit",
"pylint",
"deptry",
"grimp",
"vulture",
"unimport",
"autoflake",
"dead",
"pre-commit",
"textual-dev",
"build",
"twine",
]
# DEP003: Transitive dependencies that we import directly
DEP003 = [
"Levenshtein", # Imported directly, installed via python-Levenshtein
]
[tool.hatch.build.targets.wheel]
packages = ["src/tunacode"]
include = [
"src/tunacode/ui/assets/*.ansi",
"src/tunacode/configuration/*.json",
"src/tunacode/prompts/*.md",
]
[tool.hatch.build]
artifacts = [
"src/tunacode/configuration/models_registry.json",
]
[tool.semantic_release]
version_variables = [
"src/tunacode/constants.py:APP_VERSION",
]
version_toml = [
"pyproject.toml:project.version",
]
branch = "master"
changelog_file = "CHANGELOG.md"
build_command = "python -m build"
dist_path = "dist/"
upload_to_release = true
upload_to_pypi = false # Use existing publish workflow
remove_dist = false
commit_message = "chore(release): bump version to {version}"
commit_author = "github-actions <github-actions@github.com>"
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf", "docs", "style"]
[tool.semantic_release.branches.master]
match = "master"
prerelease = false
[dependency-groups]
dev = [
# Testing frameworks
"pytest>=9.0.1",
"pytest-cov",
"pytest-asyncio>=1.3.0",
"pytest-randomly>=3.15.0", # Test isolation - randomize test order
"pytest-timeout>=2.3.1", # Test isolation - prevent hanging tests
"pytest-json-report>=1.5.0", # JSON test reports for historical tracking
"hypothesis>=6.150.0",
# Code quality and linting
"ruff==0.14.9",
"mypy",
"bandit",
"pylint>=4.0.4",
"deptry>=0.12.0", # Unused dependencies detection
"grimp>=3.14",
# Dead code detection
"vulture>=2.7",
"unimport>=1.0.0",
"autoflake>=2.0.0",
"dead>=1.5.0",
# Development tools
"pre-commit",
"textual-dev",
# Build and distribution
"build",
"twine",
]