If you don’t have Git installed on your system, follow these instructions.
Clone your fork (replace
<username> with your GitHub account name) and
git clone https://github.com/<username>/resolwe-runtime-utils.git cd resolwe-runtime-utils
Prepare Resolwe Runtime Utilities for development:
pip install -e .[dev,docs,package,test]
We recommend using pyvenv to create an isolated Python environement for resolwe-runtime-utils.
To run the tests, use:
To re-create the virtual environment before running the tests, use:
To only run the tests of a given Tox environment, use:
tox -e <tox-environment>
For example, to only run the packaging tests, use
tox -e packaging
To see the list of available Tox environments, see
To run the tests, use:
To see the tests’ code coverage, use:
To generate a HTML with tests’ code coverage, use:
py.test --cov=resolwe_runtime_utils --cov-report=html
python setup.py build_sphinx
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).
Use Semantic versioning.
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 <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>
Tag the new release from the latest commit:
git checkout master git tag -m "Version <new-version>" <new-version>
Project’s version will be automatically inferred from the git tag using setuptools_scm.
Push the tag to the main Resolwe Runtime Utilities git repository:
git push <upstream-name> master <new-version>
The tagged code will we be released to PyPI automatically. Inspect Travis logs of the Release step if errors occur.
When preparing a pre-release (i.e. an alpha release), one can skip the “release” commit that updates the change log and just tag the desired commit with a pre-release tag (e.g. 13.3.0a1). By pushing it to GitHub, the tagged code will be automatically tested by Travis CI and then released to PyPI.