forked from kedro-org/kedro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
225 lines (205 loc) · 5.55 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# PEP-518 https://peps.python.org/pep-0518/
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools>=65.5.1"] # PEP 518 specifications
build-backend = "setuptools.build_meta"
[project]
name = "kedro"
authors = [
{name = "Kedro"}
]
description = "Kedro helps you build production-ready data and analytics pipelines"
requires-python = ">=3.7"
dependencies = [
"anyconfig>=0.10.0",
"attrs>=21.3",
"build>=0.7.0",
"cachetools>=4.1",
"click>=4.0",
"cookiecutter>=2.1.1,<3.0",
"dynaconf>=3.1.2,<4.0",
"fsspec>=2021.4",
"gitpython>=3.0",
"importlib_metadata>=3.6,<5.0; python_version < '3.8'", # The "selectable" entry points were introduced in `importlib_metadata` 3.6 and Python 3.10. Bandit on Python 3.7 relies on a library with `importlib_metadata` < 5.0
"importlib-metadata>=3.6,<7.0; python_version >= '3.8'",
"importlib_resources>=1.3,<7.0", # The `files()` API was introduced in `importlib_resources` 1.3 and Python 3.9.
"jmespath>=0.9.5",
"more_itertools>=8.14.0",
"omegaconf>=2.1.1",
"parse>=1.19.0",
"pip-tools>=6.5",
"pluggy>=1.0,<1.3", # TODO: Uncap when dropping Python 3.7 support, see https://github.com/kedro-org/kedro/issues/2979
"PyYAML>=4.2,<7.0",
"rich>=12.0,<14.0",
"rope>=0.21,<2.0", # subject to LGPLv3 license
"setuptools>=65.5.1",
"toml>=0.10.0",
"toposort>=1.5", # Needs to be at least 1.5 to be able to raise CircularDependencyError
]
keywords = [
"pipelines",
"machine learning",
"data pipelines",
"data science",
"data engineering",
]
license = {text = "Apache Software License (Apache 2.0)"}
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dynamic = ["readme", "version", "optional-dependencies"]
[project.urls]
Homepage = "https://kedro.org"
Source = "https://github.com/kedro-org/kedro"
Documentation = "https://docs.kedro.org"
Tracker = "https://github.com/kedro-org/kedro/issues"
[project.scripts]
kedro = "kedro.framework.cli:main"
[tool.setuptools]
zip-safe = false
[tool.setuptools.packages.find]
include = ["kedro*"]
[tool.setuptools.dynamic]
readme = {file = "README.md", content-type = "text/markdown"}
version = {attr = "kedro.__version__"}
[tool.black]
exclude = "/templates/|^features/steps/test_starter"
[tool.isort]
profile = "black"
[tool.pylint]
[tool.pylint.master]
ignore = "CVS"
ignore-patterns = "kedro/templates/*"
load-plugins = [
"pylint.extensions.docparams",
"pylint.extensions.no_self_use"
]
extension-pkg-whitelist = "cv2"
unsafe-load-any-extension = false
[tool.pylint.messages_control]
disable = [
"ungrouped-imports",
"duplicate-code",
"wrong-import-order", # taken care of by isort
]
enable = ["useless-suppression"]
[tool.pylint.refactoring]
max-nested-blocks = 5
[tool.pylint.format]
indent-after-paren=4
indent-string=" "
[tool.pylint.miscellaneous]
notes = [
"FIXME",
"XXX"
]
[tool.pylint.design]
min-public-methods = 1
[tool.coverage.report]
fail_under = 100
show_missing = true
omit = [
"kedro/templates/*",
"kedro/extras/logging/color_logger.py",
"kedro/extras/extensions/ipython.py",
"kedro/framework/cli/hooks/specs.py",
"kedro/framework/hooks/specs.py",
"kedro/extras/datasets/tensorflow/*",
"kedro/extras/datasets/holoviews/*",
"tests/*"
]
exclude_lines = ["pragma: no cover", "raise NotImplementedError"]
[tool.pytest.ini_options]
addopts="""
--cov-config pyproject.toml \
--cov-report xml:coverage.xml \
--cov-report term-missing \
--cov kedro \
--cov tests \
--ignore tests/template/fake_repo \
--ignore features \
--ignore kedro/templates \
--no-cov-on-fail \
-ra \
-W ignore"""
testpaths = [
"tests"
]
[tool.importlinter]
root_package = "kedro"
[[tool.importlinter.contracts]]
name = "CLI > Context > Library, Runner > Extras > IO & Pipeline"
type = "layers"
containers = "kedro"
layers = [
"framework.cli",
"framework.session",
"framework.context",
"framework.project",
"runner",
"extras.datasets",
"io",
"pipeline",
"config"
]
ignore_imports = [
"kedro.runner.parallel_runner -> kedro.framework.project",
"kedro.framework.hooks.specs -> kedro.framework.context"
]
[[tool.importlinter.contracts]]
name = "Pipeline and IO are independent"
type = "independence"
modules = [
"kedro.pipeline",
"kedro.io"
]
[[tool.importlinter.contracts]]
name = "Config cannot import Runner et al"
type = "forbidden"
source_modules = [
"kedro.config"
]
forbidden_modules = [
"kedro.runner",
"kedro.io",
"kedro.pipeline",
"kedro.extras.datasets"
]
[[tool.importlinter.contracts]]
name = "Runner et al cannot import Config"
type = "forbidden"
source_modules = [
"kedro.runner",
"kedro.io",
"kedro.pipeline",
"kedro.extras.datasets"
]
forbidden_modules = [
"kedro.config"
]
ignore_imports = [
"kedro.framework.context.context -> kedro.config",
"kedro.framework.session.session -> kedro.config"
]
[tool.ruff]
line-length = 88
show-fixes = true
select = [
"F", # Pyflakes
"W", # pycodestyle
"E", # pycodestyle
"I", # isort
"UP", # pyupgrade
"PL", # Pylint
"T201", # Print Statement
]
ignore = ["E501"] # Black takes care of line-too-long
[tool.ruff.isort]
known-first-party = ["kedro"]
[tool.ruff.per-file-ignores]
"{tests,docs}/*" = ["PLR2004","PLR0913"]
"{tests,docs,tools,static,features,docs}/*" = ["T201"] # Check print statement for kedro/ only