diff --git a/.gitignore b/.gitignore index 2dc2ac8d..f4e8e563 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ __pycache__ uploads .cache .coverage +coverage.xml # MPWO_CLIENT ############### diff --git a/Makefile b/Makefile index 8075891e..f36a4f47 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,13 @@ test-e2e: $(NPM) test test-python: - $(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api + $(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api --cov-report term-missing + +test-python-xml: + $(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api --cov-report xml + +update-cov: + $(COV) -r coverage.xml upgrade-db: $(FLASK) db upgrade --directory $(MIGRATIONS) diff --git a/Makefile.config b/Makefile.config index 0752ddf9..63a3aa16 100644 --- a/Makefile.config +++ b/Makefile.config @@ -19,6 +19,7 @@ PYTHON = $(VENV)/bin/python PIP = $(VENV)/bin/pip FLASK = $(VENV)/bin/flask PYTEST = $(VENV)/bin/py.test +COV = $(VENV)/bin/python-codacy-coverage # Node env NODE_MODULES = $(PWD)/mpwo_client/node_modules diff --git a/Makefile.custom.config.example b/Makefile.custom.config.example index f1d2cf57..6ff6d9f6 100644 --- a/Makefile.custom.config.example +++ b/Makefile.custom.config.example @@ -1 +1,4 @@ export REACT_APP_THUNDERFOREST_API_KEY= + +# for dev env +export CODACY_PROJECT_TOKEN= diff --git a/README.md b/README.md index 9bc1b73b..a969989b 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ [![Flask Version](https://img.shields.io/badge/flask-1.0-brightgreen.svg)](http://flask.pocoo.org/) [![React Version](https://img.shields.io/badge/react-16.3-brightgreen.svg)](https://reactjs.org/) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/45d64b31e37e4890a239b8298e66a011)](https://www.codacy.com/app/SamR1/mpwo?utm_source=github.com&utm_medium=referral&utm_content=SamR1/mpwo&utm_campaign=badger) +[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/45d64b31e37e4890a239b8298e66a011)](https://www.codacy.com/app/SamR1/mpwo?utm_source=github.com&utm_medium=referral&utm_content=SamR1/mpwo&utm_campaign=Badge_Coverage)1 [![Build Status](https://travis-ci.org/SamR1/mpwo.svg?branch=master)](https://travis-ci.org/SamR1/mpwo) Self hosted workout/activity tracker written with Flask and React (_work in progress_). + +--- + +Notes: +_1. Test coverage: only for Python API_ diff --git a/mpwo_api/requirements.txt b/mpwo_api/requirements.txt index acc76bc2..492c7d5f 100644 --- a/mpwo_api/requirements.txt +++ b/mpwo_api/requirements.txt @@ -2,8 +2,11 @@ alembic==0.9.9 apipkg==1.4 attrs==17.4.0 bcrypt==3.1.4 +certifi==2018.4.16 cffi==1.11.2 +chardet==3.0.4 click==6.7 +codacy-coverage==1.3.11 coverage==4.5.1 execnet==1.5.0 flake8==3.5.0 @@ -14,6 +17,7 @@ Flask-Bcrypt==0.7.1 Flask-Migrate==2.1.1 Flask-SQLAlchemy==2.3.2 gpxpy==1.2.0 +idna==2.6 isort==4.2.15 itsdangerous==0.24 Jinja2==2.10 @@ -36,7 +40,9 @@ pytest-isort==0.1.0 pytest-runner==3.0 python-dateutil==2.7.2 python-editor==1.0.3 +requests==2.18.4 six==1.11.0 SQLAlchemy==1.2.7 testfixtures==5.3.1 +urllib3==1.22 Werkzeug==0.14.1