Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (163 loc) · 5.56 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (163 loc) · 5.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
[build-system]
requires = ["setuptools>=77.0.1", "wheel", "build"]
build-backend = "setuptools.build_meta"
[project]
# Do not add spaces around the '=' sign for any of the fields
# preceded by a marker comment as it affects the publish workflow.
#replace_package_name_marker
name="gepa"
#replace_package_version_marker
version="0.1.4"
description = "A framework for optimizing textual system components (AI prompts, code snippets, etc.) using LLM-based reflection and Pareto-efficient evolutionary search."
readme = "README.md"
authors = [
{ name = "Lakshya A Agrawal", email = "lakshyaaagrawal@berkeley.edu" }
]
license = { text = "MIT" }
requires-python = ">=3.10, <3.15"
dependencies = []
[project.optional-dependencies]
full = [
# Common dependencies (all Python versions)
# litellm 1.92.0 added a native extension and shipped manylinux wheels only.
# Later releases publish Linux (manylinux + musl), macOS (x86_64 and
# arm64), and Windows amd64 wheels, including Python 3.14 (cp314 from
# 1.93.2, cp310-abi3 from 1.96.2; requires-python >=3.10,<3.15). These
# releases still omit macOS and musl wheels, and 1.92.0, 1.92.1, and
# 1.93.0 omit Windows too, so pip builds an sdist that needs Rust:
# 1.92.0, 1.92.1, 1.93.0, 1.93.1, 1.94.0, 1.94.1, 1.95.0
# 1.92.2 stays allowed: full platform wheels and requires-python <3.14.
# No win_arm64 wheel exists; Windows on ARM still builds from source.
# Re-check https://pypi.org/pypi/litellm/<version>/json before dropping
# an exclusion.
"litellm>=1.83.0,!=1.92.0,!=1.92.1,!=1.93.0,!=1.93.1,!=1.94.0,!=1.94.1,!=1.95.0",
# gepa.lm.LM passes num_retries to litellm, whose retry path imports tenacity
# without declaring it as a dependency.
"tenacity>=8.0.0",
"tqdm>=4.66",
"cloudpickle>=3.0.0",
# Python < 3.14
"datasets>=2.14.6; python_version < '3.14'",
"mlflow>=3.11.1; python_version < '3.14'",
"wandb; python_version < '3.14'",
# Python 3.14+ (higher floors / alternative packages needed for compatibility)
"datasets>=4.5.0; python_version >= '3.14'",
"pandas>=2.3.3; python_version >= '3.14'",
"mlflow-skinny>=3.11.1; python_version >= '3.14'",
"wandb>=0.23.0; python_version >= '3.14'",
"pyarrow>=22.0.0; python_version >= '3.14'",
"pydantic>=2.12.0; python_version >= '3.14'",
"tiktoken>=0.12.0; python_version >= '3.14'",
]
confidence = [
"llm-structured-confidence>=0.4.5",
# See the litellm comment in the `full` extra (exclude incomplete wheels).
"litellm>=1.64.0,!=1.92.0,!=1.92.1,!=1.93.0,!=1.93.1,!=1.94.0,!=1.94.1,!=1.95.0; python_version < '3.14'",
"litellm>=1.81.0,!=1.92.0,!=1.92.1,!=1.93.0,!=1.93.1,!=1.94.0,!=1.94.1,!=1.95.0; python_version >= '3.14'",
"tenacity>=8.0.0",
]
dspy = []
test = [
"gepa[full]",
"pytest",
"pyright",
# Exercises the psutil-backed child-process cleanup in
# gepa.utils.code_execution (see tests/test_code_execution.py).
"psutil>=5.9.0"
]
build = [
"setuptools>=77.0.1",
"wheel",
"build",
"twine",
"semver",
"packaging",
"requests>=2.33.0"
]
dev = [
"gepa[test]",
"gepa[build]",
"pre-commit",
"build>=1.0.3",
"ruff>=0.3.0"
]
gskill = [
"gepa[full]",
"swesmith",
"docker",
"python-dotenv",
"pyyaml",
]
langchain = [
"langchain>=1.0",
"langchain-core>=1.0",
"tqdm>=4.66",
]
[project.urls]
"Homepage" = "https://github.com/gepa-ai/gepa"
"Bug Tracker" = "https://github.com/gepa-ai/gepa/issues"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
gepa = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"llm_live: calls a live language model; skipped by default CI",
"extra: needs optional extra dependencies; skipped by default CI",
]
[tool.ruff]
include = ["src/**/*.py"]
line-length = 120
indent-width = 4
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
"N", # pep8-naming
"RUF", # ruff-specific rules
"Q", # flake8-quotes
]
ignore = [
"B027", # Allow non-abstract empty methods in abstract base classes
"FBT003",# Allow boolean positional values in function calls
"C901", # Ignore complexity checking
"E501", # Ignore line length errors (handled by formatter)
"UP035", # Allow python typing modules
"RUF005", # Allow using + operator to concatenate collections
"B904", # Allow raise custom exceptions in except blocks
"F403", # Allow wildcard imports
"E721", # Allow using == to compare with type
"UP031", # Allow percent format
"RUF022", # Allow unsorted __all__ value
"E731"
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.format]
docstring-code-format = false
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
known-first-party = ["gepa"]
known-third-party = ["dspy"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # Allow assert statements in tests
"TID252", # Allow relative imports in tests
"ARG001", # Allow unused arguments in tests (like pytest fixtures)
]
"__init__.py" = ["F401"] # Init files can be empty
"src/gepa/gskill/**/*.py" = ["E402"] # gskill suppresses logging before imports
"examples/**/*.py" = ["E402"] # Jupyter-notebook-style scripts import mid-file