Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.5 KB

CONTRIBUTING.md

File metadata and controls

48 lines (36 loc) · 1.5 KB

Contributing

We use travis for automated CI of the code (and status checks are required to pass prior to PR merges being accepted). We use travis to deploy updated versions to PyPI (only from master)

For local development (cross version) we use tox with pyenv to automate the running of unit tests against different python versions in virtualised python environments.

Installation

To setup your environment:

  1. Install Python
  2. Install Pyenv
brew update
brew install pyenv
  1. Install your favorite Python version (>= 3.8 please!)
pyenv install <YOUR_FAVORITE_VERSION>
  1. Install Poetry, see: https://python-poetry.org/docs/#installation
  2. Install Dependencies
poetry install -v

Cloning the Repo

This repo contains the submodule mauth-protocol-test-suite so requires a flag when initially cloning in order to clone and init submodules:

git clone --recurse-submodules [email protected]:mdsol/mauth-client-python.git

If you have already cloned before the submodule was introduced, then run:

cd tests/mauth-protocol-test-suite
git submodule update --init

to init the submodule.

Unit Tests

  1. Make any changes, update the tests and then run tests with poetry run tox.
  2. Coverage report can be viewed using open htmlcov/index.html.
  3. Or if you don't care about tox, just run poetry run pytest or poetry run pytest <SOME_FILE>.