Skip to content

Hfx updates

Hfx updates #78

name: Linter
on:
pull_request:
push:
branches: ["main"]
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run flake8 for critical errors
run: |
# Fail the build for the following critical errors:
# E9** syntax, io, or indentation error
# F63* syntax error in assertion, comparison, or print
# F7** syntax error in loops or functions
# F82* undefined variables
flake8 jobmanager --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Run full flake8 linter
run: |
# Will never fail the build because of the --exit-zero flag but gives a report of the "code quality"
flake8 jobmanager --count --statistics --max-complexity 15 --max-line-length=127 --exit-zero
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy types-setuptools types-PyYAML types-requests types-tensorflow pandas-stubs
- name: Typecheck with mypy
run: |
mypy --ignore-missing-imports jobmanager