From 3074cb06d01c810fc758ed75daf3d28436c11d0f Mon Sep 17 00:00:00 2001 From: Tomasz Jakub Rup Date: Sat, 6 May 2017 19:18:15 +0200 Subject: [PATCH] add missing files --- .codeclimate.yml | 15 +++++++++++++++ .coveragerc | 24 ++++++++++++++++++++++++ .editorconfig | 14 ++++++++++++++ .travis.yml | 38 ++++++++++++++++++++++++++++++++++++++ travis_syncdb.sh | 7 +++++++ 5 files changed, 98 insertions(+) create mode 100644 .codeclimate.yml create mode 100644 .coveragerc create mode 100644 .editorconfig create mode 100644 .travis.yml create mode 100755 travis_syncdb.sh diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..09dbb9f --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,15 @@ +engines: + duplication: + enabled: true + config: + languages: + - python + fixme: + enabled: true + radon: + enabled: true + pep8: + enabled: true +ratings: + paths: + - "authrole/**.py" diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..ced44a6 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,24 @@ +# .coveragerc to control coverage.py +[run] +branch = True +source = authrole +omit = + authrolw/tests.py + +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + + # Don't complain about missing debug-only code: + def __repr__ + if self\.debug + + # Don't complain if tests don't hit defensive assertion code: + raise AssertionError + raise NotImplementedError + + # Don't complain if non-runnable code isn't run: + if 0: + if __name__ == .__main__.: diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..42e6136 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +end_of_line = lf +insert_final_newline = false +trim_trailing_whitespace = true +charset = utf-8 + +[*.py] +indent_style = space +indent_size = 4 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..654a922 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +language: python + +python: + - 2.7 + +env: + - DJANGO=1.4.22 + - DJANGO=1.5.12 + - DJANGO=1.6.11 + - DJANGO=1.7.11 + - DJANGO=1.8.18 + - DJANGO=1.9.13 + - DJANGO=1.10.7 + - DJANGO=1.11 + +matrix: + include: + - python: 3.4 + env: DJANGO=1.11 + - python: 3.5 + env: DJANGO=1.11 + - python: 3.6 + env: DJANGO=1.11 + +install: + - pip install coveralls pyyaml south + - pip install -q Django==$DJANGO + - pip install --upgrade mock + +before_script: + - ./travis_syncdb.sh + - python manage.py migrate + +script: + - coverage run manage.py test tests + +after_success: + - coveralls \ No newline at end of file diff --git a/travis_syncdb.sh b/travis_syncdb.sh new file mode 100755 index 0000000..9c45d41 --- /dev/null +++ b/travis_syncdb.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +CNT=`python manage.py|grep syncdb|wc -l` + +if [ $CNT -gt 0 ]; then + python manage.py syncdb --noinput +fi \ No newline at end of file