Installing Vaayu

Vaayu is a scientific software library written in the Python programming language that makes extensive use of the rich scientific computing libraries available for Python. The following are the bare minimum dependencies for using Vaayu on any system:

  1. Python v2.7 or 3.x
  2. Numerical Python (NumPy) - Provides efficient array data type and associated operations, linear algebra routines etc.
  3. Scientific Python (SciPy)
  4. PyYAML - YAML library for interfacing with configuration and input files

In addition, to the aforementioned libraries the following packages are highly recommended to gain maximum benefit from Vaayu.

  1. Pandas - Data Analysis library
  2. Matplotlib - Plotting and data visualization package
  3. IPython - Interactive python console with enhanced capabilities

Using Anaconda Python Distribution

In addition to Python, these core scientific libraries also depend on additional non-Python packages, e.g., BLAS/LAPACK, NetCDF, VTK, etc., that are not available by default on many systems. Installation, upgrade, and maintenance of these dependencies manually can be a cumbersome process. The entire process is greatly simplified with the Anaconda Python Distribution. This distribution provides the comprehensive set of python packages that can be installed into different environments for managing dependencies on all major operating systems. This guide recommends that users install the Anaconda distribution and use Vaayu from within a custom conda environment to get up and running quickly.

Note

The default installation instructions are provided for Python v2.7. This is because the VTK python module is currently only available for Python 2.x series. If you are not interested in using VTK-related functionality within Vaayu, you can use safely use Vaayu with Python 3.x by selecting the python version during Anaconda install (or environment creation phase).

Installing the Anaconda Python distribution requires the following steps:

  1. Download the Anaconda installer for your operating system.
  2. Execute the downloaded file and follow the installation instructions. It is recommended that you install the default packages.
  3. Update the anaconda environment according to installation instructions

Note

Make sure that you answer yes when the installer asks to add the installation location to your default PATH locations. Or else the following commands will not work. It might be necessary to open a new shell for the environment to be updated.

Install Vaayu from Git

  1. Obtain the Vaayu source from the public git repository

    # Switch to directory where you develop code
    git clone https://github.com/sayerhs/vaayu.git
    cd vaayu
    
  2. Create a custom conda environment and install all Vaayu dependencies. A environment.yml is provided in the main directory to ease this step.

    # Activate Anaconda if you haven't added it to default path
    conda env create -f environment.yml
    

    Note

    1. Users interested in using Vaayu with Python 3.x series should use the etc/vaayu-py3k.yml instead of the default environment.yml.
    2. The default environment does not install packages that are necessary during the development of Vaayu. Developers wishing to extend Vaayu in Python 2.7 environment should use etc/devenv.yaml instead.
  3. Activate the custom environment and install Vaayu within this environment.

    source activate vaayu-env
    pip install .
    

    Note

    1. On windows machines use, activate vaayu-env without the source.
    2. Developers should install Vaayu in editable mode by using the -e option of pip.

Building documentation locally

A local version of this documentation can be built using Sphinx. Note that this requires the user to have installed one of the development conda environments.

# Change to directory where Vaayu was installed
cd docs/

# Build HTML documentation
make html
# View documentation in browser
open build/html/index.html

# Build PDF documentation (requires LaTeX installed)
make latexpdf
open build/latex/Vaayu.pdf

Running tests in development environment

Vaayu provides several unit tests to test the behavior of the library. These tests are written using py.test. To run the tests execute the following command py.test from the top level Vaayu directory.