Skip to content

alexmasny/tvb-pack

 
 

Repository files navigation

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.

About

Useful super pack for working with TVB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%