-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
233 lines (212 loc) · 5.24 KB
/
pyproject.toml
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
[tool]
[tool.poetry]
name = "codeflash"
version = "0.0.0" # Determined by poetry-dynamic-versioning during `poetry build`
description = "Client for codeflash.ai - automatic code performance optimization, powered by AI"
license = "BSL-1.1"
authors = ["CodeFlash Inc. <[email protected]>"]
homepage = "https://codeflash.ai"
readme = "README.md"
packages = [{ include = "codeflash", format = ["sdist"] }]
keywords = [
"codeflash",
"performance",
"optimization",
"ai",
"code",
"machine learning",
"LLM",
]
exclude = [
"docs/*",
"experiments/*",
"tests/*",
"*.pyc",
"__pycache__",
"*.pyo",
"*.pyd",
"*.so",
"*.dylib",
"*.dll",
"*.exe",
"*.log",
"*.tmp",
".env",
".env.*",
"**/.env",
"**/.env.*",
".env.example",
"*.pem",
"*.key",
"secrets.*",
"config.yaml",
"config.json",
".git",
".gitignore",
".gitattributes",
".github",
"Dockerfile",
"docker-compose.yml",
"*.md",
"*.txt",
"*.csv",
"*.db",
"*.sqlite3",
"*.pdf",
"*.docx",
"*.xlsx",
"*.pptx",
"*.iml",
".idea",
".vscode",
".DS_Store",
"Thumbs.db",
"venv",
"env",
]
# Versions here the minimum required versions for the project. These should be as loose as possible.
[tool.poetry.dependencies]
python = ">=3.9"
unidiff = ">=0.7.4"
pytest = ">=7.0.0,!=8.3.4"
gitpython = ">=3.1.31"
libcst = ">=1.0.1"
jedi = ">=0.19.1"
tiktoken = ">=0.7.0"
timeout-decorator = ">=0.5.0"
pytest-timeout = ">=2.1.0"
tomlkit = ">=0.11.7"
unittest-xml-reporting = ">=3.2.0"
junitparser = ">=3.1.0"
pydantic = ">=1.10.1"
humanize = ">=4.0.0"
posthog = ">=3.0.0"
click = ">=8.1.0"
inquirer = ">=3.0.0"
sentry-sdk = ">=1.40.6,<3.0.0"
parameterized = ">=0.9.0"
isort = ">=5.11.0"
dill = ">=0.3.8"
rich = ">=13.8.1"
lxml = ">=5.3.0"
crosshair-tool = ">=0.0.78"
coverage = ">=7.6.4"
line_profiler=">=4.2.0" #this is the minimum version which supports python 3.13
[tool.poetry.group.dev]
optional = true
# Don't forget to install the poetry plugins we use too:
# poetry self add poetry-dynamic-versioning
[tool.poetry.group.dev.dependencies]
ipython = ">=8.12.0"
mypy = ">=1.13"
ruff = ">=0.7.0"
lxml-stubs = ">=0.5.1"
pandas-stubs = ">=2.2.2.240807, <2.2.3.241009"
types-Pygments = ">=2.18.0.20240506"
types-colorama = ">=0.4.15.20240311"
types-decorator = ">=5.1.8.20240310"
types-jsonschema = ">=4.23.0.20240813"
types-requests = ">=2.32.0.20241016"
types-six = ">=1.16.21.20241009"
types-cffi = ">=1.16.0.20240331"
types-openpyxl = ">=3.1.5.20241020"
types-regex = ">=2024.9.11.20240912"
types-python-dateutil = ">=2.9.0.20241003"
pytest-cov = "^6.0.0"
pytest-benchmark = ">=5.1.0"
types-gevent = "^24.11.0.20241230"
types-greenlet = "^3.1.0.20241221"
types-pexpect = "^4.9.0.20241208"
types-unidiff = "^0.7.0.20240505"
uv = ">=0.6.2"
[tool.poetry.build]
script = "codeflash/update_license_version.py"
[tool.poetry.scripts]
codeflash = "codeflash.main:main"
[tool.mypy]
show_error_code_links = true
pretty = true
show_absolute_path = true
show_error_context = true
show_error_end = true
strict = true
warn_unreachable = true
install_types = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = ["jedi", "jedi.api.classes", "inquirer", "inquirer.themes", "numba"]
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.ruff]
line-length = 120
fix = true
show-fixes = true
exclude = ["code_to_optimize/", "pie_test_set/", "tests/"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"C901",
"D100",
"D101",
"D102",
"D103",
"D105",
"D107",
"D203", # incorrect-blank-line-before-class (incompatible with D211)
"D213", # multi-line-summary-second-line (incompatible with D212)
"S101",
"S603",
"S607",
"COM812",
"FIX002",
"PLR0912",
"PLR0913",
"PLR0915",
"TD002",
"TD003",
"TD004",
"PLR2004",
"UP007" # remove once we drop 3.9 support.
]
[tool.ruff.lint.flake8-type-checking]
strict = true
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
runtime-evaluated-decorators = ["pydantic.validate_call", "pydantic.dataclasses.dataclass"]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
"pydantic.validator",
]
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.poetry-dynamic-versioning]
enable = true
style = "pep440"
vcs = "git"
[tool.poetry-dynamic-versioning.substitution]
files = ["codeflash/version.py"]
[tool.poetry-dynamic-versioning.files."codeflash/version.py"]
persistent-substitution = true
initial-content = """
# These version placeholders will be replaced by poetry-dynamic-versioning during `poetry build`.
__version__ = "0.0.0"
__version_tuple__ = (0, 0, 0)
"""
[tool.codeflash]
module-root = "codeflash"
tests-root = "tests"
benchmarks-root = "tests/benchmarks"
test-framework = "pytest"
formatter-cmds = [
"uvx ruff check --exit-zero --fix $file",
"uvx ruff format $file",
]
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.2.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"