-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
177 lines (163 loc) · 4.69 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "apricot-server"
dynamic = ["version"]
description = "A proxy for delegating LDAP requests to an OpenID Connect backend."
readme = "README.md"
requires-python = ">=3.7"
license = "BSD-3-Clause"
keywords = []
authors = [
{ name = "James Robinson", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"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",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"ldaptor~=21.2",
"oauthlib~=3.2",
"pydantic~=2.4",
"redis~=5.0",
"requests-oauthlib~=1.3",
"Twisted~=23.10",
"zope.interface~=6.2",
]
[project.urls]
Documentation = "https://github.com/alan-turing-institute/apricot#readme"
Issues = "https://github.com/alan-turing-institute/apricot/issues"
Source = "https://github.com/alan-turing-institute/apricot"
[tool.hatch.version]
path = "apricot/__about__.py"
[tool.hatch.build.targets.wheel]
packages = ["."]
[tool.hatch.envs.lint]
detached = true
dependencies = [
"black~=24.2",
"mypy~=1.8",
"ruff~=0.7",
"types-oauthlib~=3.2",
"types-redis~=4.6",
"types-requests~=2.31",
]
[tool.hatch.envs.lint.scripts]
typing = "mypy {args:apricot} run.py"
style = [
"black --check --diff {args:apricot} run.py",
"ruff check --preview {args:apricot} run.py",
]
fmt = [
"black {args:apricot} run.py",
"ruff check --preview --fix {args:apricot} run.py",
"style",
]
all = [
"style",
"typing",
]
[tool.black]
target-version = ["py310", "py311"]
[tool.ruff.lint]
select = [
# See https://beta.ruff.rs/docs/rules/
"A", # flake8-builtins
"AIR", # Airflow
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"ASYNC1", # flake8-trio
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C", # complexity, mcabe and flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"EM", # flake8-errmsg
"ERA", # eradicate
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # numpy-specific-rules
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLC", # pylint convention
"PLE", # pylint error
"PLR", # pylint refactor
"PLW", # pylint warning
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLOT", # flake8-slot
"T", # flake8-debugger and flake8-print
"TCH", # flake8-type-checking
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
ignore = [
"D100", # missing-docstring-in-module
"D102", # missing-docstring-in-public-method
"D104", # missing-docstring-in-package
"D105", # missing-docstring-in-magic-method
"D203", # one-blank-line-before-class due to conflict with D211
"D213", # multi-line-summary-second-line due to conflict with D212
"E501", # line length
"C901", # complex-structure
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0917", # too-many-positional-arguments
]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "parents"
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["apricot"]
[tool.mypy]
disallow_subclassing_any = false # allow subclassing of types from third-party libraries
files = "apricot" # run mypy over this directory
strict = true # enable all optional error checking flags
[[tool.mypy.overrides]]
module = [
"ldaptor.*",
"pydantic.*",
"requests_oauthlib.*",
"twisted.*",
"zope.interface.*",
]
ignore_missing_imports = true