Skip to content

Commit

Permalink
Tox infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
torfsen committed Jun 30, 2017
1 parent 69d8731 commit 07b8541
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/dist/
/build/
/.cache/
/.tox/

/README.html
/.coverage

Expand Down
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ language: python

python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"

install:
- pip install --upgrade pip setuptools wheel
- pip install --only-binary=numpy,scipy numpy scipy
- python setup.py develop
- pip install -r dev-requirements.txt
- pip install coveralls
install: pip install tox-travis coveralls

script: pytest --cov=geoextract --timeout=60 --verbose
script: tox -- --timeout=60 --verbose --verbose

after_success:
- coveralls
Expand Down
23 changes: 4 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,27 +102,12 @@ First clone the repository:
git clone https://github.com/stadt-karlsruhe/geoextract.git
cd geoextract

Make sure you have [NumPy][numpy] and [SciPy][scipy] installed. For example,
on Ubuntu:
Make sure that [tox] is installed (either globally or, better, in a
[virtualenv]). Then run the tests:

sudo apt-get install python-numpy python-scipy

Create a virtualenv:

virtualenv -p python2 --system-site-packages venv
source venv/bin/activate

Install GeoExtract in development mode:

python setup.py develop

Install the development dependencies:

pip install -r dev-requirements.txt

Run the tests:
tox

pytest
[tox]: https://tox.readthedocs.io


## History
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
envlist = py27,py34,py35,py36

[testenv]
install_command = pip install --only-binary=numpy,scipy {opts} {packages}
deps =
-rrequirements.txt
-rdev-requirements.txt

commands = py.test --cov geoextract --cov-report term-missing {posargs}

0 comments on commit 07b8541

Please sign in to comment.