forked from podengo-project/ipa-hcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
144 lines (132 loc) · 3.27 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "ipahcc"
version = "0.11"
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",
"dbus-python",
"pygobject",
# Fedora dev (ipaclient is taken from global env)
"jsonschema == 4.10; python_version >= '3.10'",
"jwcrypto == 0.9.1; python_version >= '3.10'",
# RHEL 9 with Python 3.9
"ipaclient < 4.10.99 ; python_version == '3.9'",
"jsonschema < 3.3; python_version == '3.9'",
"jwcrypto == 0.8.0; python_version == '3.9'",
# RHEL 8 with Python 3.6
"ipaclient < 4.9.99 ; python_version == '3.6'",
"jsonschema < 3.0; python_version == '3.6'",
"jwcrypto == 0.5.0; python_version == '3.6'",
]
[tool.setuptools]
package-dir = {"" = "src"}
packages = [
"ipahcc",
"ipahcc.mockapi",
"ipahcc.registration",
"ipahcc.server",
"ipahcc.server.schema",
"ipahcc.sign",
"ipaserver.install.plugins",
"ipaserver.plugins",
]
py-modules = [
"ipahcc_auto_enrollment",
]
[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",
]
[tool.coverage.paths]
source = [
"src/ipahcc_auto_enrollment.py",
"src/ipahcc/",
"src/ipaserver/",
"*.tox/*/lib*/python*/site-packages/ipahcc_auto_enrollment.py",
"*.tox/*/lib*/python*/site-packages/ipahcc",
"*.tox/*/lib*/python*/site-packages/ipaserver",
]
tests = [
"tests/",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if typing.TYPE_CHECKING",
"if __name__ == .__main__.",
"if False:",
]
[tool.mypy]
mypy_path = "stubs/"
explicit_package_bases = true
[[tool.mypy.overrides]]
module = [
'augeas.*',
'dbus.*',
'gi.*',
'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
"F811", # Redefinition of unused {name} from line
]
# 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/server/dbus_cli.py" = ["T20"]
"src/ipahcc_auto_enrollment.py" = ["T20"]
[tool.ruff.isort]
known-first-party = [
"conftest",
"ipahcc",
"ipahcc_auto_enrollment",
"ipaserver.plugins.hccserverroles",
]
# forced-separate = [
# "ipaclient", "ipalib", "ipapython", "ipaplatform", "ipaserver",
# ]