Commit 586a8aed authored by Tjerk Vreeken's avatar Tjerk Vreeken

Add flake8 test

Most existing files have issues, and have been added to the exclude
list.
parent 90749222
......@@ -4,11 +4,21 @@ before_script:
- pip install tox
stages:
- style
- build
- test
- coverage
- deploy
# style
flake8:
stage: style
image: python:3.6
script:
- tox -vv
variables:
TOXENV: flake8
# build
build:
stage: build
......
......@@ -10,6 +10,64 @@ VCS = git
style = pep440
versionfile_source = src/rtctools/_version.py
versionfile_build = rtctools/_version.py
tag_prefix =
tag_prefix =
parentdir_prefix = rtctools-
[flake8]
max-line-length = 99
exclude =
# generated files
src/rtctools/_version.py
# TODO files with known flake8 issues
# remove these ignores once they are fixed
doc/conf.py
examples/basic/src/example.py
examples/ensemble/src/example.py
examples/goal_programming/src/example.py
examples/lookup_table/src/example.py
examples/mixed_integer/src/example.py
examples/simulation/src/example.py
src/rtctools/_internal/alias_tools.py
src/rtctools/_internal/caching.py
src/rtctools/_internal/casadi_helpers.py
src/rtctools/data/__init__.py
src/rtctools/data/csv.py
src/rtctools/data/interpolation/__init__.py
src/rtctools/data/interpolation/bspline.py
src/rtctools/data/interpolation/bspline1d.py
src/rtctools/data/interpolation/bspline2d.py
src/rtctools/data/pi.py
src/rtctools/data/rtc.py
src/rtctools/optimization/collocated_integrated_optimization_problem.py
src/rtctools/optimization/control_tree_mixin.py
src/rtctools/optimization/csv_lookup_table_mixin.py
src/rtctools/optimization/csv_mixin.py
src/rtctools/optimization/goal_programming_mixin.py
src/rtctools/optimization/homotopy_mixin.py
src/rtctools/optimization/initial_state_estimation_mixin.py
src/rtctools/optimization/linearization_mixin.py
src/rtctools/optimization/modelica_mixin.py
src/rtctools/optimization/optimization_problem.py
src/rtctools/optimization/pi_mixin.py
src/rtctools/optimization/timeseries.py
src/rtctools/simulation/csv_mixin.py
src/rtctools/simulation/pi_mixin.py
src/rtctools/simulation/simulation_problem.py
src/rtctools/util.py
tests/data/data_path.py
tests/data/test_csv.py
tests/data/test_data.py
tests/data/test_interpolate.py
tests/data_path.py
tests/optimization/data_path.py
tests/optimization/test_control_tree_mixin.py
tests/optimization/test_csv_mixin.py
tests/optimization/test_goal_programming.py
tests/optimization/test_integration.py
tests/optimization/test_modelica_mixin.py
tests/optimization/test_pi_mixin.py
tests/simulation/data_path.py
tests/simulation/test_pi_mixin.py
tests/simulation/test_simulation.py
tests/test_case.py
[tox]
envlist =
py{35,36},coverage
py{35,36},flake8,coverage
[testenv]
commands = python setup.py test {posargs}
[testenv:flake8]
skip_install = True
deps =
flake8
flake8-bugbear
flake8-comprehensions
flake8-import-order
commands = flake8 src tests doc/conf.py examples
[testenv:coverage]
deps = coverage
commands =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment