Skip to content
Snippets Groups Projects
Commit 937dc8bc authored by Duncan Macleod's avatar Duncan Macleod
Browse files

Merge branch 'simplify-analysis' into 'main'

Replace complicated quality checks with flake8

See merge request computing/gwdatafind/client!67
parents 002aec6b ea682006
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,6 @@ include:
file:
# https://computing.docs.ligo.org/gitlab-ci-templates/python/
- python.yml
# https://computing.docs.ligo.org/gitlab-ci-templates/codequality/
- codequality.yml
# -- code quality -----------
#
......@@ -23,25 +21,15 @@ flake8:
# https://computing.docs.ligo.org/gitlab-ci-templates/python/#.python:flake8
- .python:flake8
needs: []
artifacts:
paths:
- flake8.json
radon:
stage: Code quality
extends:
# https://computing.docs.ligo.org/gitlab-ci-templates/python/#.python:radon
- .python:radon
needs: []
artifacts:
paths:
- radon.json
codequality:
stage: .post
extends:
# https://computing.docs.ligo.org/gitlab-ci-templates/codequality/#.codequality:combine
- .codequality:combine
needs:
- flake8
- radon
before_script:
# pick requirements out of the setup.cfg
- |
REQUIREMENTS=$(python -c "
from configparser import ConfigParser;
cp = ConfigParser();
cp.read('setup.cfg');
print(cp['options.extras_require']['lint'].strip())")
# install things
- !reference [".python:flake8", before_script]
# code quality issues should present a global 'warning'
allow_failure: true
......@@ -56,24 +56,54 @@ test =
pytest >= 2.8.0
pytest-cov
requests-mock
lint =
flake8
flake8-bandit
flake8-docstrings
radon
# -- tools
[flake8]
select =
# pydocstyle
D,
# pycodestyle errors
E,
EXE,
# pyflakes
F,
# radon
R,
# bandit security
S,
# pycodestyle warnings
W,
ignore =
# one line docstring should fit on one line
D200,
# blank link after class docstring
D203, D204
# missing whitespace around arithmetic operator
E226,
# use of assert
S101,
# line break before binary operator, use W504
W503,
exclude =
# non source files
__pycache__,
.eggs/,
.git/,
build/,
docs/,
venv/,
# deprecated modules
gwdatafind/http.py,
# ignore codes per-file
per-file-ignores =
__init__.py:F401,F403
# unused import in __init__
__init__.py: F401, F403
# missing docstring in test function
test_*.py: D10
# maximum acceptable code complexity value
radon-max-cc = 5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment