Skip to content

Commit

Permalink
Merge pull request City-of-Helsinki#47 from suutari-ai/separate-requi…
Browse files Browse the repository at this point in the history
…rements

Update requirements and split requirements-dev
  • Loading branch information
suutari-ai authored Feb 12, 2018
2 parents 0100975 + 7c05a3d commit 0430a8c
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 64 deletions.
37 changes: 18 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@ sudo: false
dist: trusty

language: python
python:
- '3.4'
- '3.5'
- '3.6'

cache: pip

matrix:
include:
- python: "3.4"
- python: "3.5"
- python: "3.6"
- env: TOXENV=requirements
python: "3.4"
addons: null
before_script: null
- env: TOXENV=style
python: "3.4"
addons: null
before_script: null


# As of 2017-08 the new travis trusty images have broken postgis,
# so we have to specify the exact postgres version to install right addons
addons:
Expand All @@ -19,22 +30,10 @@ addons:
packages:
- postgresql-9.6-postgis-2.3

install: 'pip install codecov -r requirements.txt -r requirements-dev.txt'
install: pip install tox-travis codecov

before_script:
- psql -c 'create database parkkihubi;' -U postgres
- psql -U postgres -c "create extension postgis"
before_script: psql -U postgres -c "create extension postgis"

script:
- flake8
- pytest -ra -vvv --cov
- |
if [ "$TRAVIS_PYTHON_VERSION" = "3.4" ]; then
pip install -q prequ
prequ check -v
fi
script: tox

after_success: codecov

env:
- SECRET_KEY=topsecret123
11 changes: 1 addition & 10 deletions requirements-dev.in
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
autoflake
autopep8
django-extensions
flake8
freezegun
ipython
isort
pydocstyle
pytest
pytest-cov
pytest-django
pytest-factoryboy
tox
werkzeug

# Factory Boy 2.9.0 to 2.9.2 don't seem to work. See
# https://github.com/pytest-dev/pytest-factoryboy/issues/47
factory-boy!=2.9.0,!=2.9.1,!=2.9.2
44 changes: 16 additions & 28 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,31 @@
#
# prequ update
#
attrs==17.3.0 # via pytest
autoflake==1.0
autopep8==1.3.3
coverage==4.4.2 # via pytest-cov
decorator==4.1.2 # via ipython, traitlets
django-extensions==1.9.8
factory-boy==2.8.1
faker==0.8.7 # via factory-boy
flake8==3.5.0
freezegun==0.3.9
inflection==0.3.1 # via pytest-factoryboy
autoflake==1.1
autopep8==1.3.4
decorator==4.2.1 # via ipython, traitlets
django-extensions==1.9.9
ipython==6.2.1
ipython-genutils==0.2.0 # via traitlets
isort==4.2.15
jedi==0.11.0 # via ipython
mccabe==0.6.1 # via flake8
parso==0.1.0 # via jedi
pexpect==4.3.0 # via ipython
jedi==0.11.1 # via ipython
parso==0.1.1 # via jedi
pexpect==4.3.1 # via ipython
pickleshare==0.7.4 # via ipython
pluggy==0.6.0 # via pytest
pluggy==0.6.0 # via tox
prompt-toolkit==1.0.15 # via ipython
ptyprocess==0.5.2 # via pexpect
py==1.5.2 # via pytest
pycodestyle==2.3.1 # via autopep8, flake8
py==1.5.2 # via tox
pycodestyle==2.3.1 # via autopep8
pydocstyle==2.1.1
pyflakes==1.6.0 # via autoflake, flake8
pyflakes==1.6.0 # via autoflake
pygments==2.2.0 # via ipython
pytest==3.3.1
pytest-cov==2.5.1
pytest-django==3.1.2
pytest-factoryboy==1.3.1
python-dateutil==2.6.1 # via faker, freezegun
simplegeneric==0.8.1 # via ipython
six==1.11.0 # via django-extensions, faker, freezegun, prompt-toolkit, pydocstyle, pytest, python-dateutil, traitlets
six==1.11.0 # via django-extensions, prompt-toolkit, pydocstyle, tox, traitlets
snowballstemmer==1.2.1 # via pydocstyle
text-unidecode==1.1 # via faker
tox==2.9.1
traitlets==4.3.2 # via ipython
typing==3.6.2 # via django-extensions, ipython
typing==3.6.4 # via django-extensions, ipython
virtualenv==15.1.0 # via tox
wcwidth==0.1.7 # via prompt-toolkit
werkzeug==0.13
werkzeug==0.14.1
1 change: 1 addition & 0 deletions requirements-style.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8
8 changes: 8 additions & 0 deletions requirements-style.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file is autogenerated by Prequ. To update, run:
#
# prequ update
#
flake8==3.5.0
mccabe==0.6.1 # via flake8
pycodestyle==2.3.1 # via flake8
pyflakes==1.6.0 # via flake8
9 changes: 9 additions & 0 deletions requirements-test.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
freezegun
pytest
pytest-cov
pytest-django
pytest-factoryboy

# Factory Boy 2.9.0 to 2.9.2 don't seem to work. See
# https://github.com/pytest-dev/pytest-factoryboy/issues/47
factory-boy!=2.9.0,!=2.9.1,!=2.9.2
19 changes: 19 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file is autogenerated by Prequ. To update, run:
#
# prequ update
#
attrs==17.4.0 # via pytest
coverage==4.4.2 # via pytest-cov
factory-boy==2.8.1
faker==0.8.10 # via factory-boy
freezegun==0.3.9
inflection==0.3.1 # via pytest-factoryboy
pluggy==0.6.0 # via pytest
py==1.5.2 # via pytest
pytest==3.3.2
pytest-cov==2.5.1
pytest-django==3.1.2
pytest-factoryboy==1.3.1
python-dateutil==2.6.1 # via faker, freezegun
six==1.11.0 # via faker, freezegun, pytest, python-dateutil
text-unidecode==1.1 # via faker
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#
# prequ update
#
certifi==2017.11.5 # via requests
certifi==2018.1.18 # via requests
chardet==3.0.4 # via requests
django==1.11.8
django==1.11.9
django-environ==0.4.4
django-filter==1.1.0
djangorestframework==3.7.3
djangorestframework==3.7.7
djangorestframework-gis==0.12
idna==2.6 # via requests
lxml==4.1.1
owslib==0.15.0
owslib==0.16.0
psycopg2==2.7.3.2
pyproj==1.9.5.1 # via owslib
python-dateutil==2.6.1 # via owslib
pytz==2017.3
raven==6.3.0
raven==6.5.0
requests==2.18.4 # via owslib
six==1.11.0 # via django-environ, djangorestframework-gis, python-dateutil
urllib3==1.22 # via requests
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exclude = *migrations*
ignore = E309

[flake8]
exclude = migrations
exclude = .tox,migrations
max-line-length = 120
max-complexity = 10

Expand All @@ -27,7 +27,7 @@ line_length=120
multi_line_output=5
not_skip=__init__.py
order_by_type=false
skip=migrations
skip=migrations,.tox
wrap_length=120

[pydocstyle]
Expand Down
23 changes: 23 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tox]
envlist = py{34,35,36},requirements,style
skipsdist = True

[testenv]
deps =
-rrequirements.txt
-rrequirements-test.txt
passenv = CI
setenv =
DEBUG=0
SECRET_KEY=topsecret123
commands = py.test -ra -vvv --strict --cov {posargs}

[testenv:requirements]
basepython = python3.4
deps = prequ==1.3.1
commands = prequ check -v

[testenv:style]
basepython = python3.4
deps = -rrequirements-style.txt
commands = flake8 {posargs}

0 comments on commit 0430a8c

Please sign in to comment.