chartbook.diagnostics#

Utilities for generating metadata diagnostics reports.

Module Contents#

Classes#

Functions#

build_diagnostics

Generate diagnostics rows for all pipelines, dataframes, and charts.

generate_metadata_diagnostics

Create the metadata diagnostics CSV file inside the docs build directory.

write_diagnostics_csv

Write diagnostics rows to a CSV file.

Data#

API#

chartbook.diagnostics.CHART_DOCS_FIELDS: tuple[str, str]#

(‘chart_docs_path’, ‘chart_docs_str’)

chartbook.diagnostics.CHART_FIELDS: list[str]#

[‘chart_name’, ‘short_description_chart’, ‘dataframe_id’, ‘topic_tags’, ‘data_frequency’, ‘observati…

chartbook.diagnostics.DATAFRAME_DOCS_FIELDS: tuple[str, str]#

(‘dataframe_docs_path’, ‘dataframe_docs_str’)

chartbook.diagnostics.DATAFRAME_FIELDS: list[str]#

[‘dataframe_name’, ‘short_description_df’, ‘data_sources’, ‘data_providers’, ‘links_to_data_provider…

class chartbook.diagnostics.DiagnosticRow[source]#
identifier: str#

None

metadata_complete: bool#

None

missing_fields: str#

None

object_name: str#

None

object_type: str#

None

None

pipeline_id: str#

None

to_dict() dict[str, Any][source]#
chartbook.diagnostics.OPTIONAL_CHART_FIELDS: list[str]#

[‘data_series’]

chartbook.diagnostics.PIPELINE_FIELDS: list[str]#

[‘id’, ‘pipeline_name’, ‘pipeline_description’, ‘lead_pipeline_developer’, ‘contributors’, ‘build_co…

chartbook.diagnostics.build_diagnostics(manifest: dict[str, Any]) list[chartbook.diagnostics.DiagnosticRow][source]#

Generate diagnostics rows for all pipelines, dataframes, and charts.

chartbook.diagnostics.generate_metadata_diagnostics(manifest: dict[str, Any], docs_build_dir: pathlib.Path) pathlib.Path[source]#

Create the metadata diagnostics CSV file inside the docs build directory.

chartbook.diagnostics.write_diagnostics_csv(diagnostics: list[chartbook.diagnostics.DiagnosticRow], output_path: pathlib.Path) None[source]#

Write diagnostics rows to a CSV file.