update readme #15
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: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y g++ python3-dev | |
- name: Create directories | |
run: | | |
mkdir -p pattern_causality/utils | |
mkdir -p utils | |
touch pattern_causality/__init__.py | |
touch pattern_causality/utils/__init__.py | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install numpy pandas | |
python -m pip install black isort flake8 mypy typing-extensions | |
python -m pip install build | |
- name: Build package | |
run: | | |
python -m pip install . | |
- name: Format with Black | |
run: | | |
black . --check --diff | |
continue-on-error: true | |
- name: Check imports with isort | |
run: | | |
isort . --check-only --diff | |
continue-on-error: true | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 . --count --exit-zero --max-complexity=10 --statistics | |
continue-on-error: true | |
- name: Type check with mypy | |
run: | | |
mypy pattern_causality --ignore-missing-imports | |
continue-on-error: true |