forked from vllm-project/production-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
pre-commit
based linting and formatting (vllm-project#35)
* Add pre-commit workflow * Add actionlint * Add generic hooks * Add black, isort, shellcheck * Add requirements and markdown linting * Add toml * Add Dockerfile * Add codespell * Use Node.js version of `markdownlint` * Add `requirements-lint.txt` * Use CLI version of Node.js `markdownlint` * Add `pre-commit` instructions to `Contributing` * `pre-commit run -a` automatic fixes * Exclude helm templates from `check-yaml` * Comment hooks that require installed tools * Make `codespell` happy * Make `actionlint` happy * Disable `shellcheck` until it can be installed properly * Make `markdownlint` happy * Add note about running pre-commit --------- Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: 0xThresh.eth <[email protected]>
- Loading branch information
Showing
54 changed files
with
993 additions
and
671 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,3 @@ jobs: | |
- name: Lint open-webui Helm Chart | ||
run: | | ||
helm lint ./helm | ||
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
# Could add Prometheus as a dependent chart here if desired | ||
# Could add Prometheus as a dependent chart here if desired | ||
# - name: Add Dependency Repos | ||
# run: | | ||
# helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | ||
|
@@ -52,6 +52,5 @@ jobs: | |
break | ||
fi | ||
REPO=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]') | ||
helm push "${pkg}" oci://ghcr.io/$REPO | ||
helm push "${pkg}" "oci://ghcr.io/$REPO" | ||
done | ||
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,17 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "actionlint", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
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,17 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: "3.12" | ||
- run: echo "::add-matcher::.github/workflows/matchers/actionlint.json" | ||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 |
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,5 @@ | ||
MD013: false # line-length | ||
MD028: false # no-blanks-blockquote | ||
MD029: # ol-prefix | ||
style: ordered | ||
MD033: false # no-inline-html |
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,45 @@ | ||
repos: | ||
- repo: https://github.com/rhysd/actionlint | ||
rev: v1.7.7 | ||
hooks: | ||
- id: actionlint | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
exclude: ^helm/templates/ | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
# TODO: Enable these hooks when environment issues are resolved | ||
# - repo: https://github.com/hadolint/hadolint | ||
# rev: v2.12.0 | ||
# hooks: | ||
# - id: hadolint | ||
# - repo: https://github.com/gruntwork-io/pre-commit | ||
# rev: v0.1.25 | ||
# hooks: | ||
# - id: helmlint | ||
- repo: https://github.com/psf/black | ||
rev: '25.1.0' | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: '6.0.0' | ||
hooks: | ||
- id: isort | ||
# TODO: Enable this hook when environment issues are resolved | ||
# - repo: https://github.com/koalaman/shellcheck-precommit | ||
# rev: v0.10.0 | ||
# hooks: | ||
# - id: shellcheck | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.44.0 | ||
hooks: | ||
- id: markdownlint | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.4.1 | ||
hooks: | ||
- id: codespell |
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,3 +1,3 @@ | ||
chart-dirs: | ||
- charts | ||
validate-maintainers: false | ||
validate-maintainers: false |
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 |
---|---|---|
|
@@ -39,4 +39,4 @@ rules: | |
type: unix | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning | ||
level: warning |
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 |
---|---|---|
|
@@ -7,4 +7,3 @@ rules: | |
- apiGroups: [""] # "" indicates the core API group | ||
resources: ["pods"] | ||
verbs: ["get", "watch", "list"] | ||
|
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,2 +1,2 @@ | ||
#helm upgrade --install --create-namespace --namespace=ns-vllm test-vllm . -f values-yihua.yaml | ||
#helm upgrade --install --create-namespace --namespace=ns-vllm test-vllm . -f values-yihua.yaml | ||
helm upgrade --install test-vllm . -f values-additional.yaml #--create-namespace --namespace=vllm |
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,4 +1,3 @@ | ||
helm upgrade kube-prom-stack prometheus-community/kube-prometheus-stack \ | ||
--namespace monitoring \ | ||
-f "values.yaml" | ||
|
Oops, something went wrong.