snakemake.common.git.get_git_root_parent_directory
- snakemake.common.git.get_git_root_parent_directory(path, input_path)[source]
This function will recursively go through parent directories until a git repository is found or until no parent directories are left, in which case an error will be raised. This is needed when providing a path to a file/folder that is located on a branch/tag not currently checked out.
- Parameters:
path – (str) Path a to a directory that is located inside the repo
input_path – (str) origin path, used when raising WorkflowError
- Returns:
path to the root folder for git repo