Installation

Python

No knowledge in Python is required to use VRE Language. Nevertheless, Python is the language of the interpreter and the employed framework. Thus the typical tools for setting up Python packages are used for the installation.

To ensure support for all required packages and dependencies, currently Python version 3.9 or higher is required.

Installation using pip

The project can be installed into a Python virtual environment using the pip package manager. This is achieved in the following steps:

  1. Create a Python virtual environment (replace /path/to with an existing path and venv-name with a new name):

    python -m venv /path/to/venv-name
    
  2. Activate your Python virtual environment, e.g. with

    source /path/to/venv-name/bin/activate
    
  3. Make sure you have the latest version of pip for your python installation:

    python -m pip install --upgrade pip
    
  4. Install the VRE Language package and its dependencies into the environment:

    python -m pip install vre-language
    

NOTE: Broken install due to an issue in FireWorks

Fresh installations of VRE Language will currently sometimes not work. When running texts this error may occur:

AttributeError:
"safe_load()" has been removed, use

  yaml = YAML(typ='safe', pure=True)
  yaml.load(...)

instead of file "jupyter-base-2024-05-14/lib64/python3.9/site-packages/fireworks/utilities/fw_serializers.py", line 256

            dct = yaml.safe_load(f_str)

This issue has been solved in FireWorks main branch but not yet released. See more discussions in this issue.

As a work-around, VRE Language tries to downgrade ruamel.yaml automatically. If downgrade of ruamel.yaml <0.18.0 is not possible, for example when the ruamel.yaml package is installed system-wide, then the error above occurs when running texts. In this case, another non-automatic workaround has to be performed by the user. A fresh virtual environment has to be created (without fireworks, vre-language and vre-middleware). Then VRE Language is installed by the following two commands:

python -m pip install git+https://github.com/materialsproject/fireworks.git
python -m pip install vre-language

Installation in developer (editable) mode

For developing purposes, VRE Language can be installed in editable mode in which changes will be tracked in a branch of a local Git repository and can be immediately tested without need of re-install or update the package.

Install from a custom local Git repository

  1. The VRE Language Git repository must be cloned with the command (skip if you have a local repository):

git clone https://gitlab.kit.edu/kit/virtmat-tools/vre-language

Alternatively, a specific commit or tag can be downloaded directly from the project’s GitLab webpage as an archive and unpacked locally.

  1. After switching to the top-level folder vre-language of the local repository, install with pip:

python -m pip install -e .[test]

NOTE: The extra [test] added to the name of the package installs a set of additional packages for testing the installed package.

Install directly from the remote Git repository

To install from the remote Git repository directly one can use this command:

python -m pip install -e git+https://gitlab.kit.edu/kit/virtmat-tools/vre-language.git#egg=vre-language[test]

In this case a local clone of the Git repository is created under /path/to/venv-name/src/vre-language where the code can be managed.

Setting up FireWorks

The VRE Language uses the FireWorks workflow management system to persist data and metadata. For production purposes FireWorks has to be configured with a MongoDB database. A short guide how to do this can be found here.