Skip to content
Snippets Groups Projects
Commit a916d243 authored by Marco Del Tufo's avatar Marco Del Tufo
Browse files

added bash syntax

parent 0cfba7b6
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
...@@ -16,7 +16,7 @@ case, OpenBIS is aware of its existence and the data can be used for provenance ...@@ -16,7 +16,7 @@ case, OpenBIS is aware of its existence and the data can be used for provenance
## 2. Installation ## 2. Installation
```bashbash ```bash
pip3 install obis pip3 install obis
``` ```
...@@ -25,13 +25,13 @@ Since `obis` is based on `pybis`, the pip command will also install pybis and al ...@@ -25,13 +25,13 @@ Since `obis` is based on `pybis`, the pip command will also install pybis and al
## 3. Quick start guide ## 3. Quick start guide
**Configure your openBIS Instance** **Configure your openBIS Instance**
```bashbash ```bash
# global settings to be use for all obis repositories # global settings to be use for all obis repositories
obis config -g set openbis_url=https://localhost:8888 obis config -g set openbis_url=https://localhost:8888
obis config -g set user=admin obis config -g set user=admin
``` ```
**Download Physical Dataset** **Download Physical Dataset**
```bashbash ```bash
# create a physical (-p) obis repository with a folder name # create a physical (-p) obis repository with a folder name
obis init -p data1 obis init -p data1
cd data1 cd data1
...@@ -41,7 +41,7 @@ obis config get is_physical ...@@ -41,7 +41,7 @@ obis config get is_physical
obis download 20230228091119011-58 obis download 20230228091119011-58
``` ```
**Upload Physical Dataset** **Upload Physical Dataset**
```bashbash ```bash
# create a physical (-p) obis repository with a folder name # create a physical (-p) obis repository with a folder name
obis init -p data1 obis init -p data1
cd data1 cd data1
...@@ -57,7 +57,7 @@ obis upload 20230228133001314-59 RAW_DATA -f your_file_a -f your_file_b ...@@ -57,7 +57,7 @@ obis upload 20230228133001314-59 RAW_DATA -f your_file_a -f your_file_b
$ obis --help $ obis --help
```bashbash ```bash
Usage: obis [OPTIONS] COMMAND [ARGS]... Usage: obis [OPTIONS] COMMAND [ARGS]...
Options: Options:
...@@ -90,7 +90,7 @@ Commands: ...@@ -90,7 +90,7 @@ Commands:
To show detailed help for a specific command, type `obis <command> --help` : To show detailed help for a specific command, type `obis <command> --help` :
```bashbash ```bash
$ obis commit --help $ obis commit --help
Usage: obis commit [OPTIONS] [REPOSITORY] Usage: obis commit [OPTIONS] [REPOSITORY]
...@@ -168,7 +168,7 @@ and get/set properties of objects/collections represented by datasets in current ...@@ -168,7 +168,7 @@ and get/set properties of objects/collections represented by datasets in current
**collection** **collection**
```bashbash ```bash
obis collection get [key1] [key2] ... obis collection get [key1] [key2] ...
obis collection set [key1]=[value1], [key2]=[value2] ... obis collection set [key1]=[value1], [key2]=[value2] ...
``` ```
...@@ -181,7 +181,7 @@ data set is connected directly to a collection - gets or sets given properties t ...@@ -181,7 +181,7 @@ data set is connected directly to a collection - gets or sets given properties t
**config** **config**
```bashbash ```bash
obis config get [key] obis config get [key]
obis config set [key]=[value] obis config set [key]=[value]
``` ```
...@@ -195,7 +195,7 @@ it comes to integration with other tools. ...@@ -195,7 +195,7 @@ it comes to integration with other tools.
**Example `.obis/config.json`** **Example `.obis/config.json`**
```bashbash ```bash
{ {
"fileservice_url": null, "fileservice_url": null,
"git_annex_hash_as_checksum": true, "git_annex_hash_as_checksum": true,
...@@ -207,7 +207,7 @@ it comes to integration with other tools. ...@@ -207,7 +207,7 @@ it comes to integration with other tools.
**data_set** **data_set**
```bashbash ```bash
obis data_set search [OPTIONS] obis data_set search [OPTIONS]
Options: Options:
...@@ -243,7 +243,7 @@ configuration.* ...@@ -243,7 +243,7 @@ configuration.*
**download** **download**
```bashbash ```bash
obis download [options] [data_set_id] obis download [options] [data_set_id]
Options: Options:
...@@ -262,7 +262,7 @@ and the `fileservice_url` needs to be configured. ...@@ -262,7 +262,7 @@ and the `fileservice_url` needs to be configured.
**init** **init**
```bashbash ```bash
obis init -p [folder] obis init -p [folder]
``` ```
...@@ -272,7 +272,7 @@ If not, it will use the current folder. ...@@ -272,7 +272,7 @@ If not, it will use the current folder.
**object get / set** **object get / set**
```bashbash ```bash
obis collection get [key1] [key2] ... obis collection get [key1] [key2] ...
obis collection set [key1]=[value1], [key2]=[value2] ... obis collection set [key1]=[value1], [key2]=[value2] ...
``` ```
...@@ -285,7 +285,7 @@ data set is connected directly to an object - gets or sets given properties to i ...@@ -285,7 +285,7 @@ data set is connected directly to an object - gets or sets given properties to i
**object search** **object search**
```bashbash ```bash
obis object search [OPTIONS] obis object search [OPTIONS]
Options: Options:
...@@ -319,7 +319,7 @@ configuration.* ...@@ -319,7 +319,7 @@ configuration.*
**upload** **upload**
```bashbash ```bash
obis upload [sample_id] [data_set_type] [OPTIONS] obis upload [sample_id] [data_set_type] [OPTIONS]
``` ```
...@@ -331,7 +331,7 @@ data set. ...@@ -331,7 +331,7 @@ data set.
**Create an obis repository to work in Standard Data Store mode** **Create an obis repository to work in Standard Data Store mode**
```bashbash ```bash
# global settings to be use for all obis repositories # global settings to be use for all obis repositories
obis config -g set openbis_url=https://localhost:8888 obis config -g set openbis_url=https://localhost:8888
obis config -g set user=admin obis config -g set user=admin
...@@ -351,7 +351,7 @@ obis upload 20230228133001314-59 RAW_DATA -f results.csv -f results_space.csv ...@@ -351,7 +351,7 @@ obis upload 20230228133001314-59 RAW_DATA -f results.csv -f results_space.csv
**download datasets of an object and check properties** **download datasets of an object and check properties**
```bashbash ```bash
# assuming we are in a configured obis repository # assuming we are in a configured obis repository
obis download 20230228091119011-58 obis download 20230228091119011-58
# set object name to XYZ # set object name to XYZ
...@@ -380,25 +380,25 @@ openBIS. ...@@ -380,25 +380,25 @@ openBIS.
With `get` you retrieve one or more settings. If the `key` is omitted, you retrieve all settings of With `get` you retrieve one or more settings. If the `key` is omitted, you retrieve all settings of
the `type`: the `type`:
```bashbash ```bash
obis [type] [options] get [key] obis [type] [options] get [key]
``` ```
With `set` you set one or more settings: With `set` you set one or more settings:
```bashbash ```bash
obis [type] [options] set [key1]=[value1], [key2]=[value2], ... obis [type] [options] set [key1]=[value1], [key2]=[value2], ...
``` ```
With `clear` you unset one or more settings: With `clear` you unset one or more settings:
```bashbash ```bash
obis [type] [options] clear [key1] obis [type] [options] clear [key1]
``` ```
With the type `settings` you can get all settings at once: With the type `settings` you can get all settings at once:
```bashbash ```bash
obis settings [options] get obis settings [options] get
``` ```
...@@ -433,7 +433,7 @@ it comes to integration with other tools. ...@@ -433,7 +433,7 @@ it comes to integration with other tools.
**Example `.obis/config.json`** **Example `.obis/config.json`**
```bashbash ```bash
{ {
"fileservice_url": null, "fileservice_url": null,
"git_annex_hash_as_checksum": true, "git_annex_hash_as_checksum": true,
...@@ -444,7 +444,7 @@ it comes to integration with other tools. ...@@ -444,7 +444,7 @@ it comes to integration with other tools.
**Example `.obis/data_set.json`** **Example `.obis/data_set.json`**
```bashbash ```bash
{ {
"properties": { "properties": {
"K1": "v1", "K1": "v1",
...@@ -458,7 +458,7 @@ it comes to integration with other tools. ...@@ -458,7 +458,7 @@ it comes to integration with other tools.
**init** **init**
```bashbash ```bash
obis init [folder] obis init [folder]
``` ```
...@@ -467,7 +467,7 @@ If not, it will use the current folder. ...@@ -467,7 +467,7 @@ If not, it will use the current folder.
**init_analysis** **init_analysis**
```bashbash ```bash
obis init_analysis [options] [folder] obis init_analysis [options] [folder]
``` ```
...@@ -477,7 +477,7 @@ with the `-p` option. ...@@ -477,7 +477,7 @@ with the `-p` option.
**commit** **commit**
```bashbash ```bash
obis commit [options] obis commit [options]
``` ```
...@@ -486,7 +486,7 @@ define a commit message, the user will be asked to provide one. ...@@ -486,7 +486,7 @@ define a commit message, the user will be asked to provide one.
**sync** **sync**
```bashbash ```bash
obis sync obis sync
``` ```
...@@ -496,7 +496,7 @@ applicable, e.g. use "git annex add" instead of "git add". ...@@ -496,7 +496,7 @@ applicable, e.g. use "git annex add" instead of "git add".
**status** **status**
```bashbash ```bash
obis status [folder] obis status [folder]
``` ```
...@@ -505,7 +505,7 @@ parameter. It shows file changes and whether the repository needs to be synchron ...@@ -505,7 +505,7 @@ parameter. It shows file changes and whether the repository needs to be synchron
**clone** **clone**
```bashbash ```bash
obis clone [options] [data_set_id] obis clone [options] [data_set_id]
``` ```
...@@ -522,7 +522,7 @@ _Note_: This command does not work when `obis_metadata_folder` is set. ...@@ -522,7 +522,7 @@ _Note_: This command does not work when `obis_metadata_folder` is set.
**move** **move**
```bashbash ```bash
obis move [options] [data_set_id] obis move [options] [data_set_id]
``` ```
...@@ -532,7 +532,7 @@ Note: This command does not work when `obis_metadata_folder` is set. ...@@ -532,7 +532,7 @@ Note: This command does not work when `obis_metadata_folder` is set.
**addref / removeref** **addref / removeref**
```bashbash ```bash
obis addref obis addref
obis removeref obis removeref
``` ```
...@@ -543,7 +543,7 @@ was moved or copied without using the `move` or `copy` commands. ...@@ -543,7 +543,7 @@ was moved or copied without using the `move` or `copy` commands.
**token** **token**
```bashbash ```bash
obis token get <session_name> [--validity-days] [--validity-weeks] [--validity-months] obis token get <session_name> [--validity-days] [--validity-weeks] [--validity-months]
``` ```
...@@ -558,7 +558,7 @@ obis configuration and used for every subsequent request. ...@@ -558,7 +558,7 @@ obis configuration and used for every subsequent request.
**Create an obis repository and commit to openBIS** **Create an obis repository and commit to openBIS**
```bashbash ```bash
# global settings to be use for all obis repositories # global settings to be use for all obis repositories
obis config -g set openbis_url=https://localhost:8888 obis config -g set openbis_url=https://localhost:8888
obis config -g set user=admin obis config -g set user=admin
...@@ -575,7 +575,7 @@ obis commit -m 'message' ...@@ -575,7 +575,7 @@ obis commit -m 'message'
**Commit to git and sync manually** **Commit to git and sync manually**
```bashbash ```bash
# assuming we are in a configured obis repository # assuming we are in a configured obis repository
echo content >> example_file echo content >> example_file
git annex add example_file git annex add example_file
...@@ -585,7 +585,7 @@ obis sync ...@@ -585,7 +585,7 @@ obis sync
**Create an analysis repository** **Create an analysis repository**
```bashbash ```bash
# assuming we have a repository 'data1' # assuming we have a repository 'data1'
obis init_analysis -p data1 analysis1 obis init_analysis -p data1 analysis1
cd analysis1 cd analysis1
......
...@@ -8,8 +8,8 @@ do ...@@ -8,8 +8,8 @@ do
if [[ $(($i % 2)) -ne 0 ]] if [[ $(($i % 2)) -ne 0 ]]
then then
echo "${line_number}: ${line}" echo "${line_number}: ${line}"
sed -i "${line_number}s/pythonget/get/" ./${1} #sed -i "${line_number}s/bashbash/bash/" ./${1}
sed -i "${line_number}s/\`\`\`/\`\`\`bash/" ./${1} #sed -i "${line_number}s/\`\`\`/\`\`\`bash/" ./${1}
fi fi
i=$((i+1)) i=$((i+1))
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment