Skip to content
Snippets Groups Projects
Commit f710dfd7 authored by mjbonifa's avatar mjbonifa
Browse files

(docs) started to write the docstrings

parent 878495ee
No related branches found
No related tags found
No related merge requests found
......@@ -170,6 +170,15 @@ def create_empty_git_dir(path):
def check_delete_dir(path, msg):
"""Checks on the command line if a user wants to delete a directory
Args:
path (Path): path of the directory to be deleted
msg (str): message to be displayed to the user
Returns:
Boolean: True if deleted
"""
deleted = False
user_input = input(f"{msg}").strip().lower()
......@@ -183,6 +192,19 @@ def check_delete_dir(path, msg):
def fork(phen_dir, upstream_url, upstream_version, new_origin_url=None):
"""Forks an upstream phenotype in a remote repo at a specific version to a local director, and optionally sets to a new remote origin"
Args:
phen_dir (str): local directory path where the upstream repo is to be cloned
upstream_url (str): url to the upstream repo
upstream_version (str): version in the upstream repo to clone
new_origin_url (str, optional): url of the remote repo to set as the new origin. Defaults to None.
Raises:
ValueError: if the specified version is not in the upstream repo
ValueError: if the upstream repo is not a valid phenotype repo
ValueError: if there's any other problems with Git
"""
logger.info(
f"Forking upstream repo {upstream_url} {upstream_version} into directory: {phen_dir}"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment