-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
176 lines (147 loc) · 4.22 KB
/
pyproject.toml
File metadata and controls
176 lines (147 loc) · 4.22 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
164
165
166
167
168
169
170
171
172
173
174
175
176
[build-system]
requires = ["setuptools>=60", "setuptools-scm>=8.0"]
[project]
name = "oper8"
dynamic = ["version"]
description = "Python-native Kubernetes operator framework for managing trees of components"
license = {text = "Apache-2.0"}
readme = "README.md"
requires-python = ">=3.10"
classifiers=[
"License :: OSI Approved :: Apache Software License"
]
dependencies = [
"alchemy-config>=1.0.0,<2",
"alchemy-logging>=1.0.1,<2",
"openshift>=0.13.1,<0.14",
"python-dateutil>=2.8.1,<3",
"deepdiff>=8.5,<10",
"jsonpatch>=1.26,<2",
"semver>=2.13.0,<4",
"kubernetes>=25.3.0,<35",
# Until https://github.com/libgit2/pygit2/issues/1292 is resolved
"pygit2>=1.12.0,<1.19",
]
[project.scripts]
oper8 = "oper8.__main__:main"
[project.optional-dependencies]
## User Extra Sets ##
ansible = [
# Ansible core engine (ansible-operator v1.42.2 uses ansible-core 2.18.14)
# Note: kubernetes.core and operator_sdk.util collections are provided by ansible-operator runtime
"ansible-core>=2.15,<3",
]
test-helpers = [
"pytest>=6",
]
tls-context = [
"cryptography>=41.0.4",
]
# NOTE: This is "all" from the user perspective, not the dev perspective
all = [
"oper8[ansible, test-helpers, tls-context]",
]
## Dev Extra Sets ##
dev-test = [
"pytest>=6",
"pytest-cov>=2.10.1",
"pytest-timeout>=2.1.0,<3",
"dill>=0.4,<0.5",
"Flask>=2.3,<4",
]
dev-docs = [
"mkdocs-material>=9.5.46",
"mkdocstrings-python>=1.12.2"
]
dev-graph = [
"dash-cytoscape>=0.2,<1.1",
]
dev-fmt = [
"pre-commit>=3.0.4,<5.0",
"ruff==0.15.12",
]
dev-build = [
"setuptools>=60",
"setuptools-scm>=8.0",
]
# NOTE: This is "all" from the user and dev perspective
all-dev = [
"oper8[all, dev-test, dev-docs, dev-fmt, dev-build, dev-graph]"
]
[project.urls]
Source = "https://github.com/IBM/oper8"
[tool.setuptools.packages.find]
where = [""]
include = ["oper8"]
[tool.setuptools_scm]
write_to = "oper8/_version.py"
[tool.pytest.ini_options]
markers = [
"ansible: marks tests that depend on ansible",
]
addopts = [
"--cov=oper8",
"--cov-report=term",
"--cov-report=html",
"--cov-fail-under=94.0",
"-Werror",
"-Wignore::ImportWarning",
]
[tool.coverage.run]
omit = [
"oper8/test_helpers/**",
]
[tool.ruff]
line-length = 100
target-version = "py38"
[tool.ruff.lint]
select = [ "E", "F", "UP", "B", "SIM", "I"]
ignore = [
"UP032", # f-string
"UP034", # extraneous-parentheses
# "UP035", # deprecated-import
## original errors fromt pylint
"F403", # unable to detect undefined names
"I001", # import block unsorted/unformatted
"E402", # module level import not at top of file
# "B028", # warnings: no explicit stacklevel keyword argument found
# "I0001", # raw-checker-failed
# "I0010", # bad-inline-option
# "I0011", # locally-disabled
# "I0013", # file-ignored
# "I0020", # suppressed-message
# "I0021", # useless-suppression
# "I0022", # deprecated-pragma
# "I0023", # use-symbolic-message-instead
# "C0103", # invalid-name
# "C0115", # missing-class-docstring
# "C0114", # missing-module-docstring
# "C0116", # missing-function-docstring
# "C0209", # consider-using-f-string
# "R1710", # inconsistent-return-statements
# "E1101", # no-member
# "R0913", # too-many-arguments
# "R0914", # too-many-locals
# "R0912", # too-many-branches
# "R0915", # too-many-statements
# "R0401", # cyclic-import
# "R0903", # too-few-public-methods
# "W0212", # protected-access
# "W0511", # fixme
# "W1202", # logging-format-interpolation
# "E1205", # logging-too-many-args
# "W0201", # attribute-defined-outside-init
# "W0223", # abstract-method
# "W0104", # pointless-statement
# "C0411", # wrong-import-order
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401", # imported but unused
"F403" # unable to detect undefined names
]
"oper8/watch_manager/ansible_watch_manager/modules/k8s_application.py" = [
# Ansible requires UTF-8 encoding declaration for Ansible modules
# https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#python-shebang-utf-8-coding
"UP009" # UTF-8 encoding declaration is unnecessary
]