Skip to content

Pipeline: Adds handling of gun deaths overall to WISQARS #1142

Pipeline: Adds handling of gun deaths overall to WISQARS

Pipeline: Adds handling of gun deaths overall to WISQARS #1142

Workflow file for this run

name: RUN Python Type Checks
on:
pull_request:
branches:
- main
paths:
# only run these tests on pull request if relevant code is changed
- 'airflow/**'
- 'data_server/**'
- 'e2e_tests/**'
- 'exporter/**'
- 'python/**'
- 'run_gcs_to_bq/**'
- 'run_ingestion/**'
workflow_dispatch:
jobs:
mypy:
name: Run mypy
runs-on: ubuntu-latest
steps:
- name: Check Out Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install mypy
pip install -r data_server/requirements.txt
pip install -r run_ingestion/requirements.txt
pip install -r run_gcs_to_bq/requirements.txt
pip install -r requirements/tests.txt
- name: Install type stubs
run: |
pip install types-requests types-PyYAML types-setuptools
- name: Install mypy stubs and run mypy
run: |
for dir in "data_server/ python/data_server/" "run_ingestion/ python/ingestion/" "run_gcs_to_bq/ python/ingestion/" "airflow/dags/"; do
mypy --install-types --non-interactive $dir
mypy --ignore-missing-imports --follow-imports=silent --show-error-codes --pretty --config-file=.github/linters/mypy.ini $dir || true
done