Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Commit

Permalink
Setup testing (#5)
Browse files Browse the repository at this point in the history
refactor setup.py and requirements.txt, add tests directory and circleci config
  • Loading branch information
buckley-w-david committed Apr 23, 2018
1 parent f3597fa commit b54f306
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 10 deletions.
33 changes: 33 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,33 @@
jobs:
data:
docker:
- image: "circleci/python:3.6.1"
steps:
- checkout:
path: ~/repo
- restore_cache:
key: "deps1-{{ .Branch }}-{{ checksum \"requirements.txt\" }}"
- run:
command: |
python3 -m venv .env
. .env/bin/activate
pip install -r requirements.txt
pip install -e .[development]
name: "Installing dependencies"
- save_cache:
key: "deps1-{{ .Branch }}-{{ checksum \"requirements.txt\" }}"
paths:
- .env
- run:
command: |
. .env/bin/activate
# pylint src tests -- Major overhaul needed to not fail linting, not including linting in tests for now
# mypy src tests
pytest --cov=data tests
name: "Running tests"
working_directory: ~/repo
workflows:
version: 2
pulse:
jobs:
- data
11 changes: 1 addition & 10 deletions requirements.txt
@@ -1,10 +1 @@
cfenv==0.5.2
flask==0.12
gunicorn==19.6.0
newrelic==2.86.2.68
pyyaml==3.12
python-slugify==1.2.1
tinydb==3.2.1
ujson==1.35
waitress==1.0.1
flask-compress==1.4.0
-e .
20 changes: 20 additions & 0 deletions setup.py
Expand Up @@ -16,4 +16,24 @@
'Natural Language :: English',
'Programming Language :: Python :: 3',
],
install_requires=[
'cfenv==0.5.2',
'flask==0.12',
'gunicorn==19.6.0',
'newrelic==2.86.2.68',
'pyyaml==3.12',
'python-slugify==1.2.1',
'tinydb==3.2.1',
'ujson==1.35',
'waitress==1.0.1',
'flask-compress==1.4.0',
],
extras_require={
'development': [
'mypy==0.590',
'pylint==1.8.4',
'pytest==3.5.0',
'pytest-cov==2.5.1',
],
},
)
2 changes: 2 additions & 0 deletions tests/test_basic.py
@@ -0,0 +1,2 @@
def test_nothing() -> None:
assert True

0 comments on commit b54f306

Please sign in to comment.