the-virtual-brain/tvb-pack

语言: Shell

git: https://github.com/the-virtual-brain/tvb-pack

与TVB合作的有用超级包
Useful super pack for working with TVB
README.md (中文)

TVB包

这是一个超级回购,汇集了TVB的几个Git回购, 旨在让您更容易开始使用TVB。

用法

建立

根据您的目的,有一些使用场景。如果你 只想试试TVB,递归克隆这个回购,

git clone https://github.com/the-virtual-brain/tvb-pack.git tvb-pack
cd tvb-pack
git submodule init
git submodule update

但是,如果您打算将TVB用于项目,我们强烈鼓励 制作自己的tvb-pack分支,以便您的项目可以指定版本 它需要的tvb数据,tvb库等。单击“Fork”按钮后 在GitHub上,执行以下操作,用您的GitHub用户名替换用户:

git clone git@github.com:user/tvb-pack.git tvb-pack
cd tvb-pack
git submodule init
git submodule update

请耐心等待,在某些情况下,回购非常大。

如果另外你想使用自己的tvb库和其他的分叉 子模块,你需要,每个回购 如果你有自己的fork,请正确修改.gitmodules文件 刚刚克隆了tvb-pack和 在执行上面列表中的子模块命令之前。

对于每个子模块,如果您打算进行更改,请务必结帐 主要或主干分支首先。

如果你有自己的所有子模块的分支,运行

scripts/update-origins.sh username

将正确处理更新.gitmodules。

如果后续的git子模块更新产生错误,如

fatal: reference is not a tree: 03dc58f782c7ac4fe65cecbb9d459e95d8efff2c
Unable to checkout '03dc58f782c7ac4fe65cecbb9d459e95d8efff2c' in submodule path 'tvb-data'

然后你需要从上游更新你的分叉然后重新运行 git子模块更新。

此外,如果您希望访问上游回购,即 (the-virtual-brain / tvb- *)你需要明确地添加它 子模块。 (见这里 这没有意义)

最后,如果您从upstream / tvb-pack合并,则可能需要更新 .gitsubmodules反映你的分叉。我们将设置一个脚本来制作 这更容易。

虚拟环境

使用所有必需的软件包创建一个支持TVB的虚拟环境

scripts/mkenv.sh my_env_path

然后,为了激活它并将每个子模块的内容放入其中 Python路径

source scripts/env.sh my_env_path

子模块工作流程

当您修改tvb-pack repo跟踪的文件时,请使用Git as 平常。如果您对子模块进行了更改,则需要cd 进入子模块,根据子模块Git你的变化 存储库,cd到tvb-pack目录并更新tvb-pack 子模块的版本。

更多细节可以在Git SCM书的描述中找到 Git子模块。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

tvb-pack

This is a super repo that brings together several Git repos of TVB,
intended to make it easier to get started with TVB.

Usage

Set up

There are a few usage scenarios, depending on what you wish to do. If you
simply wish to try out TVB, clone this repo recursively,

git clone https://github.com/the-virtual-brain/tvb-pack.git tvb-pack
cd tvb-pack
git submodule init
git submodule update

However, if you are going to use TVB for a project, we strongly encourage
making your own fork of tvb-pack, so that your project can specify the versions
of tvb-data, tvb-library, etc. that it requires. After clicking the "Fork" button
on GitHub, do the following, replacing user by your GitHub username:

git clone git@github.com:user/tvb-pack.git tvb-pack
cd tvb-pack
git submodule init
git submodule update

Be patient, in some cases the repos are quite large.

If additionally you wish to use your own forks of tvb-library and other
submodules, you'll need to, for each repo
where you have your own fork, modify the .gitmodules file correctly
just after cloning tvb-pack and
before performing the submodule commands in the listing above.

For each submodule, if you plan to make changes, make sure to checkout
the master or trunk branch first.

In case you have your own forks of all of the submodules, running

scripts/update-origins.sh username

will handle updating .gitmodules correctly.

If the subsequent git submodule update produces errors like

fatal: reference is not a tree: 03dc58f782c7ac4fe65cecbb9d459e95d8efff2c
Unable to checkout '03dc58f782c7ac4fe65cecbb9d459e95d8efff2c' in submodule path 'tvb-data'

then you'll need to update your forks from upstream and then re-run
git submodule update.

Additionally, if you wish to have access to the upstream repo, i.e.
(the-virtual-brain/tvb-*) you'll need to add this explicitly in
the submodule. (See here if
this doesn't make sense)

Lastly, if you merge from upstream/tvb-pack, you may have to update
.gitsubmodules to reflect your forks. We'll setup a script to make
this easier.

Virtual environments

Create a TVB-ready virtual environment with all the necessary packages with

scripts/mkenv.sh my_env_path

Then, in order to activate it and place each of the submodule's contents in the
Python path

source scripts/env.sh my_env_path

The submodule workflow

When you modify files tracked by the tvb-pack repo, use Git as
per usual. If you make changes to a submodule, you'll need to cd
into the submodule, Git your changes with respect to the submodule's
repository, cd up to the tvb-pack directory and update tvb-pack's
version of the submodule.

More details can be found at the Git SCM book's description of
Git submodules
.