-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update pre-commit, remove vale (#1282)
* Update pre-commit, remove vale * Add conditional * run pre-commit on all files * mdformat fixes * fix broken link * chore: format terraform files * Ignore E402 for jh py configs Co-authored-by: Christopher Ostrouchov <chris.ostrouchov@gmail.com> Co-authored-by: HarshCasper <erbeusgriffincasper@gmail.com>
- Loading branch information
1 parent
dc5218c
commit d0cc266
Showing
181 changed files
with
664 additions
and
1,577 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Run pre-commit | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
if: github.event.pull_request.merged == false | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run pre-commit | ||
run: pre-commit run --all |
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 |
---|---|---|
|
@@ -44,6 +44,3 @@ data* | |
qhub-config.yaml | ||
|
||
.vscode/ | ||
|
||
# Ignore Vale | ||
./vale |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,79 @@ | ||
# 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: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-yaml | ||
exclude: 'qhub/template/(\.github/.*|infrastructure/jupyterhub.yaml|stages/07-kubernetes-services/modules/kubernetes/services/(clearml/chart/templates/.*|prefect/chart/templates/.*))' | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
exclude: '/qhub/template/' | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
exclude: 'qhub/template' | ||
args: [ | ||
"--builtins=c" | ||
] | ||
- repo: https://github.com/hadolint/hadolint.git | ||
rev: v2.3.0 | ||
hooks: | ||
- id: hadolint-docker | ||
entry: hadolint/hadolint:v2.3.0 hadolint | ||
args: [ | ||
"--ignore", "DL3048", | ||
"--ignore", "DL3008", | ||
"--ignore", "DL3013", | ||
"--ignore", "DL3003", | ||
] | ||
- repo: https://github.com/executablebooks/mdformat | ||
rev: 0.7.13 | ||
hooks: | ||
- id: mdformat | ||
files: ^docs/ | ||
name: mdformat | ||
description: "CommonMark compliant Markdown formatter" | ||
entry: mdformat | ||
language: python | ||
# This is to support a use case where pre-commit runs in Python 2. | ||
# Should eventually be removed, at latest when `minimum_pre_commit_version` | ||
# is set to 2.0.0. | ||
language_version: python3 | ||
types: [markdown] | ||
minimum_pre_commit_version: '1.0.0' | ||
additional_dependencies: | ||
- mdformat-tables | ||
# 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: 'qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/(clearml/chart/templates/.*|prefect/chart/templates/.*)' | ||
|
||
- 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 | ||
|
||
# python | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.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/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort | ||
args: ["--profile", "black"] | ||
|
||
# terraform | ||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.71.0 | ||
hooks: | ||
- id: terraform_fmt | ||
args: | ||
- --args=-write=true | ||
|
||
# docker | ||
- repo: https://github.com/hadolint/hadolint.git | ||
rev: v2.10.0 | ||
hooks: | ||
- id: hadolint-docker | ||
entry: hadolint/hadolint:v2.10.0 hadolint | ||
args: [ | ||
"--failure-threshold", "info", # default: info | ||
"--ignore", "DL3048", # style complaint: Invalid Label Key | ||
] | ||
|
||
# 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 |
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 +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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
jupyter-book | ||
jupyter-book |
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
Oops, something went wrong.