-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (119 loc) · 3.84 KB
/
pyproject.toml
File metadata and controls
134 lines (119 loc) · 3.84 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "kfp-components"
version = "1.11.0"
description = "A collection of reusable components and pipelines for Kubeflow Pipelines"
authors = [
{name = "Kubeflow Community"}
]
license = "Apache-2.0"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"kfp>=2.15.2",
]
[project.optional-dependencies]
lint = [
# We keep these pinned to avoid new lint failures due to updates
"ruff==0.15.2",
"yamllint==1.38.0",
]
test = [
"docker",
"pytest",
"pytest-cov",
"pytest-timeout",
"docstring-parser",
"jinja2",
"packaging",
"pyyaml",
"semver",
"pip",
"setuptools",
# Component-specific SDK deps required for python_func() tests.
# KFP SubprocessRunner cannot auto-install these because it does not
# support Input[Dataset] artifacts (see: https://github.com/kubeflow/pipelines/issues/13061).
# Once KFP fixes this, these can be removed and tests can use
# SubprocessRunner(use_venv=True) instead.
"sdg-hub>=0.7.0,<1.0",
# Required for pipeline validation (validate_examples, validate_base_images)
"kfp-kubernetes",
]
# Local development (extends test with additional tools)
dev = [
"kfp-components[lint]",
"kfp-components[test]",
]
[project.urls]
Homepage = "https://www.kubeflow.org/docs/components/pipelines/"
Documentation = "https://github.com/kubeflow/pipelines-components/tree/main/docs"
Repository = "https://github.com/kubeflow/pipelines-components"
Issues = "https://github.com/kubeflow/pipelines-components/issues"
[tool.setuptools]
packages = [
"kfp_components",
"kfp_components.components",
"kfp_components.components.data_processing",
"kfp_components.components.data_processing.yoda_data_processor",
"kfp_components.components.data_processing.sdg",
"kfp_components.components.deployment",
"kfp_components.components.evaluation",
"kfp_components.components.training",
"kfp_components.pipelines",
"kfp_components.pipelines.data_processing",
"kfp_components.pipelines.data_processing.sdg",
"kfp_components.pipelines.deployment",
"kfp_components.pipelines.evaluation",
"kfp_components.pipelines.training",
]
[tool.setuptools.package-dir]
"kfp_components" = "."
"kfp_components.components" = "components"
"kfp_components.pipelines" = "pipelines"
[tool.setuptools.package-data]
"*" = ["*.yaml", "*.yml", "*.json"]
[tool.ruff]
line-length = 120
target-version = "py311"
exclude = [
".git",
".venv",
"build",
"dist",
"__pycache__",
"node_modules",
"**/_generated/",
"**/test_data/**", # Test fixtures may have intentional styles (quote types, etc.)
]
[tool.ruff.lint]
# Enable pycodestyle (E, W), pyflakes (F), isort (I), pydocstyle (D)
select = ["E", "W", "F", "I", "D"]
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D415", # First line should end with punctuation (not needed for simple module names)
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["kubeflow"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
docstring-code-format = true
[project.scripts]
# Format is: script-name = "module.path:function_name"
my-script = "scripts.generate_readme.cli:main"
# Pytest configuration for KEP-913 repository structure
# Currently tests are in scripts/ only. When component/pipeline tests are added,
# this configuration will need to be updated to handle tests in components/*/tests/
[tool.pytest.ini_options]
testpaths = ["scripts"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Don't search these directories
norecursedirs = [".git", ".venv", "build", "dist", "__pycache__", "components", "pipelines"]