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.
To setup your environment:
- Install Python
- Install Pyenv
brew update
brew install pyenv
- Install your favorite Python version (>= 3.8 please!)
pyenv install <YOUR_FAVORITE_VERSION>
- Install Poetry, see: https://python-poetry.org/docs/#installation
- Install Dependencies
poetry install -v
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.
- Make any changes, update the tests and then run tests with
poetry run tox
. - Coverage report can be viewed using
open htmlcov/index.html
. - Or if you don't care about tox, just run
poetry run pytest
orpoetry run pytest <SOME_FILE>
.