split test #10
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: Clean Up and Format | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
- 'dev' | |
jobs: | |
clean-up: | |
name: Clean Up Python Notebooks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT || github.token }} | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Cleanup ipynb output | |
run: | | |
pip install --upgrade pip | |
pip install nbconvert | |
python -m jupyter nbconvert --clear-output --inplace *.ipynb */*.ipynb */*/*.ipynb */*/*/*.ipynb | |
- name: Commit clean up changes | |
run: ./scripts/commit-and-push.sh "[CI] cleanup python notebooks" | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT || github.token }} | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: | | |
pip install --upgrade pip | |
pip install autoflake autopep8 black isort flake8 | |
- name: Fix lint with autoflake | |
run: python -m autoflake spatialyze | |
- name: Fix lint with autopep8 | |
run: python -m autopep8 spatialyze | |
- name: Format with black | |
run: python -m black --config pyproject.toml spatialyze | |
- name: Sort imports with isort | |
run: python -m isort spatialyze | |
- name: Commit formatted changes | |
run: ./scripts/commit-and-push.sh "[CI] format" |