diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..be40c3e --- /dev/null +++ b/.flake8 @@ -0,0 +1,5 @@ +[flake8] +max-line-length=99 +exclude=.git +select=E,W,F,C,N +ignore= diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f230269 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: python + +python: + - "3.4" + - "3.5" + - "3.5-dev" + - "3.6" + - "3.6-dev" + - "nightly" # currently points to 3.7-dev +install: + - "pip install --editable .[dev]" + - "pip install -r requirements-test.txt" + - "pip install python-coveralls" +script: + - "pytest -v --cov-report= --cov=quaternions tests/" +after_script: + - "flake8 quaternions" + +# report coverage to coveralls.io +after_success: + - coveralls + +cache: + apt: true + pip: true diff --git a/README.md b/README.md index ad23a90..5f92057 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ Quaternions library =================== +[![Coverage Status](https://coveralls.io/repos/github/satellogic/quaternions/badge.svg)](https://coveralls.io/github/satellogic/quaternions) +[![Build Status](https://travis-ci.org/satellogic/quaternions.svg?branch=add_travis_ci)](https://travis-ci.org/satellogic/quaternions) + This is a library for dealing with quaternions in python in a unified way. To install it: diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000..37674ef --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,4 @@ +hypothesis +pytest +pytest-coverage +flake8>=2.5.4 diff --git a/requirements.txt b/requirements.txt index adb7551..24ce15a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ numpy -hypothesis