在openbis的帮助下进行本地数据管理。
obis的Python项目详细描述
obis
obis是一个命令行工具,用于处理太大而无法存储在openbis中但仍需要在openbis中注册和跟踪的数据集。
先决条件
- python 3.6 Git
- git annex安装指南
安装
pip3 install obis
由于obis
基于pybis
,pip命令还将安装pybis及其所有依赖项。
用法
救命是你的朋友!
$ obis --help
Usage: obis [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-q, --quiet Suppress status reporting.
-s, --skip_verification Do not verify cerficiates
-d, --debug Show stack trace on error.
--help Show this message and exit.
Commands:
addref Add the given repository as a reference to openBIS.
clone Clone the repository found in the given data set id.
collection Get/set settings related to the collection.
commit Commit the repository to git and inform openBIS.
config Get/set configurations.
data_set Get/set settings related to the data set.
download Download files of a linked data set.
init Initialize the folder as a data repository.
init_analysis Initialize the folder as an analysis folder.
move Move the repository found in the given data set id.
object Get/set settings related to the object.
removeref Remove the reference to the given repository from openBIS.
repository Get/set settings related to the repository.
settings Get all settings.
status Show the state of the obis repository.
sync Sync the repository with openBIS.
要显示特定命令的详细帮助,请键入obis<;command>;--help
:
$ obis commit --help
Usage: obis commit [OPTIONS] [REPOSITORY]
Options:
-m, --msg TEXT A message explaining what was done.
-a, --auto_add Automatically add all untracked files.
-i, --ignore_missing_parent If parent data set is missing, ignore it.
--help Show this message and exit.
设置
使用get
可以检索一个或多个设置。如果省略了键,则检索
类型的所有设置:
:
obis [type] [options] get [key]
使用设置
可以设置一个或多个设置:
obis [type] [options] set [key1]=[value1], [key2]=[value2], ...
使用清除
可以取消一个或多个设置:
obis [type] [options] clear [key1]
使用类型设置
可以一次获得所有设置:
obis settings [options] get
选项-g
可用于与全局设置交互。全局设置存储在~/.obis
中,并在创建时复制到obis存储库中。
存在以下设置:
<表><广告>id
仅允许使用https
文件服务URL
git_annex_后端
git_annex_hash_as_checksum
主机名
openbis_url
obis_metadata_文件夹
用户
键入
属性
id
数据集id
外部DMS\u id
id
这些设置作为json文件保存在obis存储库中的.obis
文件夹中,或在~/.obis
中进行全局设置。它们可以手动添加/编辑,这在与其他工具集成时可能很有用。
示例.obis/config.json
{
"fileservice_url": null,
"git_annex_hash_as_checksum": true,
"hostname": "bsse-bs-dock-5-160.ethz.ch",
"openbis_url": "http://localhost:8888"
}
示例.obis/data_set.json
{
"properties": {
"K1": "v1",
"K2": "v2"
},
"type": "UNKNOWN"
}
命令
初始化
pip3 install obis
0
如果给定了文件夹,obis会将该文件夹初始化为obis存储库。否则,它将使用当前文件夹。
初始分析
pip3 install obis
1
通过init_分析,可以创建从父存储库派生的存储库。如果它是从存储库中调用的,则将用作父级。如果没有,则必须为父对象提供-p
选项。
提交
pip3 install obis
2
commit
命令将文件添加到openbis中的新数据集中。如果未使用-m
选项定义提交消息,则会要求用户提供一条消息。
同步
pip3 install obis
3
手动完成git提交后,sync命令将在openbis中创建相应的数据集。请注意,当直接与git交互时,在适当的时候使用git-annex命令,例如使用"git-annex-add"而不是"git-add"。
状态
pip3 install obis
4
这将显示从中调用它的存储库文件夹的状态,或显示作为参数给定的存储库文件夹的状态。它显示文件更改以及存储库是否需要与openbis同步。
克隆
pip3 install obis
5
clone
命令复制与数据集关联的存储库,并在openbis中注册新副本。如果存储库已经有多个副本,obis将询问要从哪个副本进行克隆。
- 为了避免用户交互,可以使用选项
-c
选择复制索引
- 使用选项
-u
可以定义用户从远程系统复制文件 - 默认情况下,通过计算校验和检查文件完整性。使用
-s
注意:设置obis_metadata_文件夹
时,此命令不起作用。
移动
pip3 install obis
6
move
命令的工作原理与clone
相同,只是旧存储库将被删除。
注意:当设置了"obis元数据"文件夹时,此命令不起作用。
下载
pip3 install obis
7
download
命令下载数据集的文件。与克隆相反,这不会在openbis中注册另一个副本。它只用于访问文件。此命令要求运行downloadhandler/fileinfohandler微服务,并且需要配置fileservice\u url
。
添加引用/删除引用
pip3 install obis
8
可以从openbis添加或删除obis存储库文件夹。在不使用move
或copy
命令移动或复制存储库时,这非常有用。
示例
创建一个obis存储库并提交给openbis
提交到Git并手动同步 创建分析存储库
大数据链接服务可用于下载包含在obis存储库中的文件。这些服务包含在openbis的安装文件夹中,位于 像openbis这样的数据来源跟踪工具使得理解和跟踪研究过程成为可能。研究了什么,获取了什么数据,如何分析数据以得出最终结果发布的所有结果——这是openbis中捕获的信息。在标准使用场景中,openbis直接存储和管理数据。这有一个优点,即openbis充当数据的看门人,使备份或强制访问限制等变得容易。然而,这种工作方式并非适合所有情况。 一些研究小组处理大量数据(例如,多个tb),这使得openbis控制数据变得低效和不切实际。其他研究小组要求数据存储在一个定义良好的目录结构下的共享文件系统中,无论是出于历史原因还是由于它们使用的工具。在这种情况下,很难让openbis完全控制数据。 对于这种情况,我们开发了 在封面下, V.Korolev,A.Joshi,V.Korolev,M.A.Grasso,A.Joshi,M.A.Grasso等,"Prob:跟踪大数据实验来源和再现性的工具",重现14。HPCA 2014,第11卷,第264-2862014页。
http://ebiquity.umbc.edu//u文件目录/papers/693.pdf
9
pip3 install obis
0
$ obis --help
Usage: obis [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-q, --quiet Suppress status reporting.
-s, --skip_verification Do not verify cerficiates
-d, --debug Show stack trace on error.
--help Show this message and exit.
Commands:
addref Add the given repository as a reference to openBIS.
clone Clone the repository found in the given data set id.
collection Get/set settings related to the collection.
commit Commit the repository to git and inform openBIS.
config Get/set configurations.
data_set Get/set settings related to the data set.
download Download files of a linked data set.
init Initialize the folder as a data repository.
init_analysis Initialize the folder as an analysis folder.
move Move the repository found in the given data set id.
object Get/set settings related to the object.
removeref Remove the reference to the given repository from openBIS.
repository Get/set settings related to the repository.
settings Get all settings.
status Show the state of the obis repository.
sync Sync the repository with openBIS.
1
$ obis --help
Usage: obis [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-q, --quiet Suppress status reporting.
-s, --skip_verification Do not verify cerficiates
-d, --debug Show stack trace on error.
--help Show this message and exit.
Commands:
addref Add the given repository as a reference to openBIS.
clone Clone the repository found in the given data set id.
collection Get/set settings related to the collection.
commit Commit the repository to git and inform openBIS.
config Get/set configurations.
data_set Get/set settings related to the data set.
download Download files of a linked data set.
init Initialize the folder as a data repository.
init_analysis Initialize the folder as an analysis folder.
move Move the repository found in the given data set id.
object Get/set settings related to the object.
removeref Remove the reference to the given repository from openBIS.
repository Get/set settings related to the repository.
settings Get all settings.
status Show the state of the obis repository.
sync Sync the repository with openBIS.
大数据链路服务
servers/big_data_link_services
下。有关如何配置和运行它们,请参阅readme.md文件。OBIS的基本原理
obis
,这是一种在需要极大灵活性的条件下有序管理数据的工具。obis
使得在文件系统上跟踪数据成为可能,在文件系统中,用户可以完全自由地按照自己的意愿构造和操作数据,同时保留openbis的好处。使用obis,openbis实际上只存储和管理元数据。数据本身是由用户在外部管理的,但是openbis知道它的存在,并且数据可以用于来源跟踪。obis
被打包为一个独立的实用程序,在unix或类unix环境中,该实用程序只需添加到path
变量即可使用。obis
利用公共可用和经过测试的工具来管理文件系统上的数据。特别是,它使用git
和git annex
来跟踪数据集的内容。使用git annex
,甚至可以有效地跟踪大型二进制工件。为了与openbis通信,obis
使用openbis api,它提供注册和跟踪openbis支持的所有元数据的能力。文献
推荐PyPI第三方库