Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
concepts-processing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meldb
concepts-processing
Commits
f710dfd7
Commit
f710dfd7
authored
2 months ago
by
mjbonifa
Browse files
Options
Downloads
Patches
Plain Diff
(docs) started to write the docstrings
parent
878495ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
acmc/phen.py
+22
-0
22 additions, 0 deletions
acmc/phen.py
with
22 additions
and
0 deletions
acmc/phen.py
+
22
−
0
View file @
f710dfd7
...
...
@@ -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
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment