conda_recipe_manager.fetcher.git_artifact_fetcher#

Description:

Provides an Artifact Fetcher capable of acquiring source code from a remote git repository.

Classes

GitArtifactFetcher(name, url[, branch, tag, rev])

Artifact Fetcher capable of cloning a remote git repository.

class conda_recipe_manager.fetcher.git_artifact_fetcher.GitArtifactFetcher(name: str, url: str, branch: str | None = None, tag: str | None = None, rev: str | None = None)[source]#

Bases: BaseArtifactFetcher

Artifact Fetcher capable of cloning a remote git repository.

apply_patches() None#

TODO Flush this mechanism out. It looks like the same mechanism is used for http and git sources(?)

cleanup() None#

Allows the caller to manually clean-up resources used by this artifact-fetching class.

fetch() None[source]#

Retrieves source code from a remote or local git repository and stores the files in a secure temporary directory.

Raises:

FetchError -- If an issue occurred while cloning the repository.

fetched() bool#

Allows the caller to know if the target resource has been successfully fetched. In some scenarios this may be useful to know to prevent duplicated/wasted I/O calls.

Returns:

True if this object has successfully fetched the target resource AND that resource is still available. False otherwise.

get_path_to_source_code() Path[source]#

Returns the directory containing the artifact's bundled source code.

Raises:

FetchRequiredError -- If a call to fetch() is required before using this function.