-
Notifications
You must be signed in to change notification settings - Fork 155
/
pyproject.toml
201 lines (176 loc) · 4.25 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
####################
# Build System #
####################
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
####################
# Metadata #
####################
[project]
name = "validators"
description = "Python Data Validation for Humans™"
authors = [{ name = "Konsta Vesterinen", email = "konsta@fastmonkeys.com" }]
license = { text = "MIT" }
readme = "README.md"
keywords = ["validation", "validator", "python-validator"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dynamic = ["version"]
dependencies = []
[project.urls]
Homepage = "https://python-validators.github.io/validators"
Documentation = "https://yozachar.github.io/pyvalidators"
Repository = "https://github.com/python-validators/validators"
Changelog = "https://github.com/python-validators/validators/blob/master/CHANGES.md"
###########################
# Optional Dependencies #
###########################
[project.optional-dependencies]
crypto-eth-addresses = ["eth-hash[pycryptodome]>=0.7.0"]
##############################
# Development Dependencies #
##############################
[tool.pdm.dev-dependencies]
docs-offline = [
"myst-parser>=3.0.1",
"pypandoc-binary>=1.13",
"sphinx>=7.1.2",
"furo>=2024.8.6",
]
docs-online = [
"mkdocs>=1.6.1",
"mkdocs-git-revision-date-localized-plugin>=1.2.7",
"mkdocs-material>=9.5.34",
"mkdocstrings[python]>=0.26.0",
"mike>=2.1.3",
]
package = ["build>=1.2.1"]
runner = ["tox>=4.18.0"]
sast = ["bandit[toml]>=1.7.9"]
testing = ["pytest>=8.3.2"]
tooling = [
"black>=24.8.0",
"ruff>=0.6.3",
"pyright>=1.1.378",
"pytest>=8.3.2",
"pypandoc-binary>=1.13", # helps with type checking
]
####################
# Configurations #
####################
[tool.setuptools.packages.find]
where = ["src"]
include = ["validators*"]
namespaces = false
[tool.setuptools.package-data]
validators = ["py.typed", "_tld.txt"]
[tool.setuptools.dynamic]
version = { attr = "validators.__version__" }
[tool.bandit]
exclude_dirs = [
".github",
".pytest_cache",
".tox",
".venv",
".venv.dev",
".vscode",
"site",
"tests",
]
[tool.black]
line-length = 100
target-version = ["py38", "py39", "py310", "py311", "py312"]
[tool.pyright]
extraPaths = ["src"]
exclude = [
"**/__pycache__/",
".pytest_cache/",
".tox/",
".venv/",
".venv.dev/",
"site/",
]
pythonVersion = "3.8"
pythonPlatform = "All"
typeCheckingMode = "strict"
[tool.pytest.ini_options]
pythonpath = ["src"]
[tool.ruff]
lint.select = [
# Pyflakes
"F",
# pycodestyle
"W",
"E",
# mccabe
# C90
# isort
"I",
# pep8-naming
"N",
# pydocstyle
"D",
]
line-length = 100
target-version = "py38"
extend-exclude = ["**/__pycache__", ".pytest_cache", "site"]
[tool.ruff.lint.isort]
# case-sensitive = true
combine-as-imports = true
force-sort-within-sections = true
force-wrap-aliases = true
known-local-folder = ["src"]
relative-imports-order = "closest-to-furthest"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.tox]
legacy_tox_ini = """
[tox]
requires =
tox>=4
env_list = lint, type, format, sast, py{38,39,310,311,312}
[testenv:lint]
description = ruff linter
deps =
ruff
commands = ruff check .
[testenv:type]
description = pyright type checker
deps =
pyright
pypandoc-binary
pytest
.[crypto-eth-addresses]
commands = pyright .
[testenv:format]
description = code formatter
deps =
black
commands = black .
[testenv:sast]
deps =
bandit[toml]
commands = bandit -c pyproject.toml -r .
[testenv]
description = unit tests
deps =
pytest
.[crypto-eth-addresses]
commands = pytest .
"""