-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
163 lines (124 loc) · 3.55 KB
/
pyproject.toml
File metadata and controls
163 lines (124 loc) · 3.55 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "ariadne-auth"
dynamic = ["version"]
description = "An Ariadne extension for authorization, allowing global permissions for all resolvers and fine-grained control over required permissions for specific resolvers in GraphQL APIs."
readme = "README.md"
requires-python = ">=3.9"
license = "BSD-3-Clause"
license-files = ["LICEN[CS]E*"]
keywords = ["ariadne", "ariadne-extension", "authorization", "permissions"]
authors = [{ name = "Mirumee Labs", email = "hello@mirumee.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"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",
]
dependencies = [
"ariadne",
"typing_extensions"
]
[project.optional-dependencies]
types = ["mypy>=1.0.0",]
dev = [
"rich",
"uvicorn",
"starlette",
"ipdb",
]
[project.urls]
Homepage = "https://github.com/mirumee/ariadne-auth"
Issues = "https://github.com/mirumee/ariadne-auth/issues"
[tool.hatch.version]
path = "src/ariadne_auth/__about__.py"
# Environment configuration
## Default environment
[tool.hatch.envs.default]
features = ["dev", "types"]
[tool.hatch.envs.default.env-vars]
PYTHONBREAKPOINT = "ipdb.set_trace"
[tool.hatch.envs.default.scripts]
ariadne_auth = "python -m test_app.__main__"
check = [
"hatch fmt",
"hatch test -a -p",
"hatch test --cover",
"hatch run types:check",
]
## Test environment
[tool.hatch.envs.hatch-test.env-vars]
PYTHONBREAKPOINT = "ipdb.set_trace"
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"pytest-cov", "pytest-mock", "pytest-asyncio", "ipdb"
]
extra-args = ["-s"] # to stop on ipdb breakpoint
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
## Types environment
[tool.hatch.envs.types]
features = ["types"]
[tool.hatch.envs.types.scripts]
check = "mypy . --install-types --non-interactive"
# Tool configuration
## Pytest configuration
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
## Types configuration
[tool.mypy]
python_version = "3.9"
files = ["src/**/*.py"]
exclude = ["tests/.*", "test_app/.*"]
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
strict = true
disable_error_code = ["import-untyped"]
[[tool.mypy.overrides]]
module = "setproctitle.*"
ignore_missing_imports = true
## Coverage configuration
[tool.coverage.run]
source_pkgs = ["ariadne_auth"]
branch = true
parallel = true
omit = [
"src/ariadne_auth/__about__.py",
]
[tool.coverage.paths]
ariadne_auth = ["src/ariadne_auth", "*/ariadne-auth/src/ariadne_auth"]
tests = ["tests", "*/ariadne-auth/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
## Ruff configuration
[tool.ruff]
line-length = 88
target-version = "py39"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 80
[tool.ruff.lint]
select = ["E", "F", "G", "I", "N", "Q", "UP", "C90", "T20", "TID"]
unfixable = ["UP007"] # typer does not handle PEP604 annotations
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party = ["ariadne_auth"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false