-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT - Miscellaneous maintenance tasks (#1580)
- Loading branch information
Showing
50 changed files
with
1,546 additions
and
1,093 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,69 +1,87 @@ | ||
# pre-commit is a tool to perform a predefined set of tasks manually and/or | ||
# automatically before git commits are made. | ||
# | ||
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level | ||
# | ||
# Common tasks | ||
# | ||
# - Register git hooks: pre-commit install --install-hooks | ||
# - Run on all files: pre-commit run --all-files | ||
# | ||
# These pre-commit hooks are run as CI. | ||
|
||
# | ||
# NOTE: if it can be avoided, add configs/args in pyproject.toml, setup.cfg or below instead of creating a new `.config.file`. | ||
|
||
|
||
repos: | ||
# general | ||
- repo: /~https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-json | ||
- id: check-yaml | ||
# jinja2 templates for helm charts | ||
exclude: 'nebari/template/stages/07-kubernetes-services/modules/kubernetes/services/(clearml/chart/templates/.*|prefect/chart/templates/.*)' | ||
args: [--allow-multiple-documents] | ||
# general | ||
- repo: /~https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-json | ||
- id: check-yaml | ||
# jinja2 templates for helm charts | ||
exclude: "nebari/template/stages/07-kubernetes-services/modules/kubernetes/services/(clearml/chart/templates/.*|prefect/chart/templates/.*)" | ||
args: [--allow-multiple-documents] | ||
- id: check-toml | ||
# Lint: Checks that non-binary executables have a proper shebang. | ||
- id: check-executables-have-shebangs | ||
exclude: "^nebari/template/" | ||
|
||
- repo: /~https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
# --write (-w) enabled here | ||
# see setup.cfg for more config options | ||
entry: codespell -w | ||
language: python | ||
- repo: /~https://github.com/codespell-project/codespell | ||
rev: v2.2.2 | ||
hooks: | ||
- id: codespell | ||
# --write (-w) enabled here | ||
# see setup.cfg for more config options | ||
entry: codespell -w | ||
language: python | ||
|
||
# python | ||
- repo: /~https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
# python | ||
- repo: /~https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: /~https://github.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
args: [ | ||
"--builtins=c" | ||
] | ||
- repo: /~https://github.com/pycqa/flake8 | ||
rev: 5.0.4 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
[ | ||
"--builtins=c", | ||
"--ignore=E203,E266,E501,W503", | ||
"--exclude=[.git,__pycache__,docs/source/conf.py,nebari/template,build,dist,docs,home]", | ||
] | ||
|
||
- repo: /~https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort | ||
args: ["--profile", "black"] | ||
- repo: /~https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort | ||
additional_dependencies: [toml] | ||
files: \.py$ | ||
args: ["--profile", "black"] | ||
|
||
# terraform | ||
- repo: /~https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.71.0 | ||
hooks: | ||
- id: terraform_fmt | ||
args: | ||
- --args=-write=true | ||
# terraform | ||
- repo: /~https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.76.0 | ||
hooks: | ||
- id: terraform_fmt | ||
args: | ||
- --args=-write=true | ||
|
||
# markdown | ||
- repo: /~https://github.com/executablebooks/mdformat | ||
rev: 0.7.14 | ||
hooks: | ||
- id: mdformat | ||
files: ^docs/ | ||
name: mdformat | ||
entry: mdformat --wrap=180 --number --end-of-line=lf | ||
language: python | ||
types: [markdown] | ||
minimum_pre_commit_version: '2.0.0' | ||
additional_dependencies: | ||
- mdformat-tables | ||
# markdown | ||
- repo: /~https://github.com/executablebooks/mdformat | ||
rev: 0.7.16 | ||
hooks: | ||
- id: mdformat | ||
files: ^docs/ | ||
name: mdformat | ||
entry: mdformat --wrap=120 --number --end-of-line=lf | ||
language: python | ||
types: [markdown] | ||
minimum_pre_commit_version: "2.0.0" | ||
additional_dependencies: | ||
- mdformat-tables |
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
Oops, something went wrong.