release 0.3.0 #267
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: lint | |
on: | |
# run on every push to main | |
push: | |
branches: | |
- main | |
# run on every push (not commit) to a PR, plus open/reopen | |
pull_request: | |
types: | |
- synchronize | |
- opened | |
- reopened | |
jobs: | |
mypy: | |
name: mypy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install system dependencies | |
run: sudo apt install libgeos-dev | |
- name: Install Python dependencies | |
run: pip install -e . | |
- run: pip install mypy | |
- name: Install relevant Python type stub libraries | |
run: pip install types-requests | |
- name: mypy | |
run: mypy --strict . | |
various: | |
name: various (Black, pylint, pydocstyle) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install linting tools | |
run: pip install black pylint pydocstyle | |
- name: Install dependencies (required for pylint) | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install . | |
# annotate each step with `if: always` to run all regardless | |
- name: Assert that code matches Black code style | |
if: always() | |
uses: psf/black@stable | |
- name: Lint with pylint | |
if: always() | |
run: pylint $(find -type f -name *.py) | |
- name: Lint with pydocstyle | |
if: always() | |
run: pydocstyle --convention=numpy . |