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

OSSF patch #7

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Changes from 1 commit
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
Next Next commit
Bump super-linter/super-linter from 5.7.2 to 6.2.0 in /.github/workfl…
…ows (#197)

* Bump super-linter/super-linter from 5.7.2 to 6.2.0 in /.github/workflows

Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 5.7.2 to 6.2.0.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](super-linter/super-linter@v5.7.2...v6.2.0)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update lint.yaml

* Update lint.yaml

* disable lint checks and fix shell exec

* add shfmt pre-commit hook

* update install list and run shfmt

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Titsworth <tyler.titsworth@intel.com>
dependabot[bot] and Tyler Titsworth authored Feb 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit fe0d89315d843f561868982aaa90b8fdd9ee8199
14 changes: 7 additions & 7 deletions .github/utils/val-args.sh
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@ input_string="$1"

# Use regex to find the line that contains '/test-group' and capture it
if [[ $input_string =~ /test-group(.*) ]]; then
matched_line="${BASH_REMATCH[1]}"
matched_line="${BASH_REMATCH[1]}"
else
# If the pattern is not found, exit
echo "Error: The input string does not contain a line with '/test-group'."
exit 1
# If the pattern is not found, exit
echo "Error: The input string does not contain a line with '/test-group'."
exit 1
fi

# Use regex to extract key-value pairs with the cases:
@@ -21,10 +21,10 @@ key_val_pairs=$(echo "$matched_line" | grep -oP "$regex" | sed 's/: /=/g')

# Check if there is at least one key-value pair
if [[ -z "$key_val_pairs" ]]; then
echo "Error: The matched line does not contain any valid key-value pairs."
exit 1
echo "Error: The matched line does not contain any valid key-value pairs."
exit 1
fi

# Print the key-value pairs
echo "$key_val_pairs"
echo "$key_val_pairs" >> "$GITHUB_OUTPUT"
echo "$key_val_pairs" >>"$GITHUB_OUTPUT"
7 changes: 5 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -18,13 +18,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Super-linter
uses: super-linter/super-linter/slim@v5.7.2
uses: super-linter/super-linter/slim@v6.2.0
env:
DEFAULT_BRANCH: main
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
GITHUB_ACTIONS_COMMAND_ARGS: '-ignore SC.*'
VALIDATE_BASH_EXEC: false
VALIDATE_CHECKOV: false
VALIDATE_KUBERNETES_KUBECONFORM: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_PYTHON_FLAKE8: false
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -27,6 +27,10 @@ repos:
rev: v0.9.0
hooks:
- id: shellcheck
- repo: https://github.com/cisagov/pre-commit-shfmt
rev: v0.0.2
hooks:
- id: shfmt
- repo: https://github.com/ambv/black
rev: 23.12.1
hooks:
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.
2. Create a new branch for your contribution: `git checkout -b feature/your-feature`.
3. Install [pre-commit](https://pre-commit.com/), [Docker](https://docs.docker.com/engine/install/), and [Python 3.8+](https://www.python.org/downloads/).
4. Follow the [Project Setup](README.md#project-setup) steps.
5. Install the third-party python dependencies necessary for pre-commit with `pip install pytest pylint black`.
5. Install the third-party python dependencies necessary for pre-commit with `pip install pytest pylint black shfmt-py`.
6. Make your changes, commit, and sign your changes: `git commit -s -m 'Add your feature'`.
7. Push to the branch: `git push origin feature/your-feature`.
8. Submit a pull request.
1 change: 0 additions & 1 deletion classical-ml/tests/sklearn.sh
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@
# For reference:
# https://docs.docker.com/develop/develop-images/build_enhancements/


wget https://raw.githubusercontent.com/intel/ai-containers/main/preset/classical-ml/tests/scikit/kmeans.py
python kmeans.py true