-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (145 loc) · 4.2 KB
/
pyproject.toml
File metadata and controls
160 lines (145 loc) · 4.2 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
[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",
"pydantic>=2.10.0",
"kubeflow-trainer-api>=2.0.0",
"kubeflow-katib-api>=0.19.0",
]
[project.optional-dependencies]
docker = [
"docker>=6.1.3",
]
podman = [
"podman>=5.6.0"
]
spark = [
# pyspark-connect is Apache Spark Python API with Spark Connect by default
# Match major.minor of pyspark-connect to Spark constants declared in kubeflow.spark.backends.kubernetes.constants
# Ensure pyspark-connect 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-connect==4.0.1",
"kubeflow-spark-api>=2.4.0",
]
hub = [
"model-registry>=0.3.6",
]
[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",
]
dev = [
"kubeflow[hub,spark]",
"pytest>=7.0",
"pytest-mock>=3.10",
"coverage>=7.0",
"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",
"ruff>=0.12.2",
"pre-commit>=4.2.0",
"PyGithub>=2.7.0",
"git-cliff>=2.11.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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
# 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",
"smoke: CRD-only smoke test (Kind + CRD, no operator)",
"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"