wfexs_backend.fetchers.git#

Module Contents#

Classes#

Data#

API#

wfexs_backend.fetchers.git.GITHUB_NETLOC = 'github.com'#
class wfexs_backend.fetchers.git.GitFetcher(progs: wfexs_backend.common.ProgsMapping, setup_block: Mapping[str, Any] | None = None)#

Bases: wfexs_backend.fetchers.AbstractRepoFetcher

GIT_PROTO: Final[str] = 'git'#
GIT_PROTO_PREFIX: Final[str] = None#
GITHUB_SCHEME: Final[str] = 'github'#
DEFAULT_GIT_CMD: Final[SymbolicName] = 'cast(...)'#
HEAD_LABEL: Final[bytes] = b'HEAD'#
REFS_HEADS_PREFIX: Final[bytes] = b'refs/heads/'#
REFS_TAGS_PREFIX: Final[bytes] = b'refs/tags/'#
GIT_SCHEMES: Final[Sequence[str]] = ['https', 'git', 'ssh', 'file']#
classmethod GetSchemeHandlers() Mapping[str, DocumentedStatefulProtocolFetcher]#
property description: str#
classmethod GetNeededPrograms() Sequence[SymbolicName]#
classmethod _find_git_repo_in_uri(remote_file: URIType | parse.ParseResult) Tuple[RemoteRepo, Sequence[str], Sequence[RepoTag]]#
classmethod GuessRepoParams(wf_url: URIType | parse.ParseResult, logger: logging.Logger | None = None, fail_ok: bool = False) RemoteRepo | None#
build_pid_from_repo(remote_repo: wfexs_backend.fetchers.RemoteRepo) str | None#

This method is required to generate a PID which usually represents an element (usually a workflow) in a repository. If the fetcher does not recognize the type of repo, it should return None

materialize_repo(repoURL: wfexs_backend.common.RepoURL, repoTag: RepoTag | None = None, repo_tag_destdir: PathLikePath | None = None, base_repo_destdir: PathLikePath | None = None, doUpdate: bool | None = True) Tuple[pathlib.Path, RemoteRepo, Sequence[URIWithMetadata]]#
Parameters:
  • repoURL – The URL to the repository.

  • repoTag – The tag or branch to checkout.

By default, checkout the repository’s default branch. :param doUpdate: :return:

fetch(remote_file: wfexs_backend.common.URIType, cachedFilename: wfexs_backend.common.PathLikePath, secContext: SecurityContextConfig | None = None) wfexs_backend.fetchers.ProtocolFetcherReturn#