-
Notifications
You must be signed in to change notification settings - Fork 12
/
pyproject.toml
117 lines (96 loc) · 3.02 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
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "codebleu"
description = "Unofficial CodeBLEU implementation that supports Linux, MacOS and Windows available on PyPI."
readme = "README.md"
license = {text = "MIT License"}
authors = [
{name = "Konstantin Chernyshev", email = "kdchernyshev+github@gmail.com"},
]
keywords = ["codebleu", "code", "bleu", "nlp", "natural language processing", "programming", "evaluate", "evaluation", "code generation", "metrics"]
dynamic = ["version"]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Typing :: Typed"
]
dependencies = [
"tree-sitter >=0.22.0,<0.24.0",
"setuptools >=61.0.0", # distutils removed in 3.12, but distutils.ccompiler used in tree-sitter
]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["."]
include = ["codebleu", "codebleu.parser"]
exclude = ["tests", "tests.*", "codebleu.parser.tree-sitter"]
[tool.setuptools.package-data]
"*" = ["py.typed", "*.txt", "keywords/*"]
[project.scripts]
codebleu = "codebleu.__main__:main"
[project.urls]
homepage = "https://github.com/k4black/codebleu"
[project.optional-dependencies]
all = [
"tree-sitter-python ~=0.21",
"tree-sitter-go ~=0.21",
"tree-sitter-javascript ~=0.21",
"tree-sitter-ruby ~=0.21",
"tree-sitter-php ~=0.22",
"tree-sitter-java ~=0.21",
"tree-sitter-c-sharp ~=0.21",
"tree-sitter-c ~=0.21",
"tree-sitter-cpp ~=0.22",
"tree-sitter-rust ~=0.21",
]
test = [
"pytest >=7.0.0,<9.0.0",
"pytest-cov >=4.0.0,<6.0.0",
"pytest-mock >=3.0.0,<4.0.0",
"pytest-timeout >=2.0.0,<3.0.0",
"black ==24.10.0",
"mypy >=1.0.0,<2.0.0",
"types-tree-sitter",
"flake8 >=6.0.0,<8.0.0",
"ruff >=0.5.1,<0.8.0",
"isort >=5.0.0,<6.0.0",
"nltk >=3.0.0,<4.0.0",
]
[tool.setuptools.dynamic]
version = {file = "VERSION"}
[mypy]
ignore_missing_imports = true
no_incremental = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = false
disallow_any_generics = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
allow_untyped_decorators = true
exclude = ["codebleu/parser/tree-sitter", "codebleu/parser/tree-sitter/python", "tree_sitter"]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "--cov=codebleu/ --cov-report term-missing"
[tool.coverage.run]
omit = ["tests/*", "codebleu/parser/tree-sitter/*", "tree_sitter"]
[tool.isort]
profile = "black"
src_paths = ["codebleu", "tests"]
known_first_party = ["codebleu", "tests"]
line_length = 120
combine_as_imports = true
skip = ["build", "dist", ".venv", ".eggs", ".mypy_cache", ".pytest_cache", ".git", ".tox", ".nox", "codebleu/parser", "tree_sitter"]
[tool.black]
line_length=120
target_version=["py38","py39","py310","py311", "py312"]
[tool.ruff]
line-length=120