-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
245 lines (226 loc) · 5.76 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
[project]
name = "valens"
description = "An app for tracking your health and training progress."
license = {text = "AGPL-3.0"}
authors = [
{name = "Tobias Reiher", email = "[email protected]"},
]
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Other/Nonlisted Topic",
]
dynamic = ["version"]
requires-python = ">=3.9, <4"
dependencies = [
"alembic >=1.6, <2",
"flask >=3, <4",
"sqlalchemy >=2, <3",
]
[project.scripts]
valens = "valens.cli:main"
[project.urls]
Homepage = "https://pypi.org/project/valens/"
Changelog = "https://github.com/treiher/valens/blob/main/CHANGELOG.md"
Issues = "https://github.com/treiher/valens/issues"
Repository = "https://github.com/treiher/valens"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.sdist]
ignore-vcs = true
include = [
"/valens",
]
[tool.hatch.build.targets.wheel]
artifacts = [
"/valens/frontend",
]
[tool.uv]
dev-dependencies = [
"black >=23.1",
"fabric >=3, <4",
"hatch >=1",
"mypy >=1",
"pytest >=5",
"pytest-alembic >=0.3.1",
"pytest-cov >=2.10.0",
"pytest-flakefinder >=1, <2",
"pytest-selenium >=4.0.2",
"pytest-xdist >=1.32.0",
"python-kacl >=0.4.6",
"ruff >=0.0.260",
"sqlalchemy[mypy] >=2, <3",
"types-selenium >=3",
]
[tool.black]
line-length = 100
target-version = ["py39", "py310", "py311", "py312"]
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.ruff]
target-version = "py39"
line-length = 100
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PGH", # pygrep-hooks
"PL", # pylint
"RUF", # ruff
]
fixable = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PL", # pylint
"RUF", # ruff
]
ignore = [
"D100", # public-module
"D101", # public-class
"D102", # public-method
"D103", # public-function
"D104", # public-package
"D105", # magic-method
"D106", # public-nested-class
"D107", # public-init
"D202", # no-blank-line-after-function
"D203", # one-blank-line-before-class
"D212", # multi-line-summary-first-line
"E741", # ambiguous-variable-name
"N812", # lowercase-imported-as-non-lowercase
"UP007", # typing-union
"B011", # assert-false
"ARG005", # unused-lambda-argument
"PLC0414", # useless-import-alias
"PLC1901", # compare-to-empty-string
"PLR2004", # magic-value-comparison
]
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.pylint]
max-args = 6
max-branches = 12
max-returns = 10
max-statements = 50
[tool.mypy]
check_untyped_defs = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
no_implicit_reexport = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
plugins = "sqlalchemy.ext.mypy.plugin"
[[tool.mypy.overrides]]
module = [
"pytest_alembic.*",
"sqlalchemy_repr.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "--tb=short"
filterwarnings = [
"ignore:Gdk.Cursor.new is deprecated",
"ignore:Gtk.Widget.set_double_buffered is deprecated",
"ignore:Gtk.Window.set_wmclass is deprecated",
"ignore:Gtk.Widget.size_request is deprecated",
]
[tool.coverage.paths]
source = ["valens"]
[tool.coverage.run]
branch = true
[tool.coverage.report]
show_missing = true
fail_under = 100
exclude_lines = [
"pragma: no cover",
"assert False",
"def __repr__",
"def __str__",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"return NotImplemented",
]