diff --git a/.flake8 b/.flake8 index 48cf7d7..5890202 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] max-line-length = 127 exclude = .git,__pycache__,doc/,docs/,build/,dist/,archive/,setup.py -ignore = E121,E123,E126,E226,E24,E704,W503,W504,C901 +ignore = E121,E123,E126,E226,E24,E704,W292,W503,W504,C901 per-file-ignores = __init__.py:F401 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b8292b8..3da834f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -34,7 +34,17 @@ jobs: pip install -e .[r_wrapper,tests,docs] - name: Lint with flake8 run: | - flake8 . --count --statistics + # stop the build if there are Python syntax errors or undefined names + # E9: Runtime errors (syntax, indentation, io) + # F63: Wrong use of operators and always-true assertion tests + # F7: Wrong position of statements (break, continue, return, ...) + # F82: Undefined (variable) name + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # + # print warnings if other style errors are found. + # see .flake8 config file for selected/ignored rules. + # warnings can be found in the action logs + flake8 . --count --exit-zero --statistics --show-source - name: Test with pytest and measure coverage run: | pytest cblearn --cov=cblearn --cov-report=xml diff --git a/cblearn/embedding/tests/test_sklearn_estimator_checks.py b/cblearn/embedding/tests/test_sklearn_estimator_checks.py index e0ad992..26b737f 100644 --- a/cblearn/embedding/tests/test_sklearn_estimator_checks.py +++ b/cblearn/embedding/tests/test_sklearn_estimator_checks.py @@ -75,6 +75,7 @@ def wrap_triplet_estimator(estimator): 'check_methods_sample_order_invariance', ] + @pytest.mark.sklearn @parametrize_with_checks( ALL_TRIPLET_EMBEDDING_ESTIMATORS