File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99DIRECTORIES = ["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/rag" ,
17+ "tests/e2e/secrets" ,
18+ "tests/e2e/skills" ,
19+ "tests/e2e/skills/echo" ,
20+ "tests/e2e/skills/echo/references" ,
21+ "tests/e2e/skills/summarize" ,
22+ "tests/e2e/skills/summarize/references" ,
23+ }
24+
1125
1226def generate_docfile (directory : Path ) -> None :
1327 """
@@ -47,17 +61,25 @@ def generate_documentation_on_path(path: Path) -> None:
4761
4862 This function generate README.md for Python sources in the given directory.
4963
64+ Directory can be skipped if it's part of DIRS_TO_SKIP global list.
65+
5066 Parameters:
5167 ----------
5268 path (str or os.PathLike): Directory in which to generate the README.md file.
5369 """
5470 directory = path
71+
72+ # directory can be skipped if it's part of DIRS_TO_SKIP global list.
73+ if path .as_posix () in DIRS_TO_SKIP :
74+ print (f"[gendoc] Skipping { path } " )
75+ return
76+
5577 cwd = os .getcwd ()
56- os .chdir (directory )
57- print (f"[gendoc] Generating README.md in: { directory } " )
78+ os .chdir (path )
5879
5980 try :
60- generate_docfile (directory )
81+ print (f"[gendoc] Generating README.md in: { path } " )
82+ generate_docfile (path )
6183 finally :
6284 os .chdir (cwd )
6385
You can’t perform that action at this time.
0 commit comments