diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..2b5037ed5 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,26 @@ +codecov: + notify: + require_ci_to_pass: yes + +coverage: + precision: 2 + round: down + range: "70...100" + + status: + project: yes + patch: yes + changes: no + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + layout: "header, diff" + behavior: default + require_changes: no diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..c30fccabf --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +# *.c text +# *.h text + +# Declare files that will always have CRLF line endings on checkout. +*.py text eol=crlf + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary +*.icns binary +*.ico binary +*.db binary diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..497b67b08 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: python +python: + - '2.7' +env: + - TOXENV=pep8 +addons: + apt: + packages: + # for wxPython: + - python-wxgtk2.8 + - python-wxtools + - wx2.8-doc + - wx2.8-examples + - wx2.8-headers + - wx2.8-i18n +before_install: + - pip install -U tox +install: + - pip install -r requirements.txt + - pip install -r requirements_test.txt +script: + - tox + - py.test --cov=./ +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..f8e777507 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +matplotlib +PyYAML +python-dateutil +urllib3 +requests==2.11.1 +sqlalchemy diff --git a/requirements_test.txt b/requirements_test.txt new file mode 100644 index 000000000..1bbef8b92 --- /dev/null +++ b/requirements_test.txt @@ -0,0 +1,7 @@ +pytest==3.0.3 +pytest-mock==1.2 +pytest-cov==2.3.1 +pytest-capturelog==0.7 +coverage==4.2 +coveralls==1.1 +codecov diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..3ce2756f3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,15 @@ +[tox] +envlist = pep8 +skipsdist = True + +[testenv] +passenv = CI TRAVIS TRAVIS_* +deps = + -rrequirements.txt + -rrequirements_test.txt +basepython = python2.7 +commands = py.test -vv --cov Pyfa tests/ + +[testenv:pep8] +deps = flake8 +commands = flake8 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,venv,tests,.tox,build,dist,__init__.py --ignore=E501,E731 gui_service gui eos utils config.py pyfa.py