Skip to content

API

Pyrig plugin that combines other pyrig plugins for open-source projects.

rig

Open-source overrides of pyrig's scaffolding and maintenance layer.

Mirrors pyrig's own rig namespace so its plugin-discovery mechanism automatically picks up this package's overrides and additions.

cli

Additional CLI commands contributed by this plugin.

commands

Backend implementations for this plugin's CLI commands.

Each module implements exactly one command as a plain callable, decoupled from the CLI registration layer. This separation lets the registration layer import commands lazily, loading each module only when its command is invoked.

plugins

Backend implementation for the plugins CLI command.

Declares the fixed set of pyrig plugins this package bundles together, and prints them to let users confirm what got installed.

plugins
plugins() -> tuple[ModuleType, ...]

Return every pyrig plugin bundled together by this plugin.

Returns:

Type Description
tuple[ModuleType, ...]

Tuple of the imported plugin modules, in dependency order.

Note

This list is maintained by hand, not discovered automatically. Keep it in sync with this package's own runtime dependencies.

Source code in src/pyrig_opensource/rig/cli/commands/plugins.py
def plugins() -> tuple[ModuleType, ...]:
    """Return every pyrig plugin bundled together by this plugin.

    Returns:
        Tuple of the imported plugin modules, in dependency order.

    Note:
        This list is maintained by hand, not discovered automatically. Keep
        it in sync with this package's own runtime dependencies.
    """
    return (
        pyrig,
        pyrig_codecov,
        pyrig_codeql,
        pyrig_fixtures,
        pyrig_openssf,
        pyrig_public,
    )
show_plugins
show_plugins() -> None

Print every bundled plugin alphabetically, one per line.

Each line is the str() of the plugin's module object, e.g. <module 'pyrig' from '...'>.

Source code in src/pyrig_opensource/rig/cli/commands/plugins.py
def show_plugins() -> None:
    """Print every bundled plugin alphabetically, one per line.

    Each line is the `str()` of the plugin's module object, e.g.
    `<module 'pyrig' from '...'>`.
    """
    for plugin in sorted(plugins(), key=lambda m: m.__name__):
        typer.echo(plugin)

subcommands

Project-specific CLI commands.

Functions defined directly in this module are registered as top-level CLI commands. Module-level typer.Typer instances are registered as command groups, with each group's name derived from the kebab-case form of the variable name.

plugins
plugins() -> None

List the pyrig plugins bundled together by this plugin.

Prints one plugin per line, each shown as its module object's str() (e.g. <module 'pyrig' from '...'>). Useful for confirming which plugins were pulled in by installing this package.

Source code in src/pyrig_opensource/rig/cli/subcommands.py
def plugins() -> None:
    """List the pyrig plugins bundled together by this plugin.

    Prints one plugin per line, each shown as its module object's `str()`
    (e.g. `<module 'pyrig' from '...'>`). Useful for confirming which plugins
    were pulled in by installing this package.
    """
    from pyrig_opensource.rig.cli.commands.plugins import show_plugins  # noqa: PLC0415

    show_plugins()