-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable pre-commit for formatting and linting (#267)
* Enable pre-commit (lint, format, line endings, and remove trailing whitespace) and apply to code * Remove comments from lint tests * Update workflow and remove formatting * Remove auto-formatter.sh as no longer needed * Add action to run precommit on pushes * Insert change that should be fixed by precommit * link precommit and CI workflows * Fix inserted issue to run CI * Remove concurrency to see if CI is triggered * try to merge workflows as ci isnt triggering * Insert change that should be fixed by precommit * Update CI * fix trigger * fix precommit trigger * fix precommit permissions * Fix update trigger * Fix inserted issue * Clean workflow scripts * Insert whitespace to verify CI * [pre-commit.ci lite] apply automatic fixes * Update error message if precommit fails * Covert all code to Google coding style * Update push config in workflow * clear cache command * Remove comments in update CI and add reference to Developer Guide to point to pre-commit instructions * Remove check push failure workflow * Update commit cmd. * fix permission * Update commit cmd. * Remove token from update workflow * Automated coverage update --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
195b3c6
commit cf1f51d
Showing
122 changed files
with
736 additions
and
792 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
./build/* | ||
./src/pmgd/* |
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 @@ | ||
# Contributing to VDMS | ||
Thank you for even being interested in contributing to VDMS. | ||
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether they involve new features, improved infrastructure, better documentation, or bug fixes. | ||
|
||
To learn how to contribute to VDMS, please follow the [Developer Guide](https://github.com/IntelLabs/vdms/wiki/Developer-Guide). |
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,6 +1,6 @@ | ||
Name Stmts Miss Cover Missing | ||
-------------------------------------------------------------------- | ||
/vdms/client/python/vdms/__init__.py 2 0 100% | ||
/vdms/client/python/vdms/vdms.py 99 2 98% 152, 167 | ||
/vdms/client/python/vdms/vdms.py 95 2 98% 148, 163 | ||
-------------------------------------------------------------------- | ||
TOTAL 101 2 98% | ||
TOTAL 97 2 98% |
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 @@ | ||
98.02 | ||
97.94 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Pre-commit | ||
|
||
on: | ||
workflow_call: | ||
|
||
|
||
permissions: {} | ||
|
||
jobs: | ||
Pre-Commit: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7 | ||
with: | ||
submodules: false | ||
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | ||
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0 | ||
if: always() | ||
- if: failure() | ||
run: | | ||
echo 'Pre-commit failed. CI will restart or please fix requested issues.' | ||
pre-commit clean | ||
exit 1 | ||
- run: pre-commit clean | ||
|
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 |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
path = src/pmgd | ||
url = https://github.com/omp87/pmgd.git | ||
branch = develop | ||
|
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,32 @@ | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.9.6 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ | ||
"--fix", | ||
"--ignore=E402", | ||
"--extend-exclude=client/python/vdms/queryMessage_pb2.py" | ||
] | ||
# Run the formatter. | ||
- id: ruff-format | ||
args: [ | ||
"--exclude=client/python/vdms/queryMessage_pb2.py" | ||
] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: mixed-line-ending | ||
args: ["--fix=auto"] | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v19.1.7 | ||
hooks: | ||
- id: clang-format | ||
types: [c, c++] | ||
args: [ | ||
"--style=Google", | ||
"-i" | ||
] |
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.