.. _contributing: ============ Contributing ============ Installing prerequisites ======================== Make sure you have Python_ 3.7+ installed on your system. If you don't have it yet, follow `these instructions `__. .. _Python: https://www.python.org/ 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 ```` with your GitHub account name) and change directory:: git clone https://github.com//resolwe-bio-py.git cd resolwe-bio-py Prepare Resolwe SDK for Python for development:: pip install -e '.[docs,package,test]' .. note:: We recommend using `venv `_ to create an isolated Python environment. .. _Resolwe SDK for Python git repository: https://github.com/genialis/resolwe-bio-py Running tests ============= Run unit tests:: py.test 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 ====================== .. code-block:: none python setup.py build_sphinx Preparing release ================= Checkout the latest code and create a release branch:: git checkout master git pull git checkout -b release- 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 " Push changes to your fork and open a pull request:: git push --set-upstream release- 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- git push master Tag the new release from the latest commit:: git checkout master git tag -sm "Version " Push the tag to the main ReSDK's git repository:: git push master The tagged code will we be released to PyPI automatically.