HDMF has the following minimum requirements, which must be installed before you can get started using HDMF.
- Python 3.6, 3.7, or 3.8
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:
Install release from conda-forge¶
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 https://github.com/hdmf-dev/hdmf/releases/tag/latest --no-index
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 firstname.lastname@example.org:hdmf-dev/hdmf.git $ cd hdmf $ pip install -r requirements.txt $ pip install -e .
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.