-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathpyproject.toml
More file actions
211 lines (191 loc) · 5.44 KB
/
pyproject.toml
File metadata and controls
211 lines (191 loc) · 5.44 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
[project]
name = "codegen"
dynamic = ["version", "urls"]
description = "Scriptable interface to a powerful, multi-lingual language server built on top of Tree-sitter"
readme = "README.md"
# renovate: datasource=python-version depName=python
requires-python = ">=3.12, <3.14"
dependencies = [
"codegen-api-client",
"typer>=0.12.5",
"rich>=13.7.1",
"textual>=0.91.0",
"hatch-vcs>=0.4.0",
"hatchling>=1.25.0",
# CLI and git functionality dependencies
"requests>=2.32.3",
"pydantic>=2.9.2",
"pydantic-settings>=2.0.0",
"PyGithub==2.6.1",
"GitPython==3.1.44",
"packaging>=24.2",
"python-dotenv>=1.0.1",
"giturlparse",
"codeowners>=0.6.0",
"unidiff>=0.7.5",
"datamodel-code-generator>=0.26.5",
"fastmcp>=2.9.0",
# OpenTelemetry logging dependencies
"opentelemetry-api>=1.26.0",
"opentelemetry-sdk>=1.26.0",
"opentelemetry-exporter-otlp>=1.26.0",
# Utility dependencies
"colorlog>=6.9.0",
"psutil>=5.8.0",
"sentry-sdk==2.29.1",
"humanize>=4.10.0",
]
# renovate: datasource=python-version depName=python
license = { text = "Apache-2.0" }
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Environment :: MacOS X",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Libraries",
]
authors = [{ name = "Codegen Team", email = "team@codegen.sh" }]
keywords = [
"codegen",
"codebase",
"codebase manipulation",
"codebase analysis",
"codebase transformation",
"refactoring",
"code generation",
]
[project.scripts]
codegen = "codegen.cli.cli:main"
cg = "codegen.cli.cli:main"
[project.optional-dependencies]
types = []
[tool.uv]
cache-keys = [{ git = { commit = true, tags = true } }]
dev-dependencies = [
"coverage<8.0.0,>=7.6.1",
"filelock<4.0.0,>=3.15.4",
"pytest>=8.3.3",
"pytest-cov>=6.1.0,<6.1.1",
"ruff>=0.6.8",
"ty>=0.0.1a10",
"pre-commit>=4.0.1",
"pytest-xdist>=3.6.1,<4.0.0",
"pytest-mock<4.0.0,>=3.14.0",
"pytest-timeout>=2.3.1",
"ruff-lsp<1.0.0,>=0.0.55",
"austin-python>=1.7.1",
"autoflake>=2.3.1",
"typer>=0.12.5",
"pre-commit-uv>=4.1.4",
"austin-dist>=3.7.0",
"uv>=0.4.25",
"deptry>=0.22.0",
"sybil[pytest]>=9.0.0",
"jsbeautifier<2.0.0,>=1.15.1",
"inflection<1.0.0,>=0.5.1",
"autoflake>=2.3.1",
"black>=24.8.0",
"isort>=5.13.2",
"emoji>=2.14.0",
"pytest-benchmark[histogram]>=5.1.0",
"pytest-asyncio>=0.21.1,<1.0.0",
"loguru>=0.7.3",
"httpx<0.28.2,>=0.28.1",
"jupyterlab>=4.3.5",
"modal>=0.73.25",
"pytest-lsp>=1.0.0b1",
"codegen-api-client>=1.0.0",
]
[tool.uv.workspace]
exclude = ["codegen-examples"]
[tool.coverage.run]
branch = true
concurrency = ["multiprocessing", "thread"]
parallel = true
sigterm = true
[tool.coverage.report]
skip_covered = true
skip_empty = true
exclude_also = [
"if TYPE_CHECKING:",
# Don't complain about missing debug-only code:
"def __repr__",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
[tool.coverage.html]
show_contexts = true
[tool.coverage.json]
show_contexts = true
[tool.pyright]
pythonVersion = "3.12"
enableExperimentalFeatures = true
[tool.pytest.ini_options]
# addopts = -v
pythonpath = "."
norecursedirs = "repos expected"
# addopts = -v --cov=app --cov-report=term
addopts = "--dist=loadgroup --junitxml=build/test-results/test/TEST.xml --strict-config --import-mode=importlib --cov-context=test --cov-config=pyproject.toml -p no:doctest"
filterwarnings = """
ignore::DeprecationWarning:botocore.*:
ignore::DeprecationWarning:sqlalchemy.*:
ignore::DeprecationWarning:posthog.*:"""
log_cli = true
log_cli_level = "INFO"
xfail_strict = true
junit_duration_report = "call"
junit_logging = "all"
tmp_path_retention_policy = "failed"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[build-system]
requires = ["hatchling>=1.26.3", "hatch-vcs>=0.4.0", "setuptools-scm>=8.0.0"]
build-backend = "hatchling.build"
[tool.deptry]
extend_exclude = [".*/eval/test_files/.*.py", ".*conftest.py"]
pep621_dev_dependency_groups = ["types"]
[tool.deptry.per_rule_ignores]
DEP002 = [
"hatch-vcs", # Used for version management during build
"hatchling", # Used for building
]
DEP003 = []
DEP004 = "pytest"
[tool.deptry.package_module_name_map]
PyGithub = ["github"]
GitPython = ["git"]
python-dotenv = ["dotenv"]
pydantic-settings = ["pydantic_settings"]
datamodel-code-generator = ["datamodel_code_generator"]
sentry-sdk = ["sentry_sdk"]
[tool.semantic_release]
assets = []
build_command_env = []
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
commit_parser = "angular"
logging_use_named_masks = false
major_on_zero = true
allow_zero_version = true
repo_dir = "."
no_git_verify = false
tag_format = "v{version}"
[tool.semantic_release.branches.develop]
match = "develop"
prerelease_token = "rc"
prerelease = false