-
Notifications
You must be signed in to change notification settings - Fork 82
/
pyproject.toml
182 lines (171 loc) · 6.25 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
178
179
180
181
182
[tool.poetry]
name = "ods-ci"
version = "0.1.0"
description = "Robot Framework test suites for Red Hat OpenShift Data Science"
authors = ["RHODS QE <ods-qe@redhat.com>"]
readme = "README.md"
packages = [{include = "ods_ci"}]
# https://python-poetry.org/docs/dependency-specification
[tool.poetry.dependencies]
python = ">=3.11.5, <3.12.0"
reportportal-client = "^5.2.5"
robotframework = "^6"
robotframework-debuglibrary = ">=2.0.0"
robotframework-requests = "^0.9.4"
robotframework-dependencylibrary = "^4.0.1"
robotframework-seleniumlibrary = "^6.1.1"
# Selenium has been releasing versions prone to breaking, let's pin to a single release
selenium = "4.13.0"
robotframework-jupyterlibrary = "^0.5.0"
robotframework-openshift = {git = "https://git@github.com/red-hat-data-services/robotframework-openshift.git"}
pytest = "^7.2.1"
pytest-logger = "^0.5.1"
Pygments = "^2.14.0"
requests = "^2.28.2"
escapism = "^1.0.1"
semver = "^2"
rpaframework = "^27.2.0"
pexpect = "^4.8.0"
python-openstackclient = "^6.2.0"
awscli = "^1.27.100"
# When you update the kfp or kfp-kubernetes, make a copy of iris-pipeline in pipeline-samples/v2/previous-kfp-sdk
# and execute the following in the terminal:
# poetry lock --no-update
# poetry install
# find ods_ci/tests/Resources/Files/pipeline-samples/v2 -type f -name "*.py" -print0 | xargs -0 -I {} python {}
kfp = "==2.10.1"
kfp-kubernetes = "==1.4.0"
pyyaml = "^6.0.1"
junitparser = "3.1.2"
python-terraform = "0.10.1"
fuzzywuzzy = "^0.18.0"
python-levenshtein = "^0.25.1"
# Needed by Sealights: opentelemetry-distro,pyjwt
opentelemetry-distro = "^0.46b0"
pyjwt = "^2.8.0"
[tool.poetry.group.dev.dependencies]
robotframework-lsp = ">=1.11.0"
robotframework-robocop = "^4.1.0"
robotframework-tidy = "^4.5.0"
ruff = "0.3.4"
pyright = "1.1.356"
pre-commit = "3.7.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# https://microsoft.github.io/pyright/#/configuration
[tool.pyright]
typeCheckingMode = "off"
reportMissingImports = "error"
reportUnboundVariable = "error"
reportGeneralTypeIssues = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportPossiblyUnboundVariable = "warning"
reportOptionalMemberAccess = "none"
reportOptionalSubscript = "none"
include = ["ods_ci/"]
ignore = [
"ods_ci/tests/Resources/Files/pipeline-samples/",
]
pythonVersion = "3.11"
pythonPlatform = "Linux"
# https://docs.astral.sh/ruff/configuration
[tool.ruff]
include = ["pyproject.toml", "ods_ci/**/*.py"]
exclude = ["ods_ci/tests/Resources/Files/pipeline-samples/", "ods_ci/utils/scripts/sealights/"]
target-version = "py311"
line-length = 120
# https://docs.astral.sh/ruff/rules
[tool.ruff.lint]
preview = true
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"E", "W", # pycodestyle errors/warnings
"F", # Pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"ISC", # implicit string concatenation
"N", # pep8-naming
"NPY002", # numpy-legacy-random
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # misc lints
"PL", # pylint
"PL", # pylint
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff-specific
"S102", # flake8-bandit: exec-builtin
"T10", # flake8-debugger
"TCH", # type-checking imports
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
# intentionally disabled
"E203", # space before : (needed for how black formats slicing)
"ISC001", # single-line-implicit-string-concatenation (ruff format wants this disabled)
# various limits and unimportant warnings
"E501", # Line too long
"E741", # Ambiguous variable name: `l`
"PLR0904", # Too many public methods (56 > 20)
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition (6 > 5)
"PLR0915", # Too many statements
"PLR0917", # Too many positional arguments (10/5)
"PLR0917", # Too many positional arguments (7/5)
"PLR2004", # Magic value used in comparison
# "W503", # not yet implemented; line break before binary operator
# "W504", # not yet implemented; line break after binary operator
# TODO
"B006", # Do not use mutable data structures for argument defaults
"COM812", # Trailing comma missing
"INP001", # File `ods_ci/tests/Resources/Page/ODH/JupyterHub/jupyter-helper.py` is part of an implicit namespace package. Add an `__init__.py`.
"N806", # Variable `outputText` in function should be lowercase
"N813", # Camelcase `ElementTree` imported as lowercase `et`
"N816", # Variable `rotatingHandler` in global scope should not be mixedCase
"N999", # Invalid module name: 'createPolarionTestRun'
"PERF401", # Use a list comprehension to create a transformed list
"PLC1901", # `filter_value != ""` can be simplified to `filter_value` as an empty string is falsey
"PLR6201", # Use a `set` literal when testing for membership
"PLR6301", # Method `_render_template` could be a function, class method, or static method
"PLW1514", # `codecs.open` in text mode without explicit `encoding` argument
"PLW2901", # `for` loop variable `tag_it` overwritten by assignment target
"RET501", # Do not explicitly `return None` in function if it is the only possible return value
"RET504", # Unnecessary assignment to `names` before `return` statement
"RET505", # Unnecessary `else` after `return` statement
"UP015", # Unnecessary open mode parameters
"UP031", # format specifiers instead of percent format
"UP032", # Use f-string instead of `format` call
"RET507", # Unnecessary `else` after `continue` statement
"RET508", # Unnecessary `elif` after `break` statement
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# https://docs.astral.sh/ruff/formatter
[tool.ruff.format]
line-ending = "lf"
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.pytest.ini_options]
addopts = "-rfEX -p doctest --doctest-modules --strict-markers --import-mode=importlib"
python_files = ["test_*.py"]
python_classes = ["Test"]
python_functions = ["test"]
testpaths = ["ods_ci/selftests/"]
xfail_strict = true
markers = [
"slow",
]