Skip to content

Rework Mapping Template (ABC) Classes #305

Rework Mapping Template (ABC) Classes

Rework Mapping Template (ABC) Classes #305

Workflow file for this run

name: Linters (Code Style Checks)
on:
pull_request:
push:
branches:
- master
jobs:
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install isort
run: |
python -m pip install -r requirements/extras.txt
python -m pip install colorama
- name: Retrieve isort version
run: |
ISORTVERSION=$(python -c "import isort; print(isort.__version__)")
echo "ISORT_VERSION=${ISORTVERSION}" >> $GITHUB_ENV
- name: Which isort version
uses: isort/isort-action@v1.1.0
with:
isort-version: "${{ env.ISORT_VERSION }}"
configuration: "--version"
- name: Run isort checks
uses: isort/isort-action@v1.1.0
with:
isort-version: "${{ env.ISORT_VERSION }}"
configuration: "--check-only --diff --color"
black:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install black
run: |
python -m pip install -r requirements/extras.txt
- name: Retrieve black version
run: |
BLACKVERSION=$(python -c "import black; print(black.__version__)")
echo "BLACK_VERSION=${BLACKVERSION}" >> $GITHUB_ENV
- name: Which black version
uses: psf/black@stable
with:
version: "${{ env.BLACK_VERSION }}"
options: "--version"
- name: Run black checks
uses: psf/black@stable
with:
version: "${{ env.BLACK_VERSION }}"
options: "--check --diff --color"
codespell:
name: codespell
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python -m pip install --progress-bar off pip --upgrade
python -m pip install --progress-bar off -r requirements/extras.txt
- name: Codespell README
run: |
echo
echo "Codespell finds typos in source code. Rather than checking if each word"
echo "matches a dictionary entry, it looks for a set of common misspellings"
echo "in order to reduce the number of false positives."
echo
echo "After codespell has been installed locally ('pip install codespell'),"
echo "running the command 'codespell -i 2 -w' will interactively go through"
echo "misspellings and suggest one or more replacements. Add any false"
echo "positives under ignore-words-list under [codespell] in setup.cfg."
echo
- name: Run test
run: |
codespell .