-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
142 lines (131 loc) · 3.35 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "tmt-web"
dynamic = ["version"]
description = 'Web app for checking tmt tests, plans and stories'
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
keywords = []
authors = [
{ name = "Petr Splichal", email = "[email protected]" },
{ name = "Tomas Koscielniak", email = "[email protected]" }
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.12",
"Framework :: FastAPI",
"Framework :: Celery",
"Topic :: Software Development :: Testing",
"Operating System :: POSIX :: Linux",
]
dependencies = [
"tmt~=1.36",
"fastapi~=0.115",
"httpx~=0.27",
"uvicorn~=0.30",
"celery[redis]~=5.4",
]
[project.urls]
Source = "https://github.com/teemtee/web teemtee/tmt-web"
[tool.hatch.version]
source = "vcs"
raw-options.version_scheme = "release-branch-semver"
[tool.hatch.envs.dev]
extra-dependencies = [
"pre-commit",
"mypy~=1.11.2",
"ruff~=0.6",
"hatch",
"podman-compose",
"pytest",
]
post-install-commands = [
"pre-commit install",
]
[tool.hatch.envs.test]
extra-dependencies = [
"podman-compose",
"pytest",
]
[tool.hatch.envs.test.scripts]
run = "podman-compose down && podman-compose up -d --build && pytest"
check = "mypy --install-types --non-interactive src/tmt_web"
[tool.ruff]
# Based on teemtee/tmt/pyproject.toml
line-length = 100
target-version = "py312"
lint.select = [
"F", # pyflakes
"E", # pycodestyle error
"W", # pycodestyle warning
"I", # isort
"N", # pep8-naming
#"D", # pydocstyle TODO
"UP", # pyupgrade
"YTT", # flake8-2020
"ASYNC", # flake8-async
"S", # flake8-bandit
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"G", # flake8-logging-format
"PIE", # flake8-pie
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q003", # avoidable-escaped-quote
"Q004", # unnecessary-escaped-quote
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"INT", # flake8-gettext
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PLC", # pylint-convention
"PLE", # pylint-error
"PLR", # pylint-refactor
"FLY", # flynt
"FAST", # FastAPI (in preview)
"PERF", # Perflint
"RUF", # ruff
]
lint.ignore = [
#"E501", # TODO line lenght
"PLR0913", # Too many arguments
"RET505", # Unnecessary 'else' after 'return'
"COM812", # Trailing comma missing
]
[tool.ruff.lint.per-file-ignores]
# Less strict security checks in tests
"tests/*" = [
"S101", # Assert usage
"PLR2004", # Magic value
"E501", # Line length
]
"src/tmt_web/generators/html_generator.py" = [
"W291", # Trailing whitespace
"E501", # Line length
]
[tool.mypy]
plugins = [
"pydantic.mypy"
]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
python_version = "3.12"
files = ["src/", "tests/"]