remove unused or deprecated code and data #188
Workflow file for this run
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: Check format and static typing | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
paths: | |
- '**.py' | |
- '.github/workflows/format-typing-check.yml' | |
pull_request: | |
branches: | |
- dev | |
- main | |
paths: | |
- '**.py' | |
- '.github/workflows/format-typing-check.yml' | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
jobs: | |
format-check: | |
name: Check code format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install ruff and mypy | |
run: | | |
pip install ruff mypy typing_extensions \ | |
types-Deprecated types-beautifulsoup4 types-jsonschema \ | |
types-networkx types-tabulate types-PyYAML pandas-stubs | |
- name: Get all changed python files | |
id: changed-python-files | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
**.py | |
- name: Check format using ruff | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-python-files.outputs.all_changed_files }} | |
run: | | |
ruff check ${ALL_CHANGED_FILES} | |
- name: Check static typing using mypy | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-python-files.outputs.all_changed_files }} | |
run: | | |
mypy ${ALL_CHANGED_FILES} |