diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93c3feb54cbda3398fee7b462402eee81ccde8a4..9de21259833421b0ba11cca7829addd6e4b7c6ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,7 @@ Python 2.7: - python2.7 except: - tags + Python 3.5: script: - py_version=3.5 @@ -18,6 +19,7 @@ Python 3.5: - python3.5 except: - tags + Python 2.6: script: - py_version=2.6 @@ -28,6 +30,7 @@ Python 2.6: - python2.6 except: - tags + Documentation: script: - EXTRA_INSTALL="numpy" @@ -37,3 +40,12 @@ Documentation: - python3.5 only: - master + +Flake8: + script: + - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh + - ". ./prepare-and-run-flake8.sh leap test" + tags: + - python3.5 + except: + - tags diff --git a/leap/multistep/multirate/__init__.py b/leap/multistep/multirate/__init__.py index aabf3afebf9b710dd441bdf76ad5baf6008d6168..cbd79da7f38db86f7931edf5ae44736280a007ce 100644 --- a/leap/multistep/multirate/__init__.py +++ b/leap/multistep/multirate/__init__.py @@ -50,7 +50,7 @@ __doc__ = """ # {{{ system description -class rhs_policy: +class rhs_policy: # noqa """ .. attribute:: late .. attribute:: early diff --git a/leap/stability.py b/leap/stability.py index f8dc53033a82c3ff51d9cb23ca00d594e25e1e5b..3cd8952ac91ba1679f88f35c19e4a1af121f4636 100644 --- a/leap/stability.py +++ b/leap/stability.py @@ -32,6 +32,7 @@ __doc__ = """ .. autofunction:: find_stability_region """ + def is_stable(integrator_cls, k): def f(t, y): return k*y diff --git a/test/test_codegen_fortran.py b/test/test_codegen_fortran.py index a198ce25dd301be950c4b9e7970154c49ccfdc98..d04a51709e581b15a6b723f4658f0053a9843fa7 100755 --- a/test/test_codegen_fortran.py +++ b/test/test_codegen_fortran.py @@ -530,6 +530,7 @@ def test_multirate_squarewave(min_order, method_name): ], fortran_options=["-llapack", "-lblas"]) + if __name__ == "__main__": if len(sys.argv) > 1: exec(sys.argv[1]) diff --git a/test/test_misc.py b/test/test_misc.py index 9f79ffd6458bc9940f4a8624d8a181cdab4a855f..244d2a6d29b150a3eea21b128b6bb9254c2258a0 100644 --- a/test/test_misc.py +++ b/test/test_misc.py @@ -91,6 +91,7 @@ def test_strang_splitting(plot_solution=False): orderest = eocrec.estimate_order_of_convergence()[0, 1] assert orderest > 2 * 0.9 + if __name__ == "__main__": if len(sys.argv) > 1: exec(sys.argv[1]) diff --git a/test/test_step_matrix.py b/test/test_step_matrix.py index f37380b3e7025a260a31a005aa4d028ead87830a..0c0d77edd530f25d0612e984e0b2d725ca65a5a8 100755 --- a/test/test_step_matrix.py +++ b/test/test_step_matrix.py @@ -130,7 +130,7 @@ def test_step_matrix_vector_state(show_matrix=True, show_dag=False): component_id = 'y' code = euler(component_id, show_dag) - J = np.diag([-3, -2, -1]) + J = np.diag([-3, -2, -1]) # noqa def rhs_sym(t, y): return J.dot(y) @@ -159,7 +159,7 @@ def test_step_matrix_fast_eval(): component_id = 'y' code = euler(component_id, show_dag=False) - J = np.diag([-3, -2, -1]) + J = np.diag([-3, -2, -1]) # noqa def rhs_sym(t, y): return J.dot(y) @@ -181,7 +181,7 @@ def test_step_matrix_sparse(): component_id = 'y' code = euler(component_id, show_dag=False) - J = np.diag([-3, -2, -1]) + J = np.diag([-3, -2, -1]) # noqa def rhs_sym(t, y): return J.dot(y)