-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
130 lines (115 loc) · 2.83 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
[project]
name = "itmo-ai-timetable"
version = "0.1.0"
description = "Default template for PDM package"
authors = [
{name = "Roman Solomatin", email = "[email protected]"},
]
requires-python = ">=3.10"
readme = "README.md"
license = {text = "MIT"}
dependencies = [
"ics>=0.7.2",
"pytz>=2024.1",
"openpyxl>=3.1.5",
"pydantic>=2.8.2",
"pydantic-settings>=2.4.0",
"gcsa>=2.3.0",
"sqlalchemy>=2.0.32",
"alembic>=1.13.2",
"asyncpg>=0.29.0",
"python-telegram-bot[job-queue]>=21.5",
]
scripts = { cli="src.itmo_ai_timetable.cli:main" }
[tool.pdm.dev-dependencies]
lint = [
"ruff>=0.6.2",
"pre-commit>=3.8.0",
]
typing = [
"mypy>=1.11.1",
"types-openpyxl>=3.1.5.20240822",
"types-pytz>=2024.1.0.20240417",
"types-python-dateutil>=2.9.0.20240821",
"sqlalchemy[mypy]>=2.0.32",
]
test = [
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
"pytest-async>=0.1.1",
"pytest-asyncio>=0.24.0",
# for creating test db
"sqlalchemy-utils>=0.41.2",
"psycopg2-binary>=2.9.9",
]
cources_processor = [
"pandas>=2.2.2",
]
[tool.pdm.scripts]
lint_local.composite = [
"ruff format",
"ruff check",
"mypy src",
]
lint = {cmd = [
"pre-commit", "run", "--all-files",
]}
test = { cmd = [
"pytest", "--cov=src"
]}
test_html = { cmd = [
"pytest", "--cov=src", "--cov-report=html"
]}
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra" # --cov breaks pycharm test debugger
testpaths = [
"tests",
]
log_format = "%(asctime)s %(levelname)s %(message)s"
#log_level = "INFO"
pythonpath = "itmo_ai_timetable"
asyncio_mode = "auto"
[tool.coverage.run]
branch = true
omit = [
"__init__.py",
"src/itmo_ai_timetable/db/migrations/versions/*",
]
[tool.coverage.paths]
source = [
"src/",
]
[tool.coverage.report]
skip_empty = true
[tool.ruff]
fix = true
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select= ["ALL"]
ignore = ["D", "EM", "TRY", "G", "COM812", "ISC001"]
allowed-confusables = ["а", "с", "е", "З", "о", "г", "х", "у", "А", "С", "Е", "З", "О", "Р", "В", "М", "К", "р", "В"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F405", "F403", "D"]
"tests/*.py" = ["S", "PLR2004", "ERA", "D", "ANN", "SLF"]
"src/itmo_ai_timetable/db/migrations/versions/*.py" = ["N999"]
"courses_processor/*.py" = ["PTH", "T201", "PLW2901", "RUF003", "INP001"]
"src/itmo_ai_timetable/gcal.py" = ["ERA001"]
"src/itmo_ai_timetable/schedule_parser.py" = ["ERA001"]
[tool.ruff.lint.isort]
known-first-party = ["itmo_ai_timetable"]
known-third-party = ["sqlalchemy", "pydantic", "alembic", "asyncpg", "gcsa", "ics", "openpyxl", "pytz"]
[tool.ruff.lint.pylint]
max-args = 10
[tool.mypy]
python_version = "3.10"
strict = true
mypy_path = "src/"
plugins = [
"pydantic.mypy",
"sqlalchemy.ext.mypy.plugin",
]
exclude = [
"tests",
]