-
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.
Merge pull request #66 from blooop/feature/pre_commit
Feature/pre commit
- Loading branch information
Showing
16 changed files
with
443 additions
and
350 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: pre-commit | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- 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
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,60 @@ | ||
# To use: | ||
# | ||
# pre-commit run -a | ||
# | ||
# Or: | ||
# | ||
# pre-commit install # (runs every time you commit in git) | ||
# | ||
# To update this file: | ||
# | ||
# pre-commit autoupdate | ||
# | ||
# See https://github.com/pre-commit/pre-commit | ||
|
||
repos: | ||
# Standard hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
- id: name-tests-test | ||
- id: detect-private-key | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-xml | ||
- id: check-yaml | ||
args: ['--unsafe'] # Fixes errors parsing custom jinja templates | ||
# - id: check-json | ||
# - id: pretty-format-json | ||
# args: ['--autofix'] | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
# - id: trailing-whitespace | ||
- id: fix-byte-order-marker | ||
|
||
# Formatter for python | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.3 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
types_or: [ python, pyi ] | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
types_or: [ python, pyi ] | ||
# Checks for spelling mistakes | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 #TODO latest version 2.3.0 finds a lot of spelling mistakes but fails on "assertIn" | ||
hooks: | ||
- id: codespell | ||
args: ['--write-changes'] | ||
exclude: \.(svg|pyc|lock|json)$ |
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,17 +1,17 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-python.pylint", | ||
"ms-python.black-formatter", | ||
"njpwerner.autodocstring", | ||
"charliermarsh.ruff", | ||
"mhutchie.git-graph", | ||
"eamodio.gitlens", | ||
"tamasfe.even-better-toml", | ||
"Codium.codium", | ||
"ms-azuretools.vscode-docker", | ||
"ryanluker.vscode-coverage-gutters", | ||
"jjjermiah.pixi-vscode" | ||
] | ||
} | ||
"recommendations": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-python.pylint", | ||
"ms-python.black-formatter", | ||
"njpwerner.autodocstring", | ||
"charliermarsh.ruff", | ||
"mhutchie.git-graph", | ||
"eamodio.gitlens", | ||
"tamasfe.even-better-toml", | ||
"Codium.codium", | ||
"ms-azuretools.vscode-docker", | ||
"ryanluker.vscode-coverage-gutters", | ||
"jjjermiah.pixi-vscode" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -3,5 +3,3 @@ | |
## python_template | ||
|
||
## [0.0.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
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,3 +1,3 @@ | ||
sphinxcontrib-napoleon | ||
sphinx-rtd-theme | ||
sphinx-autoapi | ||
sphinx-autoapi |
Oops, something went wrong.