chartbook.cli#
Module Contents#
Functions#
Generate HTML documentation in the specified output directory. |
|
Configure the default catalog path for data loading. |
|
Create a data glimpses report from dodo.py tasks. |
|
Data operations (get paths, docs). |
|
Print documentation content for a dataframe. |
|
Get the path to a dataframe’s documentation source. |
|
Get the path to a dataframe’s parquet file. |
|
List catalog objects (pipelines, dataframes, charts). |
|
List all charts across pipelines. |
|
List all dataframes across pipelines. |
|
List all pipelines. |
|
chartbook CLI tool for generating documentation websites. |
|
Publish the documentation to the specified output directory. |
|
Resolve the project directory to an absolute path. |
API#
- chartbook.cli.build(output_dir, project_dir, publish_dir, docs_build_dir, temp_docs_src_dir, keep_build_dirs, force_write, size_threshold, warn_missing)#
Generate HTML documentation in the specified output directory.
- Parameters:
output_dir (str) – Directory where output will be generated.
project_dir (str) – Root directory of the project.
publish_dir (str) – Directory where files will be published.
docs_build_dir (str) – Directory where documentation will be built.
temp_docs_src_dir (str) – Temporary directory for documentation source files.
keep_build_dirs (bool) – If True, keeps temporary build directory after generation.
force_write (bool) – If True, overwrites existing output directory.
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.cli.config()#
Configure the default catalog path for data loading.
Sets the path to a catalog’s
chartbook.tomlin~/.chartbook/settings.tomlso thatdata.load()can find pipelines without an explicitcatalog_pathargument.
- chartbook.cli.create_data_glimpses(no_samples, no_stats, output_dir, size_threshold)#
Create a data glimpses report from dodo.py tasks.
This command parses the dodo.py file in the current directory to find all CSV/Parquet files and creates a comprehensive data glimpse report in Markdown format.
- Parameters:
no_samples (bool) – If True, exclude sample values sections from the report.
no_stats (bool) – If True, exclude numeric column statistics sections from the report.
output_dir (str, optional) – Directory to save the output file.
size_threshold (float) – File size threshold in MB above which to use memory-efficient loading.
Example usage: chartbook create-data-glimpses chartbook create-data-glimpses –no-samples chartbook create-data-glimpses –no-samples –no-stats chartbook create-data-glimpses -o ./docs/ chartbook create-data-glimpses –size-threshold 100
- chartbook.cli.data()#
Data operations (get paths, docs).
- chartbook.cli.data_get_docs(pipeline, dataframe, catalog)#
Print documentation content for a dataframe.
Examples: chartbook data get-docs –pipeline yield_curve –dataframe repo_public
- chartbook.cli.data_get_docs_path(pipeline, dataframe, catalog)#
Get the path to a dataframe’s documentation source.
Examples: chartbook data get-docs-path –pipeline yield_curve –dataframe repo_public
- chartbook.cli.data_get_path(pipeline, dataframe, catalog)#
Get the path to a dataframe’s parquet file.
Examples: chartbook data get-path –pipeline yield_curve –dataframe repo_public
- chartbook.cli.ls(ctx, catalog)#
List catalog objects (pipelines, dataframes, charts).
Without a subcommand, lists all objects in a tree format. Use subcommands to list specific object types.
Examples: chartbook ls chartbook ls pipelines chartbook ls dataframes chartbook ls charts
- chartbook.cli.ls_charts(ctx)#
List all charts across pipelines.
- chartbook.cli.ls_dataframes(ctx)#
List all dataframes across pipelines.
- chartbook.cli.ls_pipelines(ctx)#
List all pipelines.
- chartbook.cli.main()#
chartbook CLI tool for generating documentation websites.
- chartbook.cli.publish(publish_dir: pathlib.Path | str | None, project_dir: pathlib.Path | str, verbose: bool)#
Publish the documentation to the specified output directory.
If no publish directory is provided, a default local directory will be used.
- chartbook.cli.resolve_project_dir(project_dir: pathlib.Path | None)[source]#
Resolve the project directory to an absolute path.
- Parameters:
project_dir (Path, optional) – The project directory path, or None to use cwd.
- Returns:
The resolved absolute path to the project directory.
- Return type:
Path