Installing prerequisites

Make sure you have Python 3.7+ installed on your system. If you don’t have it yet, follow these instructions.

Preparing environment

Fork the main Resolwe SDK for Python 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-bio-py.git
cd resolwe-bio-py

Prepare Resolwe SDK for Python for development:

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


We recommend using venv to create an isolated Python environment.

Running tests

Run unit tests:


Coverage report

To see the tests’ code coverage, use:

py.test --cov=resdk

To generate an HTML file showing the tests’ code coverage, use:

py.test --cov=resdk --cov-report=html

Building documentation

python build_sphinx

Preparing release

Checkout the latest code and create a release branch:

git checkout master
git pull
git checkout -b release-<new-version>

Replace the Unreleased heading in docs/CHANGELOG.rst with the new version, followed by release’s date (e.g. 13.2.0 - 2018-10-23).

Commit changes to git:

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

Push changes to your fork and open a pull request:

git push --set-upstream <resdk-fork-name> release-<new-version>

Wait for the tests to pass and the pull request to be approved. Merge the code to master:

git checkout master
git merge --ff-only release-<new-version>
git push <resdk-upstream-name> master <new-version>

Tag the new release from the latest commit:

git checkout master
git tag -sm "Version <new-version>" <new-version>

Push the tag to the main ReSDK’s git repository:

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

The tagged code will we be released to PyPI automatically.