pjkm.core.groups.registry¶
Group registry: discover and load package group definitions from YAML.
Attributes¶
Classes¶
Loads and provides access to package group definitions. |
Module Contents¶
- class pjkm.core.groups.registry.GroupRegistry[source]¶
Loads and provides access to package group definitions.
- load_builtin()[source]¶
Load all YAML group definitions from the built-in definitions directory.
- Return type:
None
- load_custom()[source]¶
Load custom group definitions from ~/.pjkm/groups/ and ./.pjkm/groups/.
Custom groups override built-in groups with the same ID. Returns list of directories that were loaded.
- Return type:
- load_sources()[source]¶
Load group definitions from all registered remote sources.
Reads ~/.pjkm/sources.yaml and .pjkmrc.yaml group_sources, then loads cached repos. Sources must be synced first via pjkm group source sync.
Returns list of (source_name, group_count) tuples.
- load_all()[source]¶
Load all groups: built-in + custom local + remote sources + plugins.
- Return type:
None
- load_directory(directory)[source]¶
Load all YAML group definitions from an arbitrary directory.
Returns count of groups loaded.
- Parameters:
directory (pathlib.Path)
- Return type:
- load_file(path)[source]¶
Load a single YAML group definition.
- Parameters:
path (pathlib.Path)
- Return type:
- list_for_archetype(archetype)[source]¶
Return groups applicable to a given archetype (empty archetypes = all).
- Parameters:
archetype (str)
- Return type:
- static import_from_pyproject(pyproject_path, output_dir, sections=None)[source]¶
Import optional dependency groups from a pyproject.toml into YAML group files.
Reads [project.optional-dependencies] from the given pyproject.toml and creates a .yaml group definition for each section (or specified sections).
Returns list of created YAML files.
- Parameters:
pyproject_path (pathlib.Path)
output_dir (pathlib.Path)
- Return type: