Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
sispub
openbis
Commits
a66b25fd
Commit
a66b25fd
authored
8 years ago
by
Chandrasekhar Ramakrishnan
Browse files
Options
Downloads
Patches
Plain Diff
MINOR: Re-ordered commands in cli source.
parent
2233ad8f
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
src/python/OBis/obis/scripts/cli.py
+41
-12
41 additions, 12 deletions
src/python/OBis/obis/scripts/cli.py
with
41 additions
and
12 deletions
src/python/OBis/obis/scripts/cli.py
+
41
−
12
View file @
a66b25fd
...
...
@@ -45,6 +45,37 @@ def cli(ctx, quiet):
ctx
.
obj
[
'
quiet
'
]
=
quiet
@cli.command
()
@click.pass_context
@click.argument
(
'
other
'
,
type
=
click
.
Path
(
exists
=
True
))
def
addref
(
ctx
,
other
):
"""
Add a reference to the other repository in this repository.
"""
click_echo
(
"
addref {}
"
.
format
(
other
))
@cli.command
()
@click.pass_context
@click.argument
(
'
url
'
)
def
clone
(
ctx
,
url
):
"""
Clone the repository found at url.
"""
click_echo
(
"
clone {}
"
.
format
(
url
))
@cli.command
()
@click.pass_context
@click.option
(
'
-m
'
,
'
--msg
'
,
prompt
=
True
,
help
=
'
A message explaining what was done.
'
)
@click.option
(
'
-a
'
,
'
--auto_add
'
,
default
=
True
,
is_flag
=
True
,
help
=
'
Automatically add all untracked files.
'
)
@click.option
(
'
-s
'
,
'
--skip_verification
'
,
default
=
False
,
is_flag
=
True
,
help
=
'
Do not verify cerficiates
'
)
def
commit
(
ctx
,
msg
,
auto_add
,
skip_verification
):
"""
Commit the repository to git and inform openBIS.
"""
verify_certificates
=
not
skip_verification
data_mgmt
=
shared_data_mgmt
(
verify_certificates
=
verify_certificates
)
return
data_mgmt
.
commit
(
msg
,
auto_add
)
@cli.command
()
@click.option
(
'
-g
'
,
'
--is_global
'
,
default
=
False
,
is_flag
=
True
,
help
=
'
Configure global or local.
'
)
@click.argument
(
'
property
'
,
default
=
""
)
...
...
@@ -106,15 +137,11 @@ def analysis(ctx, folder):
@cli.command
()
@click.pass_context
@click.option
(
'
-m
'
,
'
--msg
'
,
prompt
=
True
,
help
=
'
A message explaining what was done.
'
)
@click.option
(
'
-a
'
,
'
--auto_add
'
,
default
=
True
,
is_flag
=
True
,
help
=
'
Automatically add all untracked files.
'
)
@click.option
(
'
-s
'
,
'
--skip_verification
'
,
default
=
False
,
is_flag
=
True
,
help
=
'
Do not verify cerficiates
'
)
def
commit
(
ctx
,
msg
,
auto_add
,
skip_verification
):
"""
Commit the repository to git and inform openBIS.
@click.argument
(
'
file
'
)
def
get
(
ctx
,
f
):
"""
Get one or more files from a clone of this repository.
"""
verify_certificates
=
not
skip_verification
data_mgmt
=
shared_data_mgmt
(
verify_certificates
=
verify_certificates
)
return
data_mgmt
.
commit
(
msg
,
auto_add
)
click_echo
(
"
get {}
"
.
format
(
f
))
@cli.command
()
...
...
@@ -148,11 +175,13 @@ def clone(ctx, url):
@cli.command
()
@click.pass_context
@click.
argument
(
'
file
'
)
def
get
(
ctx
,
f
):
"""
Get one or more files from a clone of
th
is
repository.
@click.
option
(
'
-s
'
,
'
--skip_verification
'
,
default
=
False
,
is_flag
=
True
,
help
=
'
Do not verify cerficiates
'
)
def
sync
(
ctx
,
skip_verification
):
"""
Sync
th
e
repository
with openBIS
.
"""
click_echo
(
"
get {}
"
.
format
(
f
))
verify_certificates
=
not
skip_verification
data_mgmt
=
shared_data_mgmt
(
verify_certificates
=
verify_certificates
)
return
data_mgmt
.
sync
()
def
main
():
...
...
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