Skip to content

Commit

Permalink
docs: Exclude GUI from API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
georgedouzas committed Jan 10, 2025
1 parent c8f96bd commit 79cb2ed
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions docs/generate_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import mkdocs_gen_files

nav = mkdocs_gen_files.nav.Nav()
exclude_modules: list[str] = ['sportsbet.cli']

paths = sorted(Path('src').rglob('*.py'))
paths = [path for path in sorted(Path('src').rglob('*.py')) if 'cli' not in str(path) and 'gui' not in str(path)]
paths = [
path
for path in paths
Expand All @@ -29,10 +28,7 @@
full_doc_path = full_doc_path.with_name('index.md')

ident = '.'.join(parts)
if ident not in exclude_modules:
nav[parts] = doc_path.as_posix()

with mkdocs_gen_files.open(full_doc_path, 'w') as fd:
fd.write(f'::: {ident}')

mkdocs_gen_files.set_edit_path(full_doc_path, Path('../') / path)
nav[parts] = doc_path.as_posix()
with mkdocs_gen_files.open(full_doc_path, 'w') as fd:
fd.write(f'::: {ident}')
mkdocs_gen_files.set_edit_path(full_doc_path, Path('../') / path)

0 comments on commit 79cb2ed

Please sign in to comment.