API Reference¶
rhiza_hooks ships a console script per module, each a standalone module with a main() entry point. Every one is also published as a pre-commit hook in .pre-commit-hooks.yaml.
| Module | Entry point | Purpose |
|---|---|---|
check_bumpversion_config |
check-bumpversion-config |
Assert a bumpversion section exists where bump-my-version searches, and agrees with pyproject.toml |
check_go_version |
check-go-version-consistency |
Assert the go.mod directives and .go-version agree |
check_license_metadata |
check-license-metadata |
Reject a PEP 639 license expression declared alongside a License :: trove classifier |
check_makefile_targets |
check-makefile-targets |
Verify required Makefile targets are present |
check_managed_files |
check-managed-files |
Refuse edits to files listed in .rhiza/template.lock, which the next sync overwrites |
check_python_version |
check-python-version-consistency |
Assert Python version is consistent across project files |
check_rhiza_config |
check-rhiza-config |
Validate .rhiza/template.yml |
check_rust_version |
check-rust-version-consistency |
Assert the pinned Rust toolchain is not older than the declared MSRV |
check_template_bundles |
check-template-bundles |
Validate template-bundles.yml structure |
check_test_layout |
check-test-layout |
Assert tests mirror sources 1:1, by module and by Test* class, in both directions |
check_workflow_make_targets |
check-workflow-make-targets |
Assert every make target a CI workflow runs is defined in the Makefile or its includes |
check_workflow_names |
check-rhiza-workflow-names |
Enforce (RHIZA) prefix on GitHub Actions workflow names |
update_readme_help |
update-readme-help |
Embed make help output into README.md |
Internal modules¶
These modules hold shared logic used by the hooks above. They have no main() entry point and are not part of the public CLI surface, but are documented here for contributors.
| Module | Purpose |
|---|---|
_bundles_config |
Read the project's .rhiza/template.yml configuration |
_bundles_fetch |
Load/fetch a template-bundles document (local, bytes, or remote) into a typed result |
_bundles_validate |
Structural validation of a template-bundles document |
_bumpversion_config |
Locate and parse the bumpversion config bump-my-version would read, in either format |
_config_schema |
Canonical .rhiza/template.yml keys, aliases, and config normalization |
_makefile |
Shared Makefile parsing: target extraction and include expansion |
_managed |
Resolve the template-owned paths — .rhiza/template.lock's files: minus template.yml's exclude: |
_repo |
Shared helpers (e.g. locating the repository root) |
_toml |
Shared lenient TOML loader: a missing, malformed or non-UTF-8 file reads as absent |
_version |
Shared dotted-numeric version parsing and comparison, used by the Rust and Go hooks |
_yaml |
Shared helper for loading a YAML file into a top-level mapping |