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

Add script to run pylibcudf tests #17882

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
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