forked from NVIDIA/cloudai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
128 lines (111 loc) · 3.6 KB
/
pyproject.toml
File metadata and controls
128 lines (111 loc) · 3.6 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
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[project]
name = "cloudai"
dynamic = ["version"]
dependencies = [
"bokeh==3.4.1",
"pandas==2.2.1",
"tbparse==0.0.8",
"toml==0.10.2",
"kubernetes==30.1.0",
"pydantic==2.8.2",
"jinja2==3.1.6",
"websockets==15.0.1",
"rich==14.0.0",
]
requires-python = ">=3.10"
scripts = { cloudai = "cloudai.__main__:main" }
[project.optional-dependencies]
dev = [
"ruff==0.11.7",
"pandas-stubs==2.2.*",
"pyright==1.1.400",
"build==1.2.*",
"vulture==2.14",
"pytest==8.3.*",
"pytest-cov==6.1.*",
"pytest-asyncio==0.26.*",
"import-linter==2.3.*",
"pytest-deadfixtures==2.2.*",
"taplo==0.9.3",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.version]
source = "scm"
fallback_version = "1.4.0+unknown"
[tool.ruff]
line-length = 120
[tool.ruff.format]
indent-style = "space"
[tool.ruff.lint]
select = ["I", "B", "E", "D", "F", "SIM", "W", "C90", "EXE", "ERA", "RUF"]
ignore = [
"D407", # Missing dashed underline after section
"D203", # conflicts with D211
"D212", # conflicts with D213
"D413", # Missing blank line after last section
# TODO: Remove these once we have docstrings
"D100", # Missing docstring in public module
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D107", # Missing docstring in `__init__`
]
[tool.ruff.lint.per-file-ignores]
"**/tests/*" = ["D"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src", "."]
addopts = "--strict-markers -m 'not ci_only'"
empty_parameter_set_mark = "fail_at_collect"
markers = ["ci_only: mark test as CI-only"]
filterwarnings = ["error"]
[tool.importlinter]
root_package = "cloudai"
[[tool.importlinter.contracts]]
name = "_core is not accessed directly"
type = "forbidden"
forbidden_modules = ["cloudai._core"]
allow_indirect_imports = true # this is to allow "from cloudai import ..." via core.py
source_modules = [
"cloudai.systems",
"cloudai.workloads",
"cloudai.util",
"cloudai.cli",
"cloudai.report_generator",
]
[[tool.importlinter.contracts]]
name = "Report generator is leaf dependency"
type = "forbidden"
forbidden_modules = ["cloudai.systems", "cloudai.workloads", "cloudai.cli"]
allow_indirect_imports = true # allow "from cloudai.core import ..."
source_modules = ["cloudai.report_generator"]
[[tool.importlinter.contracts]]
name = "Util modules are leaf dependencies"
type = "forbidden"
forbidden_modules = ["cloudai.systems", "cloudai.workloads", "cloudai.cli"]
source_modules = ["cloudai.util"]
[tool.vulture]
ignore_names = ["mock_datetime_now"]
min_confidence = 100
[tool.coverage.report]
exclude_also = ["@abstractmethod"]
[tool.pyright]
include = ["src", "tests"]
exclude = ["src/cloudai/workloads/nemo_run/cloudai_nemorun.py"]