Skip to content

Commit

Permalink
Add formatting CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sarlinpe committed Feb 19, 2024
1 parent e63f4c9 commit e0aaa57
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Format and Lint Checks
on:
push:
branches:
- master
paths:
- '*.py'
- '*.ipynb'
pull_request:
types: [ assigned, opened, synchronize, reopened ]
jobs:
check:
name: Format and Lint Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements/dev.txt'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/dev.txt
- run: python -m flake8 maploc
- run: python -m isort maploc *.ipynb --check-only --diff
- run: python -m black maploc *.ipynb --check --diff
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile=black
3 changes: 3 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black[jupyter]==24.2.0
isort
flake8

0 comments on commit e0aaa57

Please sign in to comment.