Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (165 loc) · 4.49 KB
/
Copy pathpyproject.toml
File metadata and controls
190 lines (165 loc) · 4.49 KB
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
####################
# 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.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.11"
dynamic = ["version"]
dependencies = []
[project.urls]
Homepage = "https://python-validators.github.io/validators"
Documentation = "https://nandgator.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 #
##############################
[dependency-groups]
docs-offline = [
"myst-parser>=3.0.1",
"pypandoc-binary>=1.13",
"sphinx>=7.1.2",
"furo>=2024.8.6",
]
docs-online = [
"zensical>=0.0.69",
"mkdocstrings-python>=1.14.0", # `inventories` option replaces `import`
"mike", # Zensical-compatible fork, see `tool.uv.sources`
]
package = ["build>=1.2.1"]
runner = ["tox>=4.22"]
sast = ["bandit[toml]>=1.7.9"]
testing = ["pytest>=9.0.3"]
tooling = [
"ruff>=0.6.3",
"pyright>=1.1.378",
"pytest>=9.0.3",
"pypandoc-binary>=1.13", # helps with type checking
]
####################
# Configurations #
####################
[tool.uv.sources]
# Temporary: Zensical has no native versioning yet; this fork of `mike` bridges it.
mike = { git = "https://github.com/squidfunk/mike.git" }
[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.pyright]
extraPaths = ["src"]
exclude = [
"**/__pycache__/",
".pytest_cache/",
".tox/",
".venv/",
".venv.dev/",
"site/",
]
pythonVersion = "3.11"
pythonPlatform = "All"
typeCheckingMode = "strict"
[tool.pytest]
minversion = "9.0"
pythonpath = ["src"]
testpaths = ["tests"]
addopts = ["--doctest-modules"]
[tool.ruff]
lint.select = [
# Pyflakes
"F",
# pycodestyle
"W",
"E",
# mccabe
# C90
# isort
"I",
# pep8-naming
"N",
# pydocstyle
"D",
]
line-length = 100
target-version = "py311"
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]
requires = ["tox>=4.22"]
env_list = ["lint", "type", "format", "sast", "py311", "py312", "py313", "py314"]
[tool.tox.env.lint]
description = "ruff linter"
dependency_groups = ["tooling"]
commands = [["ruff", "check", "."]]
[tool.tox.env.type]
description = "pyright type checker"
dependency_groups = ["tooling"]
extras = ["crypto-eth-addresses"]
commands = [["pyright", "."]]
[tool.tox.env.format]
description = "code formatter"
dependency_groups = ["tooling"]
commands = [["ruff", "format", "."]]
[tool.tox.env.sast]
description = "bandit security checks"
dependency_groups = ["sast"]
commands = [["bandit", "-c", "pyproject.toml", "-r", "."]]
[tool.tox.env_run_base]
description = "unit tests"
dependency_groups = ["testing"]
extras = ["crypto-eth-addresses"]
commands = [["pytest", "."]]