-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
248 lines (224 loc) · 8.56 KB
/
pyproject.toml
File metadata and controls
248 lines (224 loc) · 8.56 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
[project]
name = "gepa-adk"
version = "2.1.0"
description = "Evolutionary optimization for Google ADK agents"
readme = "README.md"
license = { text = "Apache-2.0" }
authors = [
{ name = "Alberto-Codes", email = "alberto.codes.dev@gmail.com" }
]
maintainers = [
{ name = "Alberto-Codes", email = "alberto.codes.dev@gmail.com" }
]
requires-python = ">=3.12,<3.14"
dependencies = [
"google-adk>=1.28.1,<2.0.0",
"litellm>=1.80.13",
"nest-asyncio>=1.6.0",
"structlog>=25.5.0",
]
keywords = [
"ai",
"agents",
"evolution",
"optimization",
"genetic-algorithm",
"prompt-engineering",
"adk",
"llm",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://github.com/Alberto-Codes/gepa-adk"
Documentation = "https://alberto-codes.github.io/gepa-adk/"
Repository = "https://github.com/Alberto-Codes/gepa-adk"
Issues = "https://github.com/Alberto-Codes/gepa-adk/issues"
Changelog = "https://github.com/Alberto-Codes/gepa-adk/releases"
[project.scripts]
gepa-adk = "gepa_adk:main"
[build-system]
requires = ["uv_build>=0.9.22,<0.11.0"]
build-backend = "uv_build"
[tool.uv]
constraint-dependencies = [
# GHSA-7wc2-qxgw-g8gg: Authlib < 1.6.7 vulnerable
"authlib>=1.6.7",
]
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true
[tool.ruff]
line-length = 88 # Formatter target
target-version = "py312"
exclude = [".uv-cache", ".venv", "__pycache__", "*.egg-info"]
[tool.ruff.lint]
# I = isort (import sorting), D = pydocstyle (docstrings), E501 = line length
extend-select = ["E501", "I", "D"]
[tool.ruff.lint.pycodestyle]
max-line-length = 100 # Linter threshold (allow some flexibility)
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["S101"]
[tool.ruff.lint.isort]
known-first-party = ["gepa_adk"]
[tool.ruff.format]
quote-style = "double"
docstring-code-format = true
docstring-code-line-length = "dynamic"
# Ty type checker configuration (ty 0.0.18)
# Remaining overrides are for genuine ty limitations with dynamic types and test patterns
[tool.ty.src]
include = ["src", "tests"]
exclude = [
"scripts/", # Utility scripts - not production code
]
# Override for test files - relax rules for dynamic types, negative-path tests, and Optional guards
[[tool.ty.overrides]]
include = ["tests/**"]
[tool.ty.overrides.rules]
# Tests for deserialize_schema() access attributes on dynamically created BaseModel subclasses
# ty can't know the runtime type has these fields - confirmed by passing tests
unresolved-attribute = "ignore"
# Tests deliberately pass wrong types to verify error handling (e.g., string instead of class)
invalid-argument-type = "ignore"
# Tests subscript content.parts which ty sees as Optional — runtime asserts guard this
not-subscriptable = "ignore"
# Tests use `in` on Optional fields — runtime asserts guard this
unsupported-operator = "ignore"
# Override for examples with dynamic schema execution
[[tool.ty.overrides]]
include = ["examples/schema_evolution_example.py"]
[tool.ty.overrides.rules]
# deserialize_schema() returns type[BaseModel] but actual class has dynamic fields
# ty can't resolve attributes on dynamically created types - this is expected
unresolved-attribute = "ignore"
[tool.docvet]
fail-on = ["enrichment", "freshness", "coverage", "griffe", "presence"]
[tool.docvet.enrichment]
# ruff D417 requires *args/**kwargs to be documented; include them in
# docvet's signature-vs-Args agreement check so the two don't conflict.
exclude-args-kwargs = false
# Document **kwargs inline in Args (ruff D417 convention) rather than in
# a separate Other Parameters section.
require-other-parameters = false
[tool.docvet.presence]
min-coverage = 100.0
[tool.uv-secure.vulnerability_criteria]
ignore_vulnerabilities = [
"PYSEC-2026-161", # starlette 0.52.1 — DoS via MultiPartParser. Fix in 1.0.1 but blocked by fastapi 0.135.1 pin to <1.0.
]
allow_unused_ignores = false
[tool.hatch.envs.default.scripts]
[dependency-groups]
dev = [
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
"ty>=0.0.1a20",
"ruff>=0.13.0",
"pytest-xdist>=3.8.0",
"python-dotenv>=1.1.1",
"pytest-cov>=7.0.0",
"arize-phoenix-client",
"pytest-timeout>=2.4.0",
"pytest-profiling>=1.8.1",
"pytest-mock>=3.15.1",
"mkdocs-material>=9.7.1",
"mkdocstrings>=1.0.0",
"mkdocstrings-python>=2.0.1",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.1",
"mkdocs-section-index>=0.3.9",
"mkdocs-git-revision-date-localized-plugin>=1.4.7",
"mkdocs-minify-plugin>=0.8.0",
"mkdocs-redirects>=1.2.1",
"mkdocs-glightbox>=0.4.0",
"mkdocs-macros-plugin>=1.3.7",
"pillow>=11.0.0",
"cairosvg>=2.7.1",
"griffe-warnings-deprecated>=1.1.0",
"griffe-inherited-docstrings>=1.1.2",
"mkdocs-ezglossary-plugin>=2.1.0",
"gepa>=0.0.24",
# Pin requests to avoid buggy 2.32.5 version (missing JSONDecodeError/Mapping in compat.py)
# See: https://github.com/psf/requests/issues/issues
"requests>=2.32.0,!=2.32.5",
"uv-secure>=0.17.0",
"docvet[lsp,mcp]>=1.15.1",
"griffe>=2.0.2",
]
[tool.pytest.ini_options]
markers = [
"unit: Unit tests - fast, isolated",
"contract: Contract tests verifying interface compliance",
"integration: Integration tests with real databases",
"slow: Slow-running tests (execution, API calls)",
"api: Tests that make real API calls to external services (Gemini, Ollama, etc.) - excluded by default",
"requires_ollama: Tests requiring local Ollama service",
"requires_gemini: Tests requiring Gemini API (video, native planning)",
]
# Exclude API tests by default to avoid accidental quota usage
addopts = "-m 'not api'"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
# Deprecation warning strategy: treat all warnings as errors, explicitly ignore third-party issues.
# Each ignored warning MUST have a tracking issue. See CONTRIBUTING.md for the full process.
# Pattern: "ignore:message_regex:WarningClass:module_regex"
filterwarnings = [
# Treat all warnings as errors by default - new warnings will fail CI
"error",
#
# === Third-party warning ignores (each with tracking issue) ===
#
# Pydantic v2 deprecation warnings from LiteLLM/ADK - Issue #118
# Upstream uses Pydantic v1 patterns; remove when they migrate to v2
"ignore:.*PydanticDeprecatedSince20.*:DeprecationWarning",
"ignore:.*Pydantic.*serialization.*:UserWarning",
"ignore:.*Pydantic.*serializer.*:UserWarning",
"ignore::UserWarning:pydantic.*",
"ignore:.*Pydantic.*:UserWarning",
"ignore:^deprecated$:DeprecationWarning:pydantic.*", # Generic "deprecated" from pydantic internals
"ignore:^deprecated$:DeprecationWarning:google.adk.*", # Pydantic deprecated field in ADK RunConfig - Issue #125
#
# Google genai SDK aiohttp subclassing - Issue #118 (bundled with Pydantic/ADK issues)
# google.genai._api_client subclasses aiohttp.ClientSession which is deprecated
"ignore:Inheritance class.*from ClientSession is discouraged:DeprecationWarning",
#
# ADK experimental feature warnings - Issue #119
# We intentionally use experimental ADK features (ADR-014); these are informational
"ignore:.*adk.*\\[EXPERIMENTAL\\].*:UserWarning",
"ignore:.*adk.*experimental.*:UserWarning",
#
# LiteLLM async cleanup warnings - Issue #120
# Known upstream bugs: https://github.com/BerriAI/litellm/issues/8831, #14276
"ignore:coroutine.*was never awaited:RuntimeWarning",
#
# Async test cleanup warnings (unclosed sockets/event loops) - Issue #120
# Common with async tests using LiteLLM/ADK; not actionable in test code
"ignore::ResourceWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
#
# Misc third-party async cleanup warnings - Issue #120
"ignore:.*tracemalloc.*:UserWarning",
"ignore:enable_cleanup_closed.*:DeprecationWarning",
#
# === gepa-adk internal deprecations ===
#
# evolve_sync() deprecated in favor of run_sync() — Story 2.6
"ignore:evolve_sync\\(\\) is deprecated:DeprecationWarning",
]