-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
99 lines (80 loc) · 2.62 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
# pyproject.toml
# url: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
# url: https://python-poetry.org/docs/pyproject/
[tool.poetry]
name = "solid-state-kinetics"
version = "0.1.0"
description = "calculating kinetic models of chemical solid-state reactions"
authors = ["kdavjd <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{ include = "*", from = "src" }]
[tool.poetry.scripts]
ssk-gui = "gui.__main__:main"
[tool.poetry.dependencies]
python = ">=3.12,<3.13"
pyqt6 = "^6.6.1"
matplotlib = "3.8.3"
pandas = "^2.2.1"
numpy = "^1.26.4"
scienceplots = "^2.1.1"
chardet = "^5.2.0"
scipy = "^1.13.1"
pyinstaller = "^6.7.0"
[tool.poetry.dev-dependencies]
pre-commit = "^3.6.2"
pytest = "^8.0.2"
mypy = "^1.8.0"
ruff = "^0.5.1"
black = "^24.8.0"
[tool.ruff]
target-version = "py312"
line-length = 120
# Включаем максимальное количество проверок.
lint.select = [
"E", # Ошибки стиля (PEP 8)
"W", # Предупреждения (PEP 8)
"F", # Ошибки (например, Flake8)
"C", # Сложность кода (например, цикломатическая сложность)
#"N", Проверка именования (например, переменные, функции)
"I", # Сортировка импортов (isort)
"Q", # Quirks (редкие ошибки)
#"UP", Совместимость с новыми версиями Python
"A", # Аннотации типов
"M", # Паттерны метрик
#"T", Типизация
#"R",Проверки для неудачных конструкций
#"U", Устаревшие конструкции
]
fix = true
lint.external = ["black"]
exclude = [
".git",
"pycache",
"build",
"dist",
"venv",
".venv",
]
# Проверка цикломатической сложности.
lint.extend-select = ["C901"]
[tool.black]
line-length = 120
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# https://mypy.readthedocs.io/en/stable/config_file.html#example-pyproject-toml
[tool.mypy]
python_version = "3.12"
cache_dir = "/tmp/pytest-cache"
# https://docs.pytest.org/en/latest/reference/customize.html
[tool.pytest.ini_options]
cache_dir = "/tmp/pytest-cache"
addopts = "--verbose --exitfirst"
testpaths = "tests/"
log_cli = 1
log_cli_level = "DEBUG"
log_cli_format = "[%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
# Specify a score threshold under which the program will exit with error.
fail-under = 9
extension-pkg-whitelist = ["PyQt6"]