-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
163 lines (149 loc) · 4.44 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "guacamole-user-sync"
dynamic = ["version"]
description = "Synchronise a Guacamole PostgreSQL database with an LDAP server, such as Microsoft Active Directory"
readme = "README.md"
requires-python = "==3.11.*"
license = "MIT"
keywords = []
authors = [
{ name = "James Robinson", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"ldap3==2.9.1",
"psycopg==3.2.1",
"SQLAlchemy==2.0.32",
"sqlparse==0.5.1",
]
[project.urls]
Documentation = "https://github.com/alan-turing-institute/guacamole-user-sync#readme"
Issues = "https://github.com/alan-turing-institute/guacamole-user-sync/issues"
Source = "https://github.com/alan-turing-institute/guacamole-user-sync"
[project.optional-dependencies]
lint = [
"black==24.8.0",
"mypy==1.11.2",
"ruff==0.6.2",
]
test = [
"coverage[toml]==7.6.1",
"pytest==8.3.2",
]
[tool.coverage.paths]
source = ["guacamole_user_sync/"]
[tool.coverage.report]
show_missing = true
[tool.coverage.run]
include = ["guacamole_user_sync/*"]
omit = ["tests/*"]
relative_files = true
[tool.hatch.version]
path = "guacamole_user_sync/__about__.py"
[tool.hatch.envs.lint]
detached = true
features = ["lint"]
[tool.hatch.envs.lint.scripts]
all = [
"fmt",
"style",
"typing",
]
fmt = [
"black {args:guacamole_user_sync tests synchronise.py}",
"ruff check --fix {args:guacamole_user_sync tests synchronise.py}",
]
style = [
"ruff check {args:guacamole_user_sync tests synchronise.py}",
"black --check --diff {args:guacamole_user_sync tests synchronise.py}",
]
typing = "mypy {args:guacamole_user_sync tests synchronise.py}"
[tool.hatch.envs.test]
features = ["test"]
[tool.hatch.envs.test.scripts]
all = ["python-test", "python-coverage"]
python-test = "coverage run -m pytest {args: tests}"
python-coverage = "coverage report {args:}"
[tool.mypy]
disallow_untyped_decorators = false # workaround for incorrectly-flagged pytest.fixture calls
files = "guacamole_user_sync" # run mypy over this directory
strict = true # enable all optional error checking flags
[[tool.mypy.overrides]]
module = [
"ldap3.*",
"pytest.*",
"sqlalchemy.*",
"sqlparse.*",
]
ignore_missing_imports = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # McCabe complexity
"COM", # flake8-commas
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"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
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-rse
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
ignore = [
"ANN101", # missing-type-self [deprecated]
"ANN102", # missing-type-cls [deprecated]
"D100", # undocumented-public-module
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D107", # undocumented-public-init
"D203", # one-blank-line-before-class [conflicts with D211]
"D213", # multi-line-summary-second-line [conflicts with D212]
"D400", # ends-in-period [conflicts with D415]
"S101", # assert [conflicts with pytest]
]