-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from btschwertfeger/dev
Added pre-commit workflow to standardize the code base
- Loading branch information
Showing
19 changed files
with
211 additions
and
117 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
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
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
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
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,20 @@ | ||
name: Pre-Commit | ||
|
||
on: | ||
push: | ||
branches: ["*", "!master"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
concurrency: | ||
group: pre-commit-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-Commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: pre-commit/[email protected] |
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 |
---|---|---|
|
@@ -14,13 +14,22 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-Commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: pre-commit/[email protected] | ||
|
||
build: | ||
needs: [pre-commit] | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
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 |
---|---|---|
|
@@ -136,4 +136,4 @@ del*.py | |
*.zip | ||
|
||
*.egg-info/ | ||
conda.stuff/ | ||
conda.stuff/ |
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 |
---|---|---|
@@ -1,24 +1,45 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
# all available hooks can be found here: https://github.com/pre-commit/pre-commit-hooks/blob/main/.pre-commit-hooks.yaml | ||
- id: check-yaml | ||
- id: check-ast | ||
- id: check-docstring-first | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-added-large-files | ||
args: ["--maxkb=500"] | ||
- id: trailing-whitespace | ||
- id: fix-byte-order-marker | ||
- id: fix-encoding-pragma | ||
- id: requirements-txt-fixer | ||
- id: end-of-file-fixer | ||
- id: check-executables-have-shebangs | ||
- id: detect-private-key | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] # solves conflicts between black and isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '6.0.0' | ||
- id: black | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: flake8 | ||
# exclude: ^examples/ | ||
# additional_dependencies: [flake8-docstrings] | ||
- id: isort | ||
args: ["--profile", "black"] # solves conflicts between black and isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
args: ["--select=E9,F63,F7,F82", "--show-source", "--statistics"] | ||
- repo: https://github.com/pycqa/pylint | ||
rev: v2.17.0 | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
types: [python] | ||
exclude: ^examples/|^tests/|^setup.py$ | ||
args: ["--rcfile=.pylintrc"] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.7.1 | ||
hooks: | ||
- id: prettier |
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
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env python | ||
# -*- coding:utf-8 -*- | ||
# Copyright (C) 2023 Benjamin Thomas Schwertfegerr | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2023 Benjamin Thomas Schwertfeger | ||
# Github: https://github.com/btschwertfeger | ||
# |
Oops, something went wrong.