forked from mlrun/mlrun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
123 lines (114 loc) · 2.44 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
[tool.ruff]
extend-include = ["*.ipynb"]
target-version = "py39"
[tool.ruff.lint]
extend-select = [
"F", # pyflakes
"W", # pycodestyle
"E", # pycodestyle
"I", # isort
"UP", # pyupgrade
"CPY", # flake8-copyright
]
exclude = ["*.ipynb"]
explicit-preview-rules = true
[tool.ruff.lint.pycodestyle]
max-line-length = 120
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["F401"]
"docs/**.py" = ["CPY001"]
[tool.ruff.lint.flake8-copyright]
author = "Iguazio"
[tool.pytest.ini_options]
addopts = "-v -rf --disable-warnings"
python_files = [
"tests/*/test_*.py",
"tests/test_*.py",
]
timeout = 1800 # 30 minutes per test
log_cli = true
log_level = "DEBUG"
[tool.importlinter]
root_packages = [
"mlrun",
"server",
]
include_external_packages = true
[[tool.importlinter.contracts]]
name = "Common modules shouldn't import other mlrun utilities"
type = "forbidden"
source_modules = [
"mlrun.common",
]
forbidden_modules = [
"mlrun.api",
"mlrun.artifacts",
"mlrun.data_types",
"mlrun.datastore",
"mlrun.db",
"mlrun.feature_store",
"mlrun.frameworks",
"mlrun.launcher",
"mlrun.model_monitoring",
"mlrun.package",
"mlrun.platforms",
"mlrun.projects",
"mlrun.runtimes",
"mlrun.serving",
"mlrun.track",
"mlrun.execution",
"mlrun.features",
"mlrun.k8s_utils",
"mlrun.kfpops",
"mlrun.lists",
"mlrun.model",
"mlrun.render",
"mlrun.run",
"mlrun.secrets",
]
ignore_imports = [
"mlrun.config -> mlrun.db",
"mlrun.utils.clones -> mlrun",
"mlrun.utils.helpers -> mlrun",
]
[[tool.importlinter.contracts]]
name = "MLRun server may import mlrun but not the way around"
type = "layers"
layers = [
"server",
"mlrun",
]
[[tool.importlinter.contracts]]
name = "MLRun should not import mlrun.api"
type = "forbidden"
source_modules = [
"server.api",
"mlrun.common",
"mlrun.artifacts",
"mlrun.data_types",
"mlrun.datastore",
"mlrun.db",
"mlrun.feature_store",
"mlrun.frameworks",
"mlrun.launcher",
"mlrun.model_monitoring",
"mlrun.package",
"mlrun.platforms",
"mlrun.projects",
"mlrun.runtimes",
"mlrun.serving",
"mlrun.track",
"mlrun.execution",
"mlrun.features",
"mlrun.k8s_utils",
"mlrun.kfpops",
"mlrun.lists",
"mlrun.model",
"mlrun.render",
"mlrun.run",
"mlrun.secrets",
]
allow_indirect_imports=false
forbidden_modules = [
"mlrun.api",
]