forked from project-codeflare/codeflare-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
174 lines (149 loc) · 4.8 KB
/
Copy pathpyproject.toml
File metadata and controls
174 lines (149 loc) · 4.8 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
[project]
name = "codeflare-sdk"
version = "0.37.0"
[tool.poetry]
name = "codeflare-sdk"
version = "0.37.0"
description = "Python SDK for codeflare client"
license = "Apache-2.0"
# Exclude vendored tests, examples, and build files from the package
exclude = [
"src/codeflare_sdk/vendored/python_client_test",
"src/codeflare_sdk/vendored/examples",
"src/codeflare_sdk/vendored/pyproject.toml",
"src/codeflare_sdk/vendored/poetry.lock",
"src/codeflare_sdk/vendored/README.md"
]
authors = [
"Michael Clifford <mcliffor@redhat.com>",
"Mustafa Eyceoz <meyceoz@redhat.com>",
"Abhishek Malvankar <asmalvan@us.ibm.com>",
"Atin Sood <asood@us.ibm.com>",
]
readme = 'README.md'
repository = "https://github.com/project-codeflare/codeflare-sdk"
homepage = "https://github.com/project-codeflare/codeflare-sdk"
keywords = ['codeflare', 'python', 'sdk', 'client', 'batch', 'scale']
[tool.poetry.dependencies]
python = "^3.11"
openshift-client = "1.0.18"
rich = ">=12.5,<15.0"
ray = {version = "2.55.1", extras = ["data", "default"]}
kubernetes = ">= 27.2.0"
cryptography = "46.0.7"
executing = "2.2.1"
pydantic = ">= 2.10.6"
ipywidgets = "8.1.2"
kube-authkit = ">=0.4.0"
[[tool.poetry.source]]
name = "pypi"
[[tool.poetry.source]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = "7.4.7"
sphinx-rtd-theme = "3.0.1"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = "9.0.3"
coverage = "7.13.1"
pytest-mock = "3.15.1"
pytest-timeout = "2.3.1"
jupyterlab = "4.5.7"
selenium = "4.41.0.202601270013"
webdriver-manager = "4.0.2"
[tool.poetry.group.dev.dependencies]
diff-cover = "^9.6.0"
black = ">=25.11,<27.0"
pre-commit = "^4.5.0"
ruff = "^0.9.0"
mypy = "^1.15"
types-PyYAML = "^6.0"
types-requests = "^2.32"
[tool.ruff]
target-version = "py312"
line-length = 88 # Match black
extend-exclude = [
"*.ipynb", # Exclude Jupyter notebooks (different execution context)
]
[tool.ruff.lint]
select = [
"F", # pyflakes (undefined names, unused imports)
"E", # pycodestyle errors
# "I", # isort (import sorting) - disabled due to circular import issues
]
ignore = [
"E501", # line too long (handled by black/ruff-format)
"E402", # module level import not at top of file
"E722", # bare except (TODO: fix in future PR)
"F403", # star imports (TODO: refactor in future PR)
"F405", # may be undefined from star imports
]
[tool.ruff.lint.per-file-ignores]
"src/codeflare_sdk/vendored/**" = ["E", "F"] # Exclude vendored code
"**/test_*.py" = ["F401", "F811", "F841"] # Allow unused imports, redefinitions, and variables in tests
"**/__init__.py" = ["F401"] # Allow unused imports in __init__.py (re-exports for public API)
"demo-notebooks/**/*.py" = ["F841"] # Allow unused variables in demo notebooks
"tests/**/*.py" = ["F841"] # Allow unused variables in test scripts
"scripts/**/*.py" = ["F841"] # Allow unused variables in scripts
"ui-tests/**/*.py" = ["F821"] # Allow undefined names in UI test config
[tool.ruff.lint.isort]
known-first-party = ["codeflare_sdk"]
force-single-line = false
lines-after-imports = 2
[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning:pkg_resources",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
]
markers = [
"kind",
"openshift",
"nvidia_gpu",
"smoke: Smoke tests - quick validation tests",
"tier1: Tier1 tests - standard test suite",
"pre_upgrade: Tests to run before upgrade",
"post_upgrade: Tests to run after upgrade",
"ui: UI tests requiring browser automation"
]
addopts = "--timeout=900 --ignore=src/codeflare_sdk/vendored"
testpaths = ["src/codeflare_sdk"]
collect_ignore = ["src/codeflare_sdk/common/utils/unit_test_support.py"]
[tool.mypy]
python_version = "3.12"
warn_return_any = false
warn_unused_configs = true
# Legacy modules are not fully annotated; tighten incrementally in follow-up PRs.
disallow_untyped_defs = false
ignore_missing_imports = true
exclude = [
"src/codeflare_sdk/vendored/",
"tests/",
"demo-notebooks/",
"ui-tests/",
# Colocated unit tests (see AGENTS.md)
".*/test_.*\\.py$",
".*/test/.*",
"unit_test_support\\.py$",
"conftest\\.py$",
]
[[tool.mypy.overrides]]
module = "codeflare_sdk.vendored.*"
ignore_errors = true
# Partial annotations on legacy modules; tighten in follow-up PRs (RHOAIENG-61476).
[[tool.mypy.overrides]]
module = [
"codeflare_sdk.common.kubernetes_cluster.*",
"codeflare_sdk.common.kueue.kueue",
"codeflare_sdk.common.widgets.widgets",
"codeflare_sdk.common.utils.generate_cert",
"codeflare_sdk.ray.cluster.*",
"codeflare_sdk.ray.rayjobs.*",
]
ignore_errors = true
[build-system]
requires = ["poetry-core>=1.6.0"]
build-backend = "poetry.core.masonry.api"