chartbook.diagnostics#
Utilities for generating metadata diagnostics reports.
Module Contents#
Classes#
Functions#
Generate diagnostics rows for all pipelines, dataframes, and charts. |
|
Create the metadata diagnostics CSV inside the docs build directory. |
|
Return the manifest’s resolved policy, or the default warn-only policy. |
|
Write diagnostics rows to a CSV file. |
Data#
API#
- chartbook.diagnostics.CHART_FIELDS: list[str]#
[‘name’, ‘description’, ‘dataframe’, ‘tags’, ‘frequency’, ‘observation_period’, ‘release_lag’, ‘rele…
- chartbook.diagnostics.DATAFRAME_FIELDS: list[str]#
[‘name’, ‘description’, ‘sources’, ‘providers’, ‘provider_links’, ‘tags’, ‘pull_method’, ‘path’]
- chartbook.diagnostics.PROJECT_FIELDS: list[str]#
[‘name’, ‘description’, ‘maintainer’, ‘contributors’, ‘build’, ‘os_compatibility’, ‘repo_url’]
- chartbook.diagnostics.build_diagnostics(manifest: dict[str, Any]) list[chartbook.diagnostics.DiagnosticRow][source]#
Generate diagnostics rows for all pipelines, dataframes, and charts.
Required fields come from the manifest’s [policy] section when present (catalogs), otherwise from the default lists in this module.
- chartbook.diagnostics.generate_metadata_diagnostics(manifest: dict[str, Any], docs_build_dir: pathlib.Path) list[chartbook.diagnostics.DiagnosticRow][source]#
Create the metadata diagnostics CSV inside the docs build directory.
- Returns:
The diagnostic rows, so callers can enforce strict policy.
- chartbook.diagnostics.get_active_policy(manifest: dict[str, Any]) dict[str, Any][source]#
Return the manifest’s resolved policy, or the default warn-only policy.
Catalog manifests carry a resolved
policykey; standalone pipelines fall back to the defaults.
- chartbook.diagnostics.write_diagnostics_csv(diagnostics: list[chartbook.diagnostics.DiagnosticRow], output_path: pathlib.Path) None[source]#
Write diagnostics rows to a CSV file.