Installing VIBE

Installing VIBE#

Prerequisites#

It is recommended to install your local version of VIBE inside a virtual environment. There are many ways to do this, but as we also require basf2, it is recommended to do this with b2venv. One can create a new environment with

$ source /cvmfs/belle.cern.ch/tools/b2setup
$ b2venv -n vibe_venv <basf2_release>

This will create a virtual environment with the name vibe_venv in your current directory.

Tip

One can obtain the currently recommended basf2 release by running b2help-releases.

The virtual environment needs to be activated using the command:

$ source vibe_venv/bin/activate

You may now see (vibe_venv) at the beginning of your terminal, this means its activated! To check you have successfully activated your virtual environment run:

$(vibe_venv) which python3
path/to/your/vibe_venv/bin/python3

Installation#

After the virtual environment is set one can continue with the installation of VIBE. First clone the VIBE repository:

$(vibe_venv) git clone git@gitlab.desy.de:belle2/data-production/validation/vibe.git

Then install VIBE via

$(vibe_venv) cd vibe
$(vibe_venv) pip3 install --user -e ./

The -e, for editable, installs an egg which allows us to make changes to VIBE (i.e add your custom mode) without having to install a new version each time a change is made. The ./ tells pip3 that we want to use the pyproject.toml in the current working directory, which is VIBE’s! The installation automatically takes care of all the dependencies that need to be there to run VIBE.

From here you will likely want to create a new branch of VIBE to add your new modes, which can be done like so:

$(vibe_venv) git checkout -b <my_branch_name>

You will now be working on a new git branch made from the main branch!

From now on, whenever you want to run VIBE you just have to activate the virtual environment you created.

Note

In case you want to run VIBE with a different basf2 release, just create a new environment with the instructions above.