idmtools.utils.gitrepo module¶
-
class
idmtools.utils.gitrepo.
GitRepo
(repo_owner: str = None, repo_name: str = None)¶ Bases:
object
-
repo_owner
: str = None¶
-
repo_name
: str = None¶
-
property
path
¶
-
property
branch
¶
-
property
verbose
¶
-
property
repo_home_url
¶ Construct repo home url Returns: repo home url
-
property
repo_example_url
¶ Construct repo example url Returns: repo example url
-
property
api_example_url
¶ Construct api url of the examples for download Returns: api url
-
parse_url
(url: str, branch: str = None, update: bool = True)¶ Parse url for owner, repo, branch and example path :param url: example url :param branch: user branch to replace the branch in url :param update: True/False - update repo or not
Returns: None
-
list_public_repos
(repo_owner: str = None, page: int = 1, raw: bool = False)¶ Utility method to retrieve all public repos :param repo_owner: the owner of the repo :param page: pagination of results :param raw: bool - return rwo data or simplified list
Returns: repo list
-
list_repo_releases
(repo_owner: str = None, repo_name: str = None, raw: bool = False)¶ Utility method to retrieve all releases of the repo :param repo_owner: the owner of the repo :param repo_name: the name of repo :param raw: bool - return raw data or simplified list
Returns: the release list of the repo
-
download
(path: str = '', output_dir: str = './', branch: str = 'master') → int¶ Download files with example url provided :param path: local file path to the repo :param output_dir: user local folder to download files to :param branch: specify branch for files download from
Returns: total file count downloaded
-
peep
(path: str = '', branch: str = 'master')¶ Download files with example url provided :param path: local file path to the repo :param branch: specify branch for files download from
Returns: None
-