This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
Bump tornado from 6.1 to 6.3.3 #202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: linters | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
# INSTALLS | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
echo "PYTHONPATH=/home/runner/work/ai-economist-opensource/ai-economist-opensource/" >> $GITHUB_ENV | |
- name: Sort imports with isort | |
run: | | |
# isort config compatible with black | |
isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --use-parentheses --line-width=88 --check-only -rc ai_economist/ | |
continue-on-error: false | |
- name: Format code with black | |
run: | | |
black --line-length 88 --check ai_economist/ | |
continue-on-error: false | |
- name: Lint code with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics ai_economist ai_economist/ | |
# exit-zero treats all errors as warnings. Also outputs error counts | |
# Add as many codes under --ignore for the checks to ignore | |
# E203: Whitespace before ':' (will be taken care of by Black) | |
# C901: Function is too complex | |
# W503: Line break occurred before a binary operator (Black is expected to take care of formatting) | |
# F401: Module imported but unused | |
flake8 --ignore=E203,C901,W503,F401 --count --max-complexity=15 --max-line-length=88 --statistics ai_economist/ | |
- name: Lint code with pylint | |
run: | | |
# Add as many codes under --disable= for the checks to disable | |
# Note: exit-zero disregards all errors | |
# *** CODES CURRENTLY DISABLED *** | |
# C0103: invalid-name | |
# C0114: missing-module-docstring | |
# C0116: missing-function-docstring | |
# C0302: too-many-lines | |
# C0330: bad-continuation | |
# E0401: import-error | |
# R0201: no-self-use | |
# R0801: duplicate-code | |
# R0902: too-many-instance-attributes | |
# R0903: too-few-public-methods | |
# R0904: too-many-public-methods | |
# R0912: too-many-branches | |
# R0913: too-many-arguments | |
# R0914: too-many-locals | |
# R0915: too-many-statements | |
# R1702: too-many-nested-blocks | |
pylint --disable \ | |
bad-continuation,\ | |
duplicate-code,\ | |
import-error,\ | |
invalid-name,\ | |
missing-module-docstring,\ | |
missing-function-docstring,\ | |
no-self-use,\ | |
too-few-public-methods,\ | |
too-many-arguments,\ | |
too-many-branches,\ | |
too-many-instance-attributes,\ | |
too-many-lines,\ | |
too-many-locals,\ | |
too-many-nested-blocks,\ | |
too-many-public-methods,\ | |
too-many-statements \ | |
ai_economist/ | |
- name: Test with pytest | |
run: | | |
pytest |