Skip to content

Repo

repo

Defines helpers to clone / checkout a git repository

The mirumoji frontend (apps/frontend) directory is not shipped with the python library, so this module clones or updates the mirumoji repo into the app's user-data directory so that the frontend image can be built locally

ensure_repo(*, repo_url=REPO_URL, repo_path=HOST_REPO_PATH, ref=DEFAULT_BRANCH)

Clones or updates the mirumoji repo at ref, yielding progress lines

Clones repo_url into repo_path when absent, otherwise fetches tags and checks ref out. Output is yielded line by line

Release Tags

ref is normally a release tag such as v3.6.0, so the build matches the pinned image version. A tag checks out a detached HEAD, so no branch fast-forward is attempted (tags are immutable)

Parameters:

Name Type Description Default
repo_url str

The repository URL to clone

REPO_URL
repo_path Path

Where the checkout lives (the user-data dir)

HOST_REPO_PATH
ref str

The branch or tag to check out

DEFAULT_BRANCH

Yields:

Type Description
str

Each git output line as it is produced

Returns:

Type Description
Path

The path to the ready checkout

Raises:

Type Description
BuildSourceError

If git is missing or the clone/checkout fails