From 4fdbd1a884113a1a74741229a7de450c9daa6ab7 Mon Sep 17 00:00:00 2001 From: Yves Noirjean <yves.noirjean@id.ethz.ch> Date: Mon, 25 Jun 2018 18:18:30 +0200 Subject: [PATCH] SSDM-6849: added man pages to obis --- obis/src/bash/create_man.sh | 14 ++++ obis/src/python/man/man1/obis-addref.1 | 23 +++++ obis/src/python/man/man1/obis-clone.1 | 33 ++++++++ obis/src/python/man/man1/obis-collection.1 | 34 ++++++++ obis/src/python/man/man1/obis-commit.1 | 32 +++++++ obis/src/python/man/man1/obis-config.1 | 34 ++++++++ obis/src/python/man/man1/obis-data_set.1 | 40 +++++++++ obis/src/python/man/man1/obis-download.1 | 33 ++++++++ obis/src/python/man/man1/obis-init.1 | 29 +++++++ obis/src/python/man/man1/obis-init_analysis.1 | 31 +++++++ obis/src/python/man/man1/obis-move.1 | 33 ++++++++ obis/src/python/man/man1/obis-object.1 | 34 ++++++++ obis/src/python/man/man1/obis-removeref.1 | 23 +++++ obis/src/python/man/man1/obis-repository.1 | 43 ++++++++++ obis/src/python/man/man1/obis-settings.1 | 32 +++++++ obis/src/python/man/man1/obis-status.1 | 23 +++++ obis/src/python/man/man1/obis-sync.1 | 26 ++++++ obis/src/python/man/man1/obis.1 | 84 +++++++++++++++++++ obis/src/python/obis/scripts/cli.py | 77 +++++------------ obis/src/python/setup.py | 5 ++ 20 files changed, 627 insertions(+), 56 deletions(-) create mode 100755 obis/src/bash/create_man.sh create mode 100644 obis/src/python/man/man1/obis-addref.1 create mode 100644 obis/src/python/man/man1/obis-clone.1 create mode 100644 obis/src/python/man/man1/obis-collection.1 create mode 100644 obis/src/python/man/man1/obis-commit.1 create mode 100644 obis/src/python/man/man1/obis-config.1 create mode 100644 obis/src/python/man/man1/obis-data_set.1 create mode 100644 obis/src/python/man/man1/obis-download.1 create mode 100644 obis/src/python/man/man1/obis-init.1 create mode 100644 obis/src/python/man/man1/obis-init_analysis.1 create mode 100644 obis/src/python/man/man1/obis-move.1 create mode 100644 obis/src/python/man/man1/obis-object.1 create mode 100644 obis/src/python/man/man1/obis-removeref.1 create mode 100644 obis/src/python/man/man1/obis-repository.1 create mode 100644 obis/src/python/man/man1/obis-settings.1 create mode 100644 obis/src/python/man/man1/obis-status.1 create mode 100644 obis/src/python/man/man1/obis-sync.1 create mode 100644 obis/src/python/man/man1/obis.1 diff --git a/obis/src/bash/create_man.sh b/obis/src/bash/create_man.sh new file mode 100755 index 00000000000..957d079475b --- /dev/null +++ b/obis/src/bash/create_man.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +version=0.1.0 +commands=( addref clone collection commit config data_set download init init_analysis move object removeref repository settings status sync ) + +mkdir -p man/man1 + +for command in "${commands[@]}" +do + echo generating man page for $command... + help2man --version-string=$version "obis $command" > man/obis-addref.1 > man/man1/obis-$command.1 +done + +echo done. diff --git a/obis/src/python/man/man1/obis-addref.1 b/obis/src/python/man/man1/obis-addref.1 new file mode 100644 index 00000000000..bd125677d23 --- /dev/null +++ b/obis/src/python/man/man1/obis-addref.1 @@ -0,0 +1,23 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS ADDREF "1" "June 2018" "obis addref 0.1.0" "User Commands" +.SH NAME +obis addref \- manual page for obis addref 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,addref \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis addref +is maintained as a Texinfo manual. If the +.B info +and +.B obis addref +programs are properly installed at your site, the command +.IP +.B info obis addref +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-clone.1 b/obis/src/python/man/man1/obis-clone.1 new file mode 100644 index 00000000000..e256a16e811 --- /dev/null +++ b/obis/src/python/man/man1/obis-clone.1 @@ -0,0 +1,33 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS CLONE "1" "June 2018" "obis clone 0.1.0" "User Commands" +.SH NAME +obis clone \- manual page for obis clone 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,clone \/\fR[\fI\,OPTIONS\/\fR] \fI\,DATA_SET_ID\/\fR +.SH OPTIONS +.TP +\fB\-u\fR, \fB\-\-ssh_user\fR TEXT +User to connect to remote systems via ssh +.TP +\fB\-c\fR, \fB\-\-content_copy_index\fR INTEGER +Index of the content copy to clone from in +case there are multiple copies +.TP +\fB\-s\fR, \fB\-\-skip_integrity_check\fR +Skip file integrity check with checksums. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis clone +is maintained as a Texinfo manual. If the +.B info +and +.B obis clone +programs are properly installed at your site, the command +.IP +.B info obis clone +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-collection.1 b/obis/src/python/man/man1/obis-collection.1 new file mode 100644 index 00000000000..41308f44d8a --- /dev/null +++ b/obis/src/python/man/man1/obis-collection.1 @@ -0,0 +1,34 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS COLLECTION "1" "June 2018" "obis collection 0.1.0" "User Commands" +.SH NAME +obis collection \- manual page for obis collection 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,collection \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the collection. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +get +set +.SH "SEE ALSO" +The full documentation for +.B obis collection +is maintained as a Texinfo manual. If the +.B info +and +.B obis collection +programs are properly installed at your site, the command +.IP +.B info obis collection +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-commit.1 b/obis/src/python/man/man1/obis-commit.1 new file mode 100644 index 00000000000..a836528faf1 --- /dev/null +++ b/obis/src/python/man/man1/obis-commit.1 @@ -0,0 +1,32 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS COMMIT "1" "June 2018" "obis commit 0.1.0" "User Commands" +.SH NAME +obis commit \- manual page for obis commit 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,commit \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-m\fR, \fB\-\-msg\fR TEXT +A message explaining what was done. +.TP +\fB\-a\fR, \fB\-\-auto_add\fR +Automatically add all untracked files. +.TP +\fB\-i\fR, \fB\-\-ignore_missing_parent\fR +If parent data set is missing, ignore it. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis commit +is maintained as a Texinfo manual. If the +.B info +and +.B obis commit +programs are properly installed at your site, the command +.IP +.B info obis commit +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-config.1 b/obis/src/python/man/man1/obis-config.1 new file mode 100644 index 00000000000..33a76ed822b --- /dev/null +++ b/obis/src/python/man/man1/obis-config.1 @@ -0,0 +1,34 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS CONFIG "1" "June 2018" "obis config 0.1.0" "User Commands" +.SH NAME +obis config \- manual page for obis config 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,config \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set configurations. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +get +set +.SH "SEE ALSO" +The full documentation for +.B obis config +is maintained as a Texinfo manual. If the +.B info +and +.B obis config +programs are properly installed at your site, the command +.IP +.B info obis config +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-data_set.1 b/obis/src/python/man/man1/obis-data_set.1 new file mode 100644 index 00000000000..ddf8530a726 --- /dev/null +++ b/obis/src/python/man/man1/obis-data_set.1 @@ -0,0 +1,40 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS DATA_SET "1" "June 2018" "obis data_set 0.1.0" "User Commands" +.SH NAME +obis data_set \- manual page for obis data_set 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,data_set \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the data set. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-p\fR, \fB\-\-is_data_set_property\fR +Configure data set property. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +clone Clone the repository found in the given data set id. +download Download files of a linked data set. +get +move Move the repository found in the given data set id. +set +.SH "SEE ALSO" +The full documentation for +.B obis data_set +is maintained as a Texinfo manual. If the +.B info +and +.B obis data_set +programs are properly installed at your site, the command +.IP +.B info obis data_set +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-download.1 b/obis/src/python/man/man1/obis-download.1 new file mode 100644 index 00000000000..e841fbbe043 --- /dev/null +++ b/obis/src/python/man/man1/obis-download.1 @@ -0,0 +1,33 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS DOWNLOAD "1" "June 2018" "obis download 0.1.0" "User Commands" +.SH NAME +obis download \- manual page for obis download 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,download \/\fR[\fI\,OPTIONS\/\fR] \fI\,DATA_SET_ID\/\fR +.SH OPTIONS +.TP +\fB\-c\fR, \fB\-\-content_copy_index\fR INTEGER +Index of the content copy to download from. +.TP +\fB\-f\fR, \fB\-\-file\fR TEXT +File in the data set to download \- +downloading all if not given. +.TP +\fB\-s\fR, \fB\-\-skip_integrity_check\fR +Skip file integrity check with checksums. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis download +is maintained as a Texinfo manual. If the +.B info +and +.B obis download +programs are properly installed at your site, the command +.IP +.B info obis download +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-init.1 b/obis/src/python/man/man1/obis-init.1 new file mode 100644 index 00000000000..d9ecf717fec --- /dev/null +++ b/obis/src/python/man/man1/obis-init.1 @@ -0,0 +1,29 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS INIT "1" "June 2018" "obis init 0.1.0" "User Commands" +.SH NAME +obis init \- manual page for obis init 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,init \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] [\fI\,DESCRIPTION\/\fR] +.SH OPTIONS +.TP +\fB\-oi\fR, \fB\-\-object_id\fR TEXT +Set the id of the owning sample. +.TP +\fB\-ci\fR, \fB\-\-collection_id\fR TEXT +Set the id of the owning experiment. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis init +is maintained as a Texinfo manual. If the +.B info +and +.B obis init +programs are properly installed at your site, the command +.IP +.B info obis init +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-init_analysis.1 b/obis/src/python/man/man1/obis-init_analysis.1 new file mode 100644 index 00000000000..31a239dd49f --- /dev/null +++ b/obis/src/python/man/man1/obis-init_analysis.1 @@ -0,0 +1,31 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS INIT_ANALYSIS "1" "June 2018" "obis init_analysis 0.1.0" "User Commands" +.SH NAME +obis init_analysis \- manual page for obis init_analysis 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,init_analysis \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] [\fI\,DESCRIPTION\/\fR] +.SH OPTIONS +.HP +\fB\-p\fR, \fB\-\-parent\fR DIRECTORY +.TP +\fB\-oi\fR, \fB\-\-object_id\fR TEXT +Set the id of the owning sample. +.TP +\fB\-ci\fR, \fB\-\-collection_id\fR TEXT +Set the id of the owning experiment. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis init_analysis +is maintained as a Texinfo manual. If the +.B info +and +.B obis init_analysis +programs are properly installed at your site, the command +.IP +.B info obis init_analysis +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-move.1 b/obis/src/python/man/man1/obis-move.1 new file mode 100644 index 00000000000..1e162b2cab7 --- /dev/null +++ b/obis/src/python/man/man1/obis-move.1 @@ -0,0 +1,33 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS MOVE "1" "June 2018" "obis move 0.1.0" "User Commands" +.SH NAME +obis move \- manual page for obis move 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,move \/\fR[\fI\,OPTIONS\/\fR] \fI\,DATA_SET_ID\/\fR +.SH OPTIONS +.TP +\fB\-u\fR, \fB\-\-ssh_user\fR TEXT +User to connect to remote systems via ssh +.TP +\fB\-c\fR, \fB\-\-content_copy_index\fR INTEGER +Index of the content copy to clone from in +case there are multiple copies +.TP +\fB\-s\fR, \fB\-\-skip_integrity_check\fR +Skip file integrity check with checksums. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis move +is maintained as a Texinfo manual. If the +.B info +and +.B obis move +programs are properly installed at your site, the command +.IP +.B info obis move +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-object.1 b/obis/src/python/man/man1/obis-object.1 new file mode 100644 index 00000000000..dd8dad5da7f --- /dev/null +++ b/obis/src/python/man/man1/obis-object.1 @@ -0,0 +1,34 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS OBJECT "1" "June 2018" "obis object 0.1.0" "User Commands" +.SH NAME +obis object \- manual page for obis object 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,object \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the object. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +get +set +.SH "SEE ALSO" +The full documentation for +.B obis object +is maintained as a Texinfo manual. If the +.B info +and +.B obis object +programs are properly installed at your site, the command +.IP +.B info obis object +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-removeref.1 b/obis/src/python/man/man1/obis-removeref.1 new file mode 100644 index 00000000000..594aa0eea8d --- /dev/null +++ b/obis/src/python/man/man1/obis-removeref.1 @@ -0,0 +1,23 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS REMOVEREF "1" "June 2018" "obis removeref 0.1.0" "User Commands" +.SH NAME +obis removeref \- manual page for obis removeref 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,removeref \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis removeref +is maintained as a Texinfo manual. If the +.B info +and +.B obis removeref +programs are properly installed at your site, the command +.IP +.B info obis removeref +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-repository.1 b/obis/src/python/man/man1/obis-repository.1 new file mode 100644 index 00000000000..c12ea44e2fd --- /dev/null +++ b/obis/src/python/man/man1/obis-repository.1 @@ -0,0 +1,43 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS REPOSITORY "1" "June 2018" "obis repository 0.1.0" "User Commands" +.SH NAME +obis repository \- manual page for obis repository 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,repository \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the repository. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.TP +addref +Add the given repository as a reference to openBIS. +.IP +clear +commit Commit the repository to git and inform openBIS. +get +init Initialize the folder as a data repository. +init_analysis Initialize the folder as an analysis folder. +removeref Remove the reference to the given repository from openBIS. +set +status Show the state of the obis repository. +sync Sync the repository with openBIS. +.SH "SEE ALSO" +The full documentation for +.B obis repository +is maintained as a Texinfo manual. If the +.B info +and +.B obis repository +programs are properly installed at your site, the command +.IP +.B info obis repository +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-settings.1 b/obis/src/python/man/man1/obis-settings.1 new file mode 100644 index 00000000000..d1e89d40c5c --- /dev/null +++ b/obis/src/python/man/man1/obis-settings.1 @@ -0,0 +1,32 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS SETTINGS "1" "June 2018" "obis settings 0.1.0" "User Commands" +.SH NAME +obis settings \- manual page for obis settings 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,settings \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get all settings. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +get +.SH "SEE ALSO" +The full documentation for +.B obis settings +is maintained as a Texinfo manual. If the +.B info +and +.B obis settings +programs are properly installed at your site, the command +.IP +.B info obis settings +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-status.1 b/obis/src/python/man/man1/obis-status.1 new file mode 100644 index 00000000000..dedbc5b3b0d --- /dev/null +++ b/obis/src/python/man/man1/obis-status.1 @@ -0,0 +1,23 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS STATUS "1" "June 2018" "obis status 0.1.0" "User Commands" +.SH NAME +obis status \- manual page for obis status 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,status \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis status +is maintained as a Texinfo manual. If the +.B info +and +.B obis status +programs are properly installed at your site, the command +.IP +.B info obis status +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-sync.1 b/obis/src/python/man/man1/obis-sync.1 new file mode 100644 index 00000000000..5eae1c9eb4b --- /dev/null +++ b/obis/src/python/man/man1/obis-sync.1 @@ -0,0 +1,26 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS SYNC "1" "June 2018" "obis sync 0.1.0" "User Commands" +.SH NAME +obis sync \- manual page for obis sync 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,sync \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-i\fR, \fB\-\-ignore_missing_parent\fR +If parent data set is missing, ignore it. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis sync +is maintained as a Texinfo manual. If the +.B info +and +.B obis sync +programs are properly installed at your site, the command +.IP +.B info obis sync +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis.1 b/obis/src/python/man/man1/obis.1 new file mode 100644 index 00000000000..694b0a5f3f0 --- /dev/null +++ b/obis/src/python/man/man1/obis.1 @@ -0,0 +1,84 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS, "1" "June 2018" "obis, version 0.1.0" "User Commands" +.SH NAME +obis, \- manual page for obis, version 0.1.0 +.SH SYNOPSIS +.B obis +[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH OPTIONS +.TP +\fB\-\-version\fR +Show the version and exit. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Suppress status reporting. +.TP +\fB\-s\fR, \fB\-\-skip_verification\fR +Do not verify cerficiates +.TP +\fB\-d\fR, \fB\-\-debug\fR +Show stack trace on error. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.TP +addref +Add the given repository as a reference to openBIS. +.TP +clone +Clone the repository found in the given data set id. +.TP +collection +Get/set settings related to the collection. +.TP +commit +Commit the repository to git and inform openBIS. +.TP +config +Get/set configurations. +.TP +data_set +Get/set settings related to the data set. +.TP +download +Download files of a linked data set. +.TP +init +Initialize the folder as a data repository. +.TP +init_analysis +Initialize the folder as an analysis folder. +.TP +move +Move the repository found in the given data set id. +.TP +object +Get/set settings related to the object. +.TP +removeref +Remove the reference to the given repository from openBIS. +.TP +repository +Get/set settings related to the repository. +.TP +settings +Get all settings. +.TP +status +Show the state of the obis repository. +.TP +sync +Sync the repository with openBIS. +.SH "SEE ALSO" +The full documentation for +.B obis, +is maintained as a Texinfo manual. If the +.B info +and +.B obis, +programs are properly installed at your site, the command +.IP +.B info obis, +.PP +should give you access to the complete manual. diff --git a/obis/src/python/obis/scripts/cli.py b/obis/src/python/obis/scripts/cli.py index 032eef6bfca..c0d95abc0da 100644 --- a/obis/src/python/obis/scripts/cli.py +++ b/obis/src/python/obis/scripts/cli.py @@ -72,6 +72,7 @@ def run(ctx, function): @click.group() +@click.version_option(version=None) @click.option('-q', '--quiet', default=False, is_flag=True, help='Suppress status reporting.') @click.option('-s', '--skip_verification', default=False, is_flag=True, help='Do not verify cerficiates') @click.option('-d', '--debug', default=False, is_flag=True, help="Show stack trace on error.") @@ -507,23 +508,19 @@ def _repository_commit(ctx, msg, auto_add, ignore_missing_parent): data_mgmt = shared_data_mgmt(ctx.obj) return check_result("commit", run(ctx, lambda: data_mgmt.commit(msg, auto_add, ignore_missing_parent))) -@repository.command("commit") +@repository.command("commit", short_help="Commit the repository to git and inform openBIS.") @click.pass_context @add_params(_commit_params) def repository_commit(ctx, msg, auto_add, ignore_missing_parent, repository): - """Commit the repository to git and inform openBIS. - """ if repository is None: return _repository_commit(ctx, msg, auto_add, ignore_missing_parent) with cd(repository): return _repository_commit(ctx, msg, auto_add, ignore_missing_parent) -@cli.command() +@cli.command(short_help="Commit the repository to git and inform openBIS.") @click.pass_context @add_params(_commit_params) def commit(ctx, msg, auto_add, ignore_missing_parent, repository): - """Commit the repository to git and inform openBIS. - """ ctx.invoke(repository_commit, msg=msg, auto_add=auto_add, ignore_missing_parent=ignore_missing_parent, repository=repository) ## init @@ -535,18 +532,16 @@ _init_params = [ click.argument('description', default=""), ] -@repository.command("init") +@repository.command("init", short_help="Initialize the folder as a data repository.") @click.pass_context @add_params(_init_params) def repository_init(ctx, object_id, collection_id, repository, description): - """Initialize the folder as a data repository.""" return init_data_impl(ctx, object_id, collection_id, repository, description) -@cli.command() +@cli.command(short_help="Initialize the folder as a data repository.") @click.pass_context @add_params(_init_params) def init(ctx, object_id, collection_id, repository, description): - """Initialize the folder as a data repository.""" ctx.invoke(repository_init, object_id=object_id, collection_id=collection_id, repository=repository, description=description) ## init analysis @@ -556,18 +551,16 @@ _init_analysis_params = [ ] _init_analysis_params += _init_params -@repository.command("init_analysis") +@repository.command("init_analysis", short_help="Initialize the folder as an analysis folder.") @click.pass_context @add_params(_init_analysis_params) def repository_init_analysis(ctx, parent, object_id, collection_id, repository, description): - """Initialize the folder as an analysis folder.""" return init_analysis_impl(ctx, parent, object_id, collection_id, repository, description) -@cli.command() +@cli.command(short_help="Initialize the folder as an analysis folder.") @click.pass_context @add_params(_init_analysis_params) def init_analysis(ctx, parent, object_id, collection_id, repository, description): - """Initialize the folder as an analysis folder.""" ctx.invoke(repository_init_analysis, parent=parent, object_id=object_id, collection_id=collection_id, repository=repository, description=description) ## status @@ -581,23 +574,19 @@ def _repository_status(ctx): result = run(ctx, data_mgmt.status) click.echo(result.output) -@repository.command("status") +@repository.command("status", short_help="Show the state of the obis repository.") @click.pass_context @add_params(_status_params) def repository_status(ctx, repository): - """Show the state of the obis repository. - """ if repository is None: return _repository_status(ctx) with cd(repository): return _repository_status(ctx) -@cli.command() +@cli.command(short_help="Show the state of the obis repository.") @click.pass_context @add_params(_status_params) def status(ctx, repository): - """Show the state of the obis repository. - """ ctx.invoke(repository_status, repository=repository) ## sync @@ -611,23 +600,19 @@ def _repository_sync(ctx, ignore_missing_parent): data_mgmt = shared_data_mgmt(ctx.obj) return check_result("sync", run(ctx, lambda: data_mgmt.sync(ignore_missing_parent))) -@repository.command("sync") +@repository.command("sync", short_help="Sync the repository with openBIS.") @click.pass_context @add_params(_sync_params) def repository_sync(ctx, ignore_missing_parent, repository): - """Sync the repository with openBIS. - """ if repository is None: return _repository_sync(ctx, ignore_missing_parent) with cd(repository): return _repository_sync(ctx, ignore_missing_parent) -@cli.command() +@cli.command(short_help="Sync the repository with openBIS.") @click.pass_context @add_params(_sync_params) def sync(ctx, ignore_missing_parent, repository): - """Sync the repository with openBIS. - """ ctx.invoke(repository_sync, ignore_missing_parent=ignore_missing_parent, repository=repository) ## addref @@ -640,23 +625,19 @@ def _repository_addref(ctx): data_mgmt = shared_data_mgmt(ctx.obj) return check_result("addref", run(ctx, data_mgmt.addref)) -@repository.command("addref") +@repository.command("addref", short_help="Add the given repository as a reference to openBIS.") @click.pass_context @add_params(_addref_params) def repository_addref(ctx, repository): - """Add the given repository as a reference to openBIS. - """ if repository is None: return _repository_addref(ctx) with cd(repository): return _repository_addref(ctx) -@cli.command() +@cli.command(short_help="Add the given repository as a reference to openBIS.") @click.pass_context @add_params(_addref_params) def addref(ctx, repository): - """Add the given repository as a reference to openBIS. - """ ctx.invoke(repository_addref, repository=repository) # removeref @@ -669,23 +650,19 @@ def _repository_removeref(ctx): data_mgmt = shared_data_mgmt(ctx.obj) return check_result("addref", run(ctx, data_mgmt.removeref)) -@repository.command("removeref") +@repository.command("removeref", short_help="Remove the reference to the given repository from openBIS.") @click.pass_context @add_params(_removeref_params) def repository_removeref(ctx, repository): - """Remove the reference to the given repository from openBIS. - """ if repository is None: return _repository_removeref(ctx) with cd(repository): return _repository_removeref(ctx) -@cli.command() +@cli.command(short_help="Remove the reference to the given repository from openBIS.") @click.pass_context @add_params(_removeref_params) def removeref(ctx, repository): - """Remove the reference to the given repository from openBIS. - """ ctx.invoke(repository_removeref, repository=repository) @@ -700,21 +677,17 @@ _download_params = [ click.argument('data_set_id'), ] -@data_set.command("download") +@data_set.command("download", short_help="Download files of a linked data set.") @add_params(_download_params) @click.pass_context def data_set_download(ctx, content_copy_index, file, data_set_id, skip_integrity_check): - """ Download files of a linked data set. - """ data_mgmt = shared_data_mgmt(ctx.obj) return check_result("download", run(ctx, lambda: data_mgmt.download(data_set_id, content_copy_index, file, skip_integrity_check))) -@cli.command() +@cli.command(short_help="Download files of a linked data set.") @add_params(_download_params) @click.pass_context def download(ctx, content_copy_index, file, data_set_id, skip_integrity_check): - """ Download files of a linked data set. - """ ctx.invoke(data_set_download, content_copy_index=content_copy_index, file=file, data_set_id=data_set_id, skip_integrity_check=skip_integrity_check) ## clone @@ -726,41 +699,33 @@ _clone_move_params = [ click.argument('data_set_id'), ] -@data_set.command("clone") +@data_set.command("clone", short_help="Clone the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def data_set_clone(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Clone the repository found in the given data set id. - """ data_mgmt = shared_data_mgmt(ctx.obj) return check_result("clone", run(ctx, lambda: data_mgmt.clone(data_set_id, ssh_user, content_copy_index, skip_integrity_check))) -@cli.command() +@cli.command(short_help="Clone the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def clone(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Clone the repository found in the given data set id. - """ ctx.invoke(data_set_clone, ssh_user=ssh_user, content_copy_index=content_copy_index, data_set_id=data_set_id, skip_integrity_check=skip_integrity_check) ## move -@data_set.command("move") +@data_set.command("move", short_help="Move the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def data_set_move(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Move the repository found in the given data set id. - """ data_mgmt = shared_data_mgmt(ctx.obj) return check_result("move", run(ctx, lambda: data_mgmt.move(data_set_id, ssh_user, content_copy_index, skip_integrity_check))) -@cli.command() +@cli.command(short_help="Move the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def move(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Move the repository found in the given data set id. - """ ctx.invoke(data_set_move, ssh_user=ssh_user, content_copy_index=content_copy_index, data_set_id=data_set_id, skip_integrity_check=skip_integrity_check) diff --git a/obis/src/python/setup.py b/obis/src/python/setup.py index ae1e49f8500..474005d70e6 100644 --- a/obis/src/python/setup.py +++ b/obis/src/python/setup.py @@ -2,6 +2,10 @@ import os from setuptools import setup +data_dir = os.path.join('man','man1') +data_files = [(d, [os.path.join(d,f) for f in files]) + for d, folders, files in os.walk(data_dir)] + setup(name='obis', version='0.1.0', description='Local data management with assistance from OpenBIS.', @@ -10,6 +14,7 @@ setup(name='obis', author_email='chandrasekhar.ramakrishnan@id.ethz.ch', license='BSD', packages=['obis', 'obis.dm', 'obis.dm.commands', 'obis.scripts'], + data_files=data_files, package_data={'obis' : ['dm/git-annex-attributes']}, install_requires=[ 'pyOpenSSL', -- GitLab