Bengal 0.2.1
Autodoc CLI lazy-loading fix, pipeline inputs, DX hints
Key fix: Autodoc CLI extractor now correctly discovers subcommands for lazy-loaded Click groups (e.g. Bengal CLI). Previously,group.commands was empty for such groups; the extractor now uses list_commands(ctx) and get_command(ctx, name)as required by Click's lazy-loading contract.
Fixes
Autodoc CLI Lazy-Loading Bug
The CLI documentation extractor failed to discover subcommands when documenting Click groups that use lazy loading (commands registered via@group.command() or add_command()at runtime rather than at definition time). Bengal's own CLI uses this pattern.
- Root cause:
group.commandsis empty for lazy-loaded groups; subcommands are only exposed vialist_commands(ctx)andget_command(ctx, name). - Fix: CLIExtractor now uses
click.Context(group),group.list_commands(ctx), andgroup.get_command(ctx, cmd_name)instead of iteratinggroup.commands.items(). - Contract: Documented in
_extract_click_groupdocstring for future maintainers.
Other Changes
- Pipeline inputs: Build orchestration now tracks and validates pipeline inputs for incremental builds.
- DX hints: Developer experience hints for common configuration and usage patterns.
- Code quality: Ruff/ty fixes, import ordering, minor refactors across autodoc, rendering, and orchestration modules.
Breaking Changes
None. Fully backward-compatible patch release.
Upgrading
uv pip install --upgrade bengal
# or
pip install --upgrade bengal
# or use the self-update command
bengal upgrade