diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 46ea985d..5e62ef25 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -16,12 +16,21 @@ jobs: - test-conda-nightly-env secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-25.04 + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - uses: pre-commit/action@v3.0.1 build: + needs: checks secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04 with: build_type: pull-request test-conda-nightly-env: + needs: checks secrets: inherit # We use a build workflow so that we get CPU jobs and high matrix coverage uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..833cc091 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +--- +# Copyright (c) 2025, NVIDIA CORPORATION. + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: check-added-large-files + - id: end-of-file-fixer + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.9.3 + hooks: + - id: ruff + args: ["--fix"] + - id: ruff-format + - repo: https://github.com/rapidsai/pre-commit-hooks + rev: v0.5.0 + hooks: + - id: verify-copyright diff --git a/ci/check_conda_nightly_env.py b/ci/check_conda_nightly_env.py index 32bf4fae..1d573f48 100644 --- a/ci/check_conda_nightly_env.py +++ b/ci/check_conda_nightly_env.py @@ -1,6 +1,6 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION. import json import re -import subprocess import sys from datetime import datetime, timedelta @@ -18,8 +18,6 @@ "libxgboost", "py-xgboost", "xgboost", - # TODO: Do we want ucx-proc on rapidsai or from conda-forge? - "ucx-proc", } # ANSI color codes used to highlight lines @@ -139,7 +137,7 @@ def check_env(json_path): if __name__ == "__main__": if len(sys.argv) != 2: - print("Provide only one argument, the filepath to a JSON output from " "conda.") + print("Provide only one argument, the filepath to a JSON output from conda.") sys.exit(1) sys.exit(check_env(sys.argv[1]))