Installing prerequisites

Make sure you have Python (2.7 or 3.4+) installed on your system. If you don’t have it yet, follow these instructions.

Resolwe requires PostgreSQL (9.4+). Many Linux distributions already include the required version of PostgreSQL (e.g. Fedora 22+, Debian 8+, Ubuntu 15.04+) and you can simply install it via distribution’s package manager. Otherwise, follow these instructions.

The pip tool will install all Resolwe’s dependencies from PyPI. Installing the psycopg2 dependency will require having a C compiler (e.g. GCC) as well as Python and PostgreSQL development files installed on the system.


The preferred way to install the C compiler and Python and PostgreSQL development files is to use your distribution’s packages, if they exist. For example, on a Fedora/RHEL-based system, that would mean installing gcc, python-devel/python3-devel and postgresql-devel packages.

Preparing environment

Fork the main Resolwe’s git repository.

If you don’t have Git installed on your system, follow these instructions.

Clone your fork (replace <username> with your GitHub account name) and change directory:

git clone<username>/resolwe.git
cd resolwe

Prepare Resolwe for development:

pip install -e .[docs,package,test]


We recommend using virtualenv (on Python 2.7) or pyvenv (on Python 3.4+) to create an isolated Python environment for Resolwe.

Preparing database

Create a resolwe database:

# Remove database if exists
dropdb resolwe

# Create database
createdb resolwe

Set-up database:

cd tests
./ migrate
./ createsuperuser --username admin --email

Registering processes

cd tests
./ process_register --path <path to packages>

Running tests

To run the tests, use:

cd tests
./ test resolwe

To run the tests with Tox, use:

tox -r

Buildling documentation

python build_sphinx

Preparing release

Clean build directory:

python clean -a

Remote previous distributions in dist directory:

rm dist/*

Bump project’s version in resolwe/ file and update the changelog in docs/CHANGELOG.rst.

Commit changes to git:

git commit -a -m "Prepare release <new-version>"

Tag the new version:

git tag <new-version>

Push changes to the main Resolwe’s git repository:

git push <resolwe-upstream-name> master <new-version>

Create source distribution:

python sdist

Build wheel:

python bdist_wheel

Upload distribution to PyPI:

twine upload dist/*