Skip to content

Commit 4a75a89

Browse files
committed
LCORE-3141: Ability to disable some directories
1 parent 0a5af1c commit 4a75a89

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

scripts/gen_doc.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@
88

99
DIRECTORIES = ["src", "tests/unit", "tests/integration", "tests/e2e"]
1010

11+
# README.md files won't be generated in following directories
12+
DIRS_TO_SKIP = [
13+
"tests/integration",
14+
"tests/e2e",
15+
"tests/e2e/configuration",
16+
"tests/e2e",
17+
"tests/e2e/configuration",
18+
"tests/e2e/rag",
19+
"tests/e2e/secrets",
20+
"tests/e2e/skills",
21+
"tests/e2e/skills/echo",
22+
"tests/e2e/skills/echo/references",
23+
"tests/e2e/skills/summarize",
24+
"tests/e2e/skills/summarize/references",
25+
]
26+
1127

1228
def generate_docfile(directory: Path) -> None:
1329
"""
@@ -47,17 +63,22 @@ def generate_documentation_on_path(path: Path) -> None:
4763
4864
This function generate README.md for Python sources in the given directory.
4965
66+
Directory can be skipped if it's part of DIRS_TO_SKIP global list.
67+
5068
Parameters:
5169
----------
5270
path (str or os.PathLike): Directory in which to generate the README.md file.
5371
"""
5472
directory = path
5573
cwd = os.getcwd()
5674
os.chdir(directory)
57-
print(f"[gendoc] Generating README.md in: {directory}")
5875

5976
try:
60-
generate_docfile(directory)
77+
if str(directory) in DIRS_TO_SKIP:
78+
print(f"[gendoc] Skipping {directory}")
79+
else:
80+
print(f"[gendoc] Generating README.md in: {directory}")
81+
generate_docfile(directory)
6182
finally:
6283
os.chdir(cwd)
6384

0 commit comments

Comments
 (0)