check_template_bundles¶
rhiza_hooks.check_template_bundles
¶
Validate template-bundles.yml structure and consistency.
This script validates the template bundles configuration file to ensure: 1. Valid YAML syntax 2. Required fields are present 3. Bundle dependencies reference existing bundles 4. File paths follow expected patterns 5. Examples reference valid bundles
The script reads .rhiza/template.yml to find the template repository, then fetches template-bundles.yml from that remote repository.
The implementation is split across focused modules — :mod:rhiza_hooks._bundles_fetch
(obtaining a document), :mod:rhiza_hooks._bundles_validate (structural checks),
and :mod:rhiza_hooks._bundles_config (reading .rhiza/template.yml). This
module is the CLI/orchestration layer and re-exports those helpers so
rhiza_hooks.check_template_bundles remains the single public import surface.
Those three modules are themselves private, so the package's public surface is unchanged by the split. Within them a leading underscore marks a helper with no caller outside its own file — which is why this module imports only unprefixed names from them.
Exit codes
0 - Validation passed 1 - Validation failed
main(argv=None, fetcher=fetch_remote_bundles)
¶
Main entry point.
fetcher is the one place the real network call is named. The console script
takes the default; a test passes a fake document source as an argument rather than
rebinding this module's fetch_remote_bundles global.