-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into conda-env-create-yes
- Loading branch information
Showing
11 changed files
with
100 additions
and
45 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ build/ | |
*.csv | ||
*.png | ||
*.pyc | ||
*.pyc |
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,21 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- repo: https://github.com/cpplint/cpplint | ||
rev: 1.6.1 | ||
hooks: | ||
- id: cpplint | ||
args: ["--recursive"] | ||
- repo: https://github.com/rapidsai/pre-commit-hooks | ||
rev: v0.0.3 | ||
hooks: | ||
- id: verify-copyright | ||
args: ["--fix", "--main-branch", "main"] | ||
|
||
default_language_version: | ||
python: python3 |
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,27 +1,20 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
# Copyright (c) 2023-2024, NVIDIA CORPORATION. | ||
|
||
# Ignore errors | ||
set +e | ||
RETVAL="0" | ||
set -euo pipefail | ||
|
||
rapids-logger "Create checks conda environment" | ||
. /opt/conda/etc/profile.d/conda.sh | ||
|
||
# Check for a consistent code format | ||
pip install cpplint | ||
FORMAT=$(cpplint --recursive GPUTreeShap tests example benchmark 2>&1) | ||
FORMAT_RETVAL=$? | ||
if [ "$RETVAL" = "0" ]; then | ||
RETVAL=$FORMAT_RETVAL | ||
fi | ||
ENV_YAML_DIR="$(mktemp -d)" | ||
|
||
# Output results if failure otherwise show pass | ||
if [ "$FORMAT_RETVAL" != "0" ]; then | ||
echo -e "\n\n>>>> FAILED: cpplint format check; begin output\n\n" | ||
echo -e "$FORMAT" | ||
echo -e "\n\n>>>> FAILED: cpplint format check; end output\n\n" | ||
else | ||
echo -e "\n\n>>>> PASSED: cpplint format check\n\n" | ||
fi | ||
rapids-dependency-file-generator \ | ||
--output conda \ | ||
--file_key checks \ | ||
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml" | ||
|
||
exit $RETVAL | ||
rapids-mamba-retry env create --force -f "${ENV_YAML_DIR}/env.yaml" -n checks | ||
conda activate checks | ||
|
||
# Run pre-commit checks | ||
pre-commit run --all-files --show-diff-on-failure |
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