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
0cfba7b6
Commit
0cfba7b6
authored
1 year ago
by
Marco Del Tufo
Browse files
Options
Downloads
Patches
Plain Diff
added bash syntax
parent
51b39e41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/user-documentation/advance-features/command-line-tool.md
+35
-35
35 additions, 35 deletions
.../user-documentation/advance-features/command-line-tool.md
docs/user-documentation/advance-features/test.sh
+17
-0
17 additions, 0 deletions
docs/user-documentation/advance-features/test.sh
with
52 additions
and
35 deletions
docs/user-documentation/advance-features/command-line-tool.md
+
35
−
35
View file @
0cfba7b6
...
@@ -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
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
# 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
# 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
# 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
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
$ 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
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
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
{
{
"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
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
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
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
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
obis object search [OPTIONS]
obis object search [OPTIONS]
Options:
Options:
...
@@ -319,7 +319,7 @@ configuration.*
...
@@ -319,7 +319,7 @@ configuration.*
**upload**
**upload**
```
```
bashbash
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
# 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
# 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
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
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
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
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
{
{
"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
{
{
"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
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
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
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
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
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
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
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
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
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
# 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
# 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
# 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
...
...
This diff is collapsed.
Click to expand it.
docs/user-documentation/advance-features/test.sh
0 → 100755
+
17
−
0
View file @
0cfba7b6
#!/bin/bash
i
=
1
line_number
=
1
while
read
-r
line
do
if
[[
$line
==
'```'
*
]]
then
if
[[
$((
$i
%
2
))
-ne
0
]]
then
echo
"
${
line_number
}
:
${
line
}
"
sed
-i
"
${
line_number
}
s/pythonget/get/"
./
${
1
}
sed
-i
"
${
line_number
}
s/
\`\`\`
/
\`\`\`
bash/"
./
${
1
}
fi
i
=
$((
i+1
))
fi
line_number
=
$((
line_number+1
))
done
<
$1
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