-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub actions to automatically run black on python files Co-authored-by: TanyaSpiden <[email protected]>
- Loading branch information
1 parent
39113ac
commit c1fc903
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: python auto-format | ||
on: | ||
# Triggers the workflow on push to all the branches and on pull request to the "master" or the "dev" branch | ||
push: | ||
pull_request: | ||
branches: [ "master", "dev"] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r requirements_git_actions.txt | ||
- name: apply_black | ||
run: | ||
black --verbose . | ||
|
||
- uses: psf/black@stable | ||
with: | ||
options: "--check --verbose" | ||
src: "." | ||
jupyter: true | ||
version: "~= 22.0" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,6 +149,9 @@ ENV/ | |
env.bak/ | ||
venv.bak/ | ||
|
||
#Data | ||
data/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
black==23.9.1 | ||
black[jupyter] |