-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
159 lines (143 loc) · 3.39 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "ipahcc"
dynamic = ["version"]
description = "IPA enrollment agent for Red Hat Hybrid Cloud Console"
readme = "README.md"
authors = [
{name = "Christian Heimes", email = "[email protected]"},
]
license = {text = "GPL-3.0-or-later"}
requires-python = ">=3.6"
dependencies = [
"requests",
"ipalib",
# RHEL 8 with Python 3.6
"netaddr < 1.0.0; python_version == '3.6'",
]
[project.optional-dependencies]
server = [
"cryptography",
"ipaclient",
"jsonschema",
"jwcrypto",
]
[project.scripts]
ipa-hcc = "ipahcc.server.cli:main"
ipa-hcc-auto-enrollment = "ipahcc.client.auto_enrollment:main"
ipa-hcc-client-prepare = "ipahcc.client.client_prepare:main"
ipa-hcc-stage-console = "ipahcc.client.stage_console:main"
[tool.setuptools]
package-dir = {"" = "src"}
packages = [
"ipahcc",
"ipahcc.client",
"ipahcc.server",
"ipahcc.server.schema",
"ipahcc.server.sign",
"ipaserver.install.plugins",
"ipaserver.plugins",
]
[tool.setuptools.dynamic]
version = {attr = "ipahcc._version.__version__"}
[tool.setuptools.package-data]
"ipahcc" = ["py.typed"]
"ipahcc.server" = ["schema/*.json"]
[tool.black]
line-length = 78
target-version = ['py36']
extend-exclude = "api/.*\\.py"
[tool.coverage.run]
branch = true
relative_files = true
parallel = true
source = [
"ipahcc_auto_enrollment",
"ipahcc",
"ipaserver",
"tests/",
]
omit = [
"/usr/*",
"*/ipahcc/server/sign/__main__.py",
]
[tool.coverage.paths]
source = [
"src/",
".tox/*/lib*/python*/site-packages/",
]
tests = [
"tests/",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if typing.TYPE_CHECKING",
"if __name__ == .__main__.",
"if False:",
]
[tool.mypy]
mypy_path = "src/:stubs/:tests/"
explicit_package_bases = true
check_untyped_defs = true
[[tool.mypy.overrides]]
module = [
'ipalib.*',
'ipaplatform.*',
'ipapython.*',
'ipaserver.*',
]
disable_error_code = "override"
[[tool.mypy.overrides]]
module = [
'augeas.*',
'jwcrypto.*',
]
ignore_missing_imports = true
[tool.ruff]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"S", # flake8-bandit
"TCH", # flake8-type-checking
"TID", # flake8-tide-imports
"T10", # flake8-debugger
"T20", # flake8-print
"PL" # pylint
]
ignore = [
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"PLR5501", # Consider using `elif`
"S101", # Use of `assert` detected
"S310", # Audit URL open for permitted schemes
"S603", # untrusted input
"F811", # Redefinition of unused {name} from line
"I001", # Import block is un-sorted or un-formatted
]
# lowest supported version
target-version = "py37"
extend-exclude = ["api/*.py"]
[tool.ruff.per-file-ignores]
# don't resort auto-generated stub files
"stubs/*" = ["I"]
# allow print in CLI scripts
"src/ipahcc/client/auto_enrollment.py" = ["T20"]
"src/ipahcc/server/cli.py" = ["T20"]
"src/ipahcc/server/sign/__main__.py" = ["T20"]
[tool.ruff.isort]
known-first-party = [
"conftest",
"ipahcc",
"ipahcc_auto_enrollment",
"ipaserver.plugins.hccserverroles",
]
# forced-separate = [
# "ipaclient", "ipalib", "ipapython", "ipaplatform", "ipaserver",
# ]