chartbook.build_docs#

Module Contents#

Functions#

generate_docs

Generate documentation by running both pipeline publish and sphinx build.

get_docs_src_path

Get the path to the docs_src directory included in the package.

run_build_markdown

Run the pipeline publish script to generate markdown files.

run_sphinx_build

Run sphinx-build to generate HTML files.

API#

chartbook.build_docs.generate_docs(output_dir: pathlib.Path, project_dir: pathlib.Path, publish_dir: pathlib.Path = Path('./_output/to_be_published/'), _docs_dir: pathlib.Path = Path('./_docs'), keep_build_dirs: bool = False, temp_docs_src_dir: pathlib.Path = Path('_docs_src'), should_remove_existing: bool = False, size_threshold: float = 50, warn_missing: bool = False)[source]#

Generate documentation by running both pipeline publish and sphinx build.

Parameters:
  • output_dir (Path) – Directory where output will be generated.

  • project_dir (Path) – Root directory of the project.

  • publish_dir (Path) – Directory where files will be published.

  • _docs_dir (Path) – Directory where documentation will be built.

  • keep_build_dirs (bool) – If True, keeps temporary build directory after generation.

  • temp_docs_src_dir (Path) – Temporary directory for documentation source files.

  • should_remove_existing (bool) – If True, removes existing output directory after successful generation.

  • size_threshold (float) – File size threshold in MB above which to use memory-efficient loading.

  • warn_missing (bool) – If True, warn instead of error when source files are missing.

chartbook.build_docs.get_docs_src_path(pipeline_theme: str = 'pipeline')[source]#

Get the path to the docs_src directory included in the package.

Parameters:

pipeline_theme (str) – Theme to use for pipeline documentation.

Returns:

Path to the docs_src directory.

Return type:

Path

chartbook.build_docs.run_build_markdown(project_dir: pathlib.Path, pipeline_theme: str = 'catalog', publish_dir: pathlib.Path = Path('./_output/to_be_published/'), _docs_dir: pathlib.Path = Path('./_docs'), docs_src_dir: pathlib.Path = Path('_docs_src'), size_threshold: float = 50)[source]#

Run the pipeline publish script to generate markdown files.

Parameters:
  • project_dir (Path) – Root directory of the project.

  • pipeline_theme (str) – Theme to use for pipeline documentation.

  • publish_dir (Path) – Directory where files will be published.

  • _docs_dir (Path) – Directory where documentation will be built.

  • docs_src_dir (Path) – Directory containing documentation source files.

  • size_threshold (float) – File size threshold in MB above which to use memory-efficient loading.

chartbook.build_docs.run_sphinx_build(_docs_dir: pathlib.Path)[source]#

Run sphinx-build to generate HTML files.

Parameters:

_docs_dir (Path) – Directory where documentation is built.

Raises:

RuntimeError – If the sphinx-build command fails.