HDMF has the following minimum requirements, which must be installed before you can get started using HDMF.

  1. Python 3.6, 3.7, or 3.8
  2. pip


Install release from PyPI

The Python Package Index (PyPI) is a repository of software for the Python programming language.

To install or update the HDMF distribution from PyPI, simply run:

$ pip install -U hdmf

This will automatically install the following required dependencies:

  1. h5py
  2. numpy
  3. scipy
  4. pandas
  5. ruamel.yaml

Install release from conda-forge

conda-forge is a community-led collection of recipes, build infrastructure, and distributions for the conda package manager.

To install or update the HDMF distribution from conda-forge using conda, simply run:

$ conda install -c conda-forge hdmf

Install latest pre-release

To try out the latest features and also set up continuous integration of your own project against the latest version of HDMF, install the latest release from GitHub.

$ pip install -U hdmf --find-links --no-index

For developers

Install from Git repository

For development, an editable install in a virtual environment is recommended. First, create a new virtual environment located at ~/hdmf using the virtualenv tool.

$ pip install -U virtualenv
$ virtualenv ~/hdmf
$ source ~/hdmf/bin/activate

Alternatively, you can use the conda environment and package manager to create your virtual environment. This may work better on Windows.

$ conda create --name hdmf-dev python=3.8
$ conda activate hdmf-dev

Then clone the git repository for HDMF, install the HDMF package requirements using the pip Python package manager, and install HDMF.

$ git clone --recurse-submodules
$ cd hdmf
$ pip install -r requirements.txt
$ pip install -e .

Run tests

For running the tests, it is required to install the development requirements. Within a virtual environment, run the following code, which will clone the git repository for HDMF, install the HDMF package requirements using pip, install HDMF, and run tests using the tox automated testing tool.

$ cd hdmf
$ pip install -r requirements.txt -r requirements-dev.txt
$ pip install -e .
$ tox

Following the HDMF Style Guide

Before you create a Pull Request, make sure you are following the HDMF style guide (PEP8). To check whether your code conforms to the HDMF style guide, make sure you have the development requirements installed (see above) and then simply run the flake8 tool in the project’s root directory.

$ flake8