Skip to content

Commit a4d99ca

Browse files
authored
Merge pull request #559 from NVIDIA/am/re-imports
Rework imports
2 parents 8754d16 + 5948673 commit a4d99ca

File tree

154 files changed

+920
-1005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+920
-1005
lines changed

pyproject.toml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,27 @@ root_package = "cloudai"
9393
name = "_core is not accessed directly"
9494
type = "forbidden"
9595
forbidden_modules = ["cloudai._core"]
96-
allow_indirect_imports = true # this is to allow "from cloudai import ..."
96+
allow_indirect_imports = true # this is to allow "from cloudai import ..." via core.py
9797
source_modules = [
98-
"cloudai.installer",
99-
"cloudai.parser",
100-
"cloudai.report_generator",
101-
"cloudai.report_generator.tool",
102-
"cloudai.runner",
98+
"cloudai.systems",
99+
"cloudai.workloads",
103100
"cloudai.util",
104101
"cloudai.cli",
102+
"cloudai.report_generator",
105103
]
106104

105+
[[tool.importlinter.contracts]]
106+
name = "Report generator is leaf dependency"
107+
type = "forbidden"
108+
forbidden_modules = ["cloudai.systems", "cloudai.workloads", "cloudai.cli"]
109+
source_modules = ["cloudai.report_generator"]
110+
111+
[[tool.importlinter.contracts]]
112+
name = "Util modules are leaf dependencies"
113+
type = "forbidden"
114+
forbidden_modules = ["cloudai.systems", "cloudai.workloads", "cloudai.cli"]
115+
source_modules = ["cloudai.util"]
116+
107117
[tool.vulture]
108118
ignore_names = ["mock_datetime_now"]
109119
min_confidence = 100

0 commit comments

Comments
 (0)