howfairis.repo module

class howfairis.repo.Repo(url: str, branch: Optional[str] = None, path: Optional[str] = None)

Bases: object

Representation of a source code repository.

Parameters
  • url – URL of a code repository such as https://github.com/fair-software/howfairis

  • branch – Branch to checkout. Defaults to default branch of the repository. Can also be a commit SHA-1 hash or tag.

  • path – Path inside repository. Defaults to root.

url

URL of a code repository,

Type

str

branch

Branch to checkout. If None then Repo.default_branch will be used.

Type

str, None

path

Path inside repository.

Type

str

platform

Detected code repository platform of repo.

Type

code_repository_platforms.Platform

owner

Owner of the repo.

Type

str

repo

Name of repo. Normally the last part of the url.

Type

str

api

API endpoint of code repository platform where info about repo can be fetched.

Type

str

default_branch

The default branch of the repo on the code repository platform.

Type

str, None

raw_url_format_string

URL where a file from repo can be downloaded. URL has single placeholder for filename.

Type

str