-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
225 lines (200 loc) · 5.49 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
[tool.poetry]
name = "sanic-beskar"
version = "2.3.4-01"
description = "Strong, Simple, (now async!) and Precise security for Sanic APIs"
authors = ["Rob Dailey <[email protected]>"]
license = "MIT"
readme = "README.rst"
homepage = "https://sanic-beskar.readthedocs.io/en/latest/"
documentation = "https://sanic-beskar.readthedocs.io/en/latest/"
repository = "https://github.com/pahrohfit/sanic-beskar"
[tool.poetry.group.typing.dependencies]
types-ujson = ">=5.7"
types-toml = ">=0.10"
types-aiofiles = ">=23"
types-passlib = ">=1.7"
mongo-types = ">=0.15"
mypy = ">=1.3"
types-python-dateutil = ">=2.8.19.14"
[tool.poetry.group.dev.dependencies]
bcrypt = ">=4.0.1"
plummet = {version = ">=1.1", extras = ["time-machine"]}
sanic-testing = ">=23.3"
tortoise-orm = ">=0.19.2"
pytest-cov = ">=4.0.0"
umongo = ">=3.1.0"
motor = ">=3.1.0"
pytest-profiling = ">=1.7.0"
fastpbkdf2 = ">=0.2"
segno = ">=1.5.2"
pytest = ">=7.2.0"
beanie = ">=1.11.7"
mongomock-motor = ">=0.0.19"
mongomock = ">=4.1.2"
ipdb = ">=0.13.9"
bandit = {version = ">=1.7.4", extras = ["toml"]}
flake8-async = ">=22.11.6"
safety = ">=2.3"
async-sender = ">=2.0.0"
tox = ">=4.11.3"
pytest-sugar = ">=0.9.7"
alt-pytest-asyncio = ">=0.7.2"
[tool.poetry.group.docs.dependencies]
toml = ">=0.10.2"
sphinx = ">=7.1"
furo = ">=2023.5.20"
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'def __repr__',
]
[tool.mypy]
python_version = "3.11"
#disallow_untyped_defs = true
show_error_codes = true
#no_implicit_optional = true
#warn_return_any = true
warn_unused_ignores = true
pretty = true
color_output = true
exclude = ["docs/"]
[tool.poetry.dependencies]
python = ">=3.9, <4.0"
pyjwt = ">=2.6"
pendulum = [
{ version = ">=2.1, <3.0", allow-prereleases = true, python = ">=3.9,<3.12" },
{ version = "3.0.*", allow-prereleases = true, python = ">=3.12" },
]
passlib = ">=1.7"
sanic = ">=22.6.0"
pyseto = ">=1.6.9"
py-buzz = ">3.2.0"
cryptography = ">=39.0.0"
jinja2 = ">=3.1.2"
[build-system]
requires = ["poetry-core>=1.2"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
minversion = "7.1"
testpaths = [
"tests",
]
addopts = "--color=auto --code-highlight=yes"
filterwarnings = [
"ignore:::marshmallow.*",
"ignore:::umongo.*",
"ignore:::beanie.*",
"ignore:::tortoise.*",
"ignore:::httpx._models",
"ignore:::passlib.utils",
"ignore:::websockets.connection",
"ignore:::pkg_resources",
"ignore:::mongomock.__version__",
"ignore:::tracerite",
"ignore:::pydantic:798",
"ignore:::pydantic:249",
"ignore:::pydantic:3898",
"ignore:::xdist.plugin:252",
]
[tool.black]
line-length = 100
#preview-string-processing = true
target-version = ['py39']
#include = ['sanic_beskar/', 'tests']
[tool.bandit]
skips = ['B101']
exclude_dirs = ['tests/']
[tool.ruff]
line-length = 100
target-version = 'py39'
src = ["sanic_beskar", "tests"]
[tool.ruff.lint]
ignore = ["E501", "E402", "N818", "A002", "A003", "B904", "N805", "B006", "E712", "S106", "S105", "B028"]
exclude = [".mypy_cache", ".vscode", ".git", ".pytest_cache", ".github", "__pycache__", "example/*.py", "docs/*.py", "tests/*.py"]
select = ["E", "F", "B", "W", "I", "N", "UP", "ASYNC", "S", "A", "RSE", "RET"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["S101", "D100", "D102", "D101", "D103", "S311", "D104"]
[tool.interrogate]
ignore-init-method = true
ignore-init-module = false
ignore-magic = false
ignore-semiprivate = false
ignore-private = false
ignore-property-decorators = false
ignore-module = true
ignore-nested-functions = false
ignore-nested-classes = true
ignore-setters = false
fail-under = 100
exclude = ["setup.py", "docs", "build", "example"]
#ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
# possible values: 0 (minimal output), 1 (-v), 2 (-vv)
verbose = 2
quiet = false
whitelist-regex = []
color = true
omit-covered-files = false
generate-badge = "docs/_static"
badge-format = "svg"
python-version = 3.11
[tool.codespell]
skip = 'poetry.lock'
count = ''
quiet-level = 3
[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4
isolated_build = true
env_list =
pre-commit,
py3{9,10,11,12}-{tests},
py3{9}-{mypy},
coverage
[testenv]
description = defaults for all environments
skip_install = true
allowlist_externals = poetry, pre-commit
commands_pre =
poetry lock
poetry install --sync -v
set_env =
POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON = true
pass_env =
FORCE_COLOR
NO_COLOR
*
[testenv:py3{9,10,11,12}-tests]
labels = pytest
description = py3 sanic-beskar testing
commands =
poetry run pytest --cov=sanic_beskar --cov-report=html --cov-report=term tests/ {posargs}
[testenv:py3{9}-mypy]
labels = mypy
description = py3 mypy validation
commands =
poetry run mypy {posargs} sanic_beskar tests example
[testenv:pre-commit]
base_python = py39
description = pre-commit validations
skip_install = true
deps = pre-commit
commands = pre-commit run {posargs}
[testenv:docs]
description = sphinix build
changedir = docs
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html {posargs}
[testenv:coverage-report]
# Keep in sync with .python-version
base_python = py39
deps = coverage[toml]
skip_install = true
parallel_show_output = true
depends = py3{9,11}-{tests,mypy}
commands =
poetry run coverage combine
poetry run coverage report
"""