API reference ============= Generated from the docstrings and type annotations in ``src/``. Only the names on this page are public and follow semantic versioning (while ``0.x``, a breaking change bumps the minor version and is listed in the changelog); every other module is internal. ``tests/test_api_reference.py`` fails if a name in ``graftkit.__all__`` or ``graftkit.testing.__all__`` is missing. .. currentmodule:: graftkit Extensions ---------- A repository adds commands with an ``Extension``, exposed as an entry point in the ``graftkit.extensions`` group (`` = ".graftkit:EXTENSION"``) and named by ``[cli] extension = ""`` in its ``graftkit.toml``. .. autosummary:: :toctree: generated/ :nosignatures: Extension Repo Declaring commands ------------------ Re-exported from `cli-interview-kit `_: how commands, flags and interview questions are declared. .. autosummary:: :toctree: generated/ :nosignatures: Command Example Option Interview Question Consent Invocation Console CliError non_empty when .. currentmodule:: graftkit.testing Testing ------- Helpers for testing an extension, or the core. The pytest plugin, registered as ``graftkit`` wherever the package is installed, provides them as fixtures: ``graftkit_root(config)`` makes a temporary root with the developer's ``GRAFTKIT_*`` variables and user config kept out, ``graftkit_run(root, *args, ...)`` is ``run``, ``fake_github`` is a fresh ``FakeGitHub`` and ``fake_git`` a fresh ``FakeGit``. .. autosummary:: :toctree: generated/ :nosignatures: run Result make_root assert_conformant FakeGitHub FakeGit FakeClone PullRequest isolate