codeflash/pyproject.toml
2024-08-11 17:08:21 -07:00

133 lines
3.1 KiB
TOML

[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. <contact@codeflash.ai>"]
homepage = "https://codeflash.ai"
readme = "README.md"
packages = [
{ include = "codeflash" },
]
keywords = ["codeflash", "performance", "optimization", "ai", "code", "machine learning", "LLM"]
# Don't forget to install the poetry plugins we use too:
# poetry self add poetry-dynamic-versioning
[tool.poetry.dependencies]
python = ">=3.9,<3.14"
unidiff = ">=0.7.4"
pytest = ">=7.0.0"
gitpython = ">=3.1.31"
libcst = ">=1.0.1"
jedi = ">=0.19.1"
tiktoken = ">=0.3.2"
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"
black = ">=22.3.0"
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"
returns = ">=0.22"
isort = ">=5.11.0"
dill = "^0.3.8"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
ipython = "^8.12.0"
mypy = "^1.9.0"
ruff = ">=0.5.0,<0.6.0"
ruff-lsp = ">=0.0.53,<0.0.55"
[tool.poetry.build]
script = "codeflash/update_license_version.py"
[tool.poetry.scripts]
codeflash = "codeflash.main:main"
[tool.mypy]
pretty = true
show_absolute_path = true
show_column_numbers = true
show_error_context = true
strict = true
warn_unreachable = true
plugins = [
"pydantic.mypy"
]
[[tool.mypy.overrides]]
module = [
"jedi",
"jedi.api.classes"
]
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.ruff.lint]
select = ["ALL"]
unfixable = ["F401"]
ignore = ["S101", "D103", "FIX002"]
[tool.ruff.lint.flake8-type-checking]
strict = true
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
runtime-evaluated-decorators = ["pydantic.validate_call"]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
"pydantic.validator",
]
[tool.ruff.lint.per-file-ignores]
"**/*" = ["D102"]
[tool.ruff]
line-length = 110
[tool.ruff.format]
docstring-code-format = 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"
test-framework = "pytest"
formatter-cmds = ["poetry run ruff check --exit-zero --fix $file", "poetry run 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"