Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit hooks for jupyter notebooks #54

Merged
merged 4 commits into from
Sep 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 5 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,6 @@ repos:
- id: yamllint # Check YAML Files
args: ["-d", "{extends: relaxed, rules: {line-length: {max: 120 }}}"]
additional_dependencies: ["--index-url=https://pypi.org/simple/"]
- repo: local
hooks: # Not nice
- id: terraform-version
name: Check if terraform v1.0.4 is installed correctly. If this fails, check your version with `terraform --version`
language: system
entry: bash -c "exit $(terraform --version | sed -n 1p | sed 's/Terraform v//;q' | grep -qE '^\s*1.0.4\s*$')"
files: (\.tf|\.tfvars)$ # Only run if there actually are tf files to lint!
exclude: \.terraform\/.*$
pass_filenames: false
require_serial: true
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.60.0
hooks:
- id: terraform_fmt
args:
- "--args=-diff"
- repo: https://github.com/sqlfluff/sqlfluff
rev: 0.4.0 # Oldest version with pre-commit hooks!
hooks:
- id: sqlfluff-lint
args: ["--dialect", "ansi"]
additional_dependencies: ["--index-url=https://pypi.org/simple/"]
- id: sqlfluff-fix
args: ["--dialect", "ansi"]
additional_dependencies: ["--index-url=https://pypi.org/simple/"]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
Expand All @@ -67,3 +42,8 @@ repos:
hooks:
- id: flake8-nb # Lint jupyter notebooks
additional_dependencies: ["--index-url=https://pypi.org/simple/"]
- repo: https://github.com/pzdkn/mirror-nbstripout
rev: 0.6.0
hooks:
- id: nbstripout
additional_dependencies: ["--index-url=https://pypi.org/simple/"]