-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
172 lines (153 loc) · 4.66 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "django-otp-webauthn"
dynamic = ["version"]
readme = "README.md"
description = "FIDO2 WebAuthn support for django-otp: lets your users authenticate with Passkeys"
requires-python = ">=3.9"
license = "BSD-3-Clause"
keywords = ["django", "django-otp", "webauthn", "fido2", "u2f", "security", "mfa", "authentication"]
authors = [{ name = "Storm B. Heg", email = "[email protected]" }]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Topic :: Security",
"Topic :: Communications :: FIDO",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
]
dependencies = [
"django>=4.2",
"django-otp>=1.4,<2.0",
"djangorestframework>=3.14",
"webauthn>=2.1.0,<3",
]
[project.optional-dependencies]
testing = [
"beautifulsoup4>=4,<5",
"django-debug-toolbar>4,<5",
"dj-database-url>=2.1.0,<3",
# To test functionality with a strict Content Security Policy
"django-csp>=4.0b2,<5",
# Update as necessary, prevent sudden breakage
"pytest>8,<9",
"coverage[toml]>=7,<8",
"pytest-django>4.5,<5",
"pytest-factoryboy>=2,<3",
"pytest-env>=1,<2",
"pytest-randomly>=3.15,<4",
"pytest-mock>=3.14,<4",
"jsonschema ~= 4.23",
]
playwright = [
"playwright>=1.49,<2",
"pytest-playwright>=0.5.2,<1",
]
docs = [
"alabaster==1.0.0",
"Sphinx==8.0.2",
"sphinx-autobuild==2024.10.3",
]
[project.urls]
# TODO: documentation link
# Documentation = "https://github.com/Stormbase/django-otp-webauthn/"
Changelog = "https://github.com/Stormbase/django-otp-webauthn/blob/main/CHANGELOG.md"
Issues = "https://github.com/Stormbase/django-otp-webauthn/issues"
Source = "https://github.com/Stormbase/django-otp-webauthn"
[tool.hatch.version]
path = "src/django_otp_webauthn/__init__.py"
[tool.hatch.build.targets.wheel]
artifacts = [
# Include built static files that are gitignored and thus not included by default
"src/django_otp_webauthn/static/django_otp_webauthn/*",
# Include compiled translations that are gitignored and thus not included by default
"src/django_otp_webauthn/locale/*/LC_MESSAGES/*.mo",
]
[tool.hatch.build.targets.sdist]
artifacts = [
# Include built static files that are gitignored and thus not included by default
"src/django_otp_webauthn/static/django_otp_webauthn/*",
# Include compiled translations that are gitignored and thus not included by default
"src/django_otp_webauthn/locale/*/LC_MESSAGES/*.mo",
"sandbox/locale/*/LC_MESSAGES/*.mo",
]
# Manually specify what to include, otherwise it becomes a mess
include = [
"src/django_otp_webauthn",
"sandbox/",
"client/",
"tests/",
"scripts/",
"README.md",
"LICENSE",
"CHANGELOG.md",
"CONTRIBUTORS.md",
"SECURITY.md",
"pyproject.toml",
]
[tool.hatch.envs.default]
dependencies = [
"django-otp-webauthn[testing]",
]
[tool.hatch.envs.hatch-static-analysis]
# Do not use Hatch default configuration
config-path = "pyproject.toml"
dependencies = []
[tool.ruff]
target-version = "py39" # minimum target version
[tool.ruff.lint]
# E501: Line too long
ignore = ["E501"]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"T20", # flake8-print
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
[tool.ruff.lint.isort]
known-first-party = ["django_otp_webauthn", "sandbox", "tests"]
[tool.pytest.ini_options]
pythonpath = "sandbox"
DJANGO_SETTINGS_MODULE = "settings"
testpaths = "tests/"
norecursedirs = ["tests/e2e"]
addopts = "--reuse-db"
[tool.coverage.run]
source_pkgs = ["django_otp_webauthn"]
branch = true
omit = ["*/migrations/*", "*/tests/*"]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc.)?abstractmethod",
# Nor complain about type checking
"if TYPE_CHECKING:",
]