Skip to content

Add support for running flake8 on travis #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[flake8]
max-line-length: 140
# Whether to display the pep8 instructions on failure (can be quite verbose)
show-pep8: False
# Whether to show source code for each failure
show-source: True
# Maximum cyclomatic complexity allowed
max-complexity: 14
format: pylint
exclude: .git,.idea,.eggs,__pycache__,.tox,docs/conf.py
ignore:
# function is too complex
C901,
# continuation line under-indented for hanging indent
E121,
# continuation line over-indented for hanging indent
E126,
# whitespace before
E203,
# missing whitespace around arithmetic operator
E226,
# unexpected spaces around keyword / parameter equals
E251,
# at least two spaces before inline comment
E261,
# expected 2 blank lines, found 1
E302,
# multiple imports on one line
E401,
# test for membership should be 'not in'
E713,
# blank line contains whitespace
W293,
# blank line at end of file
W391,
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

branches:
only:
- master

language: python

matrix:
include:
- os: linux
python: "3.4"

- os: linux
python: "3.3.5"

- os: linux
python: "2.7"

cache:
directories:
- $HOME/.pyenv/versions/3.5.2
- $HOME/.pyenv/versions/3.4.5
- $HOME/.pyenv/versions/3.3.6
- $HOME/.pyenv/versions/2.7.12
- $HOME/downloads
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These directories look suspicious to me. Furthermore, the versions do not match the ones configured above?


install:
- python -m pip install --disable-pip-version-check --upgrade pip
- pip install -r requirements.txt
- pip install -r requirements-dev.txt

script:
- flake8
- python setup.py sdist
- python setup.py bdist_wheel
# - python setup.py test

after_success:
# - codecov -X gcov --required --file ./tests/coverage.xml

1 change: 1 addition & 0 deletions ctk_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# flake8: noqa: F401
from .module import CLIModule
from .execution import (getXMLDescription, isCLIExecutable,
listCLIExecutables, popenCLIExecutable)
Expand Down