Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
163 lines (147 loc) · 4.75 KB
/
Copy pathpyproject.toml
File metadata and controls
163 lines (147 loc) · 4.75 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
[project]
name = "kubeflow"
dynamic = ["version"]
requires-python = ">=3.10"
authors = [
{ name = "The Kubeflow Authors", email = "kubeflow-discuss@googlegroups.com" },
]
license = "Apache-2.0"
license-files = ["LICENSE"]
description = "Kubeflow Python SDK to manage ML workloads and to interact with Kubeflow APIs."
readme = "README.md"
keywords = ["kubeflow", "trainer", "model training", "llm", "ai"]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"kubernetes>=27.2.0,<36.0.0", # 36.0.0 has multiple regressions; see kubernetes-client/python#2592, #2596
"pydantic>=2.10.0",
"requests>=2.25.0",
"kubeflow-trainer-api>=2.3.0,<2.4",
"kubeflow-katib-api>=0.19.0,<0.20",
]
[project.optional-dependencies]
docker = ["docker>=6.1.3"]
podman = ["podman>=5.6.0"]
spark = [
# pyspark-client is Apache Spark Python API with Spark Connect by default
# Match major.minor of pyspark-client to Spark constants declared in kubeflow.spark.backends.kubernetes.constants
# Ensure pyspark-client and the spark image align with the Spark version used in the Spark operator image
# https://github.com/kubeflow/spark-operator/blob/master/Dockerfile#L17
"pyspark-client==4.0.4",
"kubeflow-spark-api>=2.4.0,<2.5",
]
hub = ["model-registry>=0.3.14,<0.4"]
pipelines = ["kfp[kubernetes]>=2.17.0,<2.18"]
[dependency-groups]
docs = [
"sphinx>=7.0",
"furo>=2024.0",
"sphinx-autodoc-typehints>=2.0",
"sphinx-copybutton>=0.5",
"myst-parser>=3.0",
"sphinx-design>=0.6",
]
# These dependencies are only needed in E2E tests with Papermill.
notebooks = ["papermill>=2.6.0", "ipykernel>=6.29.5"]
dev = [
"kubeflow[docker,hub,pipelines,spark]",
"pytest>=7.0",
"pytest-mock>=3.10",
"coverage>=7.0",
{ include-group = "notebooks" },
"ruff>=0.12.2",
"pre-commit>=4.2.0",
"PyGithub>=2.7.0",
"setuptools>=80.9.0",
"ty>=0.0.11",
]
[project.urls]
Homepage = "https://github.com/kubeflow/sdk"
Documentation = "https://www.kubeflow.org/docs/components"
Source = "https://github.com/kubeflow/sdk"
[tool.hatch.version]
path = "kubeflow/__init__.py"
[tool.uv]
package = true
# Local development resolves the Kubeflow API packages from upstream `master` so contributors test
# against unreleased changes. These overrides are not part of the published wheel metadata
override-dependencies = [
"kubeflow-trainer-api @ git+https://github.com/kubeflow/trainer.git@master#subdirectory=api/python_api",
"kubeflow-katib-api @ git+https://github.com/kubeflow/katib.git@master#subdirectory=api/python_api",
"kubeflow-spark-api @ git+https://github.com/kubeflow/spark-operator.git@master#subdirectory=api/python_api",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["kubeflow"]
exclude = ["**/*_test.py", "kubeflow/test/**"]
# ruff configuration
[tool.ruff]
# Formatting + lint coordination
line-length = 100
target-version = "py310"
src = ["kubeflow"]
extend-exclude = [
".venv",
"venv",
"build",
"dist",
"__pycache__",
"docs/_build",
"spark-operator",
]
[tool.ruff.format]
# Use Ruff as the formatter (Black-compatible)
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
docstring-code-format = true
docstring-code-line-length = 100
[tool.ruff.lint]
# Sensible, low-noise default rule set for a library:
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # warnings
"I", # isort (imports order)
"UP", # pyupgrade
"N", # pep8-naming
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"B006", # mutable-argument-default
"E501", # Embedded HTML/SVG has long lines
]
[tool.ruff.lint.isort]
# Make import sorting deterministic and "first-party aware"
known-first-party = ["kubeflow"]
combine-as-imports = true
force-sort-within-sections = true
[tool.pytest.ini_options]
markers = [
"integration: marks tests as integration tests (requires Kind cluster)",
"slow: marks tests as slow running",
"timeout: marks tests with timeout limit",
"options: marks tests for Spark options pattern",
]
filterwarnings = ["ignore::pydantic.warnings.PydanticDeprecatedSince20"]
[tool.ty.environment]
python-version = "3.10"