pjkm.cli.commands.groups¶
Group management commands — group create/import/validate/list/sync + source.
Attributes¶
Functions¶
|
Scaffold a new package group YAML definition. |
|
Import optional dependency groups from an external pyproject.toml. |
|
Validate package group YAML definitions. |
List all available groups (built-in + custom + remote sources). |
|
|
Add a remote git repo as a group source. |
|
Remove a registered group source and its cached data. |
List all registered group sources. |
|
|
Sync (clone or update) remote group sources. |
Module Contents¶
- pjkm.cli.commands.groups.group_create(group_id=typer.Argument(help='Group ID (e.g. quant, ml-data)'), name=typer.Option('', '--name', '-n', help='Human-readable name'), output_dir=typer.Option('', '--dir', '-d', help='Output directory (default: ./.pjkm/groups/)'))[source]¶
Scaffold a new package group YAML definition.
Creates a ready-to-edit YAML file. Add dependencies, set archetypes, and optionally reference template fragments.
Custom groups in ~/.pjkm/groups/ or ./.pjkm/groups/ are loaded automatically alongside built-in groups.
- pjkm.cli.commands.groups.group_import(pyproject=typer.Argument(help='Path to pyproject.toml to import from'), section=typer.Option([], '--section', '-s', help='Specific sections to import (default: all)'), output_dir=typer.Option('', '--dir', '-d', help='Output directory (default: ./.pjkm/groups/)'))[source]¶
Import optional dependency groups from an external pyproject.toml.
Reads [project.optional-dependencies] and creates a .yaml group file for each section. Great for importing groups from existing projects.
Example: pjkm group import ../ooai/packages/wraquant/pyproject.toml
- pjkm.cli.commands.groups.group_validate(path=typer.Argument('', help='Path to a .yaml file or directory (default: ./.pjkm/groups/)'))[source]¶
Validate package group YAML definitions.
Checks that group files parse correctly, have valid schema, and that dependency references are resolvable.
- Parameters:
path (str)
- Return type:
None
- pjkm.cli.commands.groups.group_list()[source]¶
List all available groups (built-in + custom + remote sources).
- Return type:
None
- pjkm.cli.commands.groups.source_add(url=typer.Argument(help='Git repo URL containing group YAML files'), name=typer.Option('', '--name', '-n', help='Short name for this source'), path=typer.Option('', '--path', '-p', help='Subdirectory within repo containing .yaml files'), ref=typer.Option('', '--ref', '-r', help='Branch, tag, or commit to track'), sync_now=typer.Option(True, '--sync/--no-sync', help='Clone the repo immediately'))[source]¶
Add a remote git repo as a group source.
The repo should contain .yaml group definition files (same format as built-in groups). After adding, groups from this source are available everywhere — in pjkm init, pjkm group list, etc.
Examples
pjkm group source add https://github.com/org/pjkm-groups-quant.git
- pjkm group source add git@github.com:org/ooai.git
–path packages/wraquant/groups –name quant
- pjkm group source add https://github.com/team/shared-groups.git
–ref main –name team-groups
- pjkm.cli.commands.groups.source_remove(name=typer.Argument(help='Source name to remove'))[source]¶
Remove a registered group source and its cached data.
- Parameters:
name (str)
- Return type:
None
- pjkm.cli.commands.groups.source_list()[source]¶
List all registered group sources.
- Return type:
None
- pjkm.cli.commands.groups.group_sync(name=typer.Argument('', help='Source name to sync (default: all)'))[source]¶
Sync (clone or update) remote group sources.
Pulls the latest group definitions from registered git repos. Run this after adding a source or to get updates.
- Parameters:
name (str)
- Return type:
None