Skip to content

Commit

Permalink
Add script to run pylibcudf tests (#17882)
Browse files Browse the repository at this point in the history
This is a small change adding a script to run pylibcudf tests, like we have for other Python libraries in this repository.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Matthew Murray (https://github.com/Matt711)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #17882
  • Loading branch information
bdice authored Feb 4, 2025
1 parent df5c943 commit 81c383c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
11 changes: 11 additions & 0 deletions ci/run_pylibcudf_pytests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Copyright (c) 2025, NVIDIA CORPORATION.

set -euo pipefail

# It is essential to cd into python/pylibcudf/pylibcudf as `pytest-xdist` + `coverage` seem to work only at this directory level.

# Support invoking run_cudf_pytests.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/pylibcudf/pylibcudf/

pytest --cache-clear --ignore="benchmarks" "$@" tests
1 change: 1 addition & 0 deletions ci/test_python_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
"cudf=${RAPIDS_VERSION}" \
"pylibcudf=${RAPIDS_VERSION}" \
"libcudf=${RAPIDS_VERSION}"
14 changes: 8 additions & 6 deletions ci/test_python_cudf.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, NVIDIA CORPORATION.

# Support invoking test_python_cudf.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../;
Expand All @@ -15,12 +15,14 @@ trap "EXITCODE=1" ERR
set +e

rapids-logger "pytest pylibcudf"
pushd python/pylibcudf/pylibcudf/tests
python -m pytest \
--cache-clear \
./ci/run_pylibcudf_pytests.sh \
--junitxml="${RAPIDS_TESTS_DIR}/junit-pylibcudf.xml" \
--numprocesses=8 \
--dist=worksteal \
.
popd
--cov-config=../.coveragerc \
--cov=pylibcudf \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/pylibcudf-coverage.xml" \
--cov-report=term

rapids-logger "pytest cudf"
./ci/run_cudf_pytests.sh \
Expand Down
3 changes: 3 additions & 0 deletions python/pylibcudf/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Configuration file for Python coverage tests
[run]
source = pylibcudf

0 comments on commit 81c383c

Please sign in to comment.