Hierarchy
provide.foundation.cli.click.hierarchy
¶
Click group hierarchy management and validation.
Handles creation of Click command groups, parent group hierarchies, and validation of command registry entries.
Classes¶
Functions¶
create_subgroup
¶
Create a Click subgroup and add it to the appropriate parent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cmd_name
|
str
|
Command name |
required |
entry
|
Any
|
Registry entry |
required |
groups
|
dict[str, Group]
|
Dictionary of existing groups |
required |
root_group
|
Group
|
Root group |
required |
Source code in provide/foundation/cli/click/hierarchy.py
ensure_parent_groups
¶
Ensure all parent groups in the path exist, creating them if needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent_path
|
str
|
Dot-notation path (e.g., "db.migrate") |
required |
registry
|
Registry
|
Command registry to update |
required |
Source code in provide/foundation/cli/click/hierarchy.py
should_skip_command
¶
should_skip_entry
¶
validate_command_entry
¶
Validate and extract command info from registry entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entry
|
Any
|
Registry entry |
required |
Returns:
| Type | Description |
|---|---|
CommandInfo | None
|
CommandInfo if valid, None otherwise |