-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
143 lines (127 loc) · 2.59 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
[tool.poetry]
name = "text-prompt-generator"
version = "0.2.0"
description = ""
authors = ["s7500 <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
numpy = "1.26.4"
torch = "==2.5.1"
huggingface-hub = "==0.*"
transformers = "==4.48.3"
protobuf = "==5.29.3"
tqdm = "4.67.1"
pytest = "8.3.4"
accelerate = "1.3.0"
loguru = "0.7.3"
nvitop = "1.4.2"
python-multipart = "0.0.20"
vllm = "0.7.2"
bitsandbytes = "0.45.2"
tensorizer = "^2.9.1"
groq = "^0.18.0"
discord-webhook = "1.3.1"
fastapi = "0.115.8"
uvicorn = "0.34.0"
[tool.poetry.group.dev.dependencies]
black = "==24.4.2"
ruff = "==0.5.1"
bandit = "==1.7.9"
mypy = "==1.9.0"
types-requests = "==2.31.0.0"
poethepoet = "==0.27.0"
types-PyYAML = "==6.0.12.20240808"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
target-version = ['py311']
line-length = 120
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.pytest_cache
| \.idea
| \.venv
| \.vscode
)/
'''
[tool.ruff]
target-version = "py311"
cache-dir = ".reports/ruff_cache"
line-length = 120
src = ["sources"]
namespace-packages = ["sources"]
fix = true
output-format = "full"
include = ["*.py"]
exclude = [
'.venv/.*',
"tests",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"I", # isort
"S", # flake8-bandit
"B", # flake8-bugbear
"Q", # flake8-quotes
"ASYNC", # flake8-async
"PTH", # flake8-use-pathlib
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude directories
exclude = [
".*",
"tests",
]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = []
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
combine-as-imports = true
lines-after-imports = 2
[tool.bandit]
skips = ["B104"]
exclude_dirs = [
"./.*/**",
"tests",
]
[tool.mypy]
cache_dir = ".reports/mypy_cache/"
ignore_missing_imports = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_unused_ignores = false
warn_return_any = true
warn_no_return = false
warn_unreachable = true
strict_equality = true
warn_redundant_casts = true
exclude = [
'.venv/.*',
"tests",
]
[[tool.mypy.overrides]]
module = [
"types-pyyaml",
]
ignore_errors = true
[tool.poe]
poetry_command = ""
[tool.poe.tasks.run-check]
help = "Run tests and try fix format"
ignore_fail = "return_non_zero"
sequence = [
{ cmd = "ruff check ." },
{ cmd = "black ." },
{ cmd = "bandit . -rq -c pyproject.toml" },
{ cmd = "mypy --junit-xml .reports/mypy-junit-report.xml ." },
]