diff --git a/ci/test_external.sh b/ci/test_external.sh index 613b7d1f..ce8b42b6 100755 --- a/ci/test_external.sh +++ b/ci/test_external.sh @@ -7,9 +7,19 @@ rapids-logger "Create test_external conda environment" . /opt/conda/etc/profile.d/conda.sh # Install external dependencies into test_external conda environment -rapids-conda-retry env update -f ./ci/utils/external_dependencies.yaml +rapids-dependency-file-generator \ + --output conda \ + --file-key test_external \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml +rapids-mamba-retry env create --yes -f env.yaml -n test_external + +# Temporarily allow unbound variables for conda activation. +set +u conda activate test_external +set -u + +rapids-print-env # Define input parameter PROJECT=$1 @@ -19,6 +29,11 @@ LIBRARIES=("datashader" "holoviews") # Change directory to /tmp pushd /tmp + +EXITCODE=0 +trap "EXITCODE=1" ERR +set +e + # Clone the specified Python libraries if [ "$PROJECT" = "all" ]; then # Loop through each library and install dependencies @@ -33,7 +48,11 @@ if [ "$PROJECT" = "all" ]; then # Change directory to the library pushd $LIBRARY # Run setup.py with test dependencies - python -m pip install -e .[tests] + python -m pip install .[tests] + + rapids-logger "Run GPU tests for $LIBRARY" + + python -m pytest $LIBRARY/tests/ --numprocesses=8 --dist=worksteal --gpu popd done @@ -53,42 +72,14 @@ else # Change directory to the specified project pushd $PROJECT # Run setup.py with test dependencies - python -m pip install -e .[tests] - popd -fi + python -m pip install .[tests] -FILES="" -# Install and run tests -if [ "$PROJECT" = "all" ]; then - # Loop through each library and install dependencies - for LIBRARY in "${LIBRARIES[@]}" - do - rapids-logger "gathering GPU tests for $LIBRARY" - TEST_DIR="$LIBRARY/$LIBRARY/tests" - # Find all Python scripts containing the keywords cudf or dask_cudf except test_quadmesh.py - FILES+=" $(grep -l -R -e 'cudf' --include='*.py' "$TEST_DIR" | grep -v test_quadmesh.py)" - done -else - rapids-logger "gathering GPU tests for $PROJECT" - TEST_DIR="$PROJECT/$PROJECT/tests" - # Find all Python scripts containing the keywords cudf or dask_cudf - FILES+=$(grep -l -R -e 'cudf' --include='*.py' "$TEST_DIR") -fi -EXITCODE=0 -trap "EXITCODE=1" ERR -set +e + rapids-logger "Run GPU tests for $LIBRARY" -rapids-logger "running all gathered tests" -DATASHADER_TEST_GPU=1 pytest \ - --numprocesses=8 \ - --dist=worksteal \ - $FILES + python -m pytest $LIBRARY/tests/ --numprocesses=8 --dist=worksteal --gpu -if [[ "$PROJECT" = "all" ]] || [[ "$PROJECT" = "datashader" ]]; then - # run test_quadmesh.py separately as dask.array tests fail with numprocesses - rapids-logger "running test_quadmesh.py" - DATASHADER_TEST_GPU=1 pytest datashader/datashader/tests/test_quadmesh.py + popd fi rapids-logger "Test script exiting with value: $EXITCODE" diff --git a/ci/utils/external_dependencies.yaml b/ci/utils/external_dependencies.yaml deleted file mode 100644 index 518c0a96..00000000 --- a/ci/utils/external_dependencies.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: test_external -channels: - - rapidsai-nightly - - conda-forge - - nvidia -dependencies: - - cudf==24.10.*,>=0.0.0a0 - - dask-cudf==24.10.*,>=0.0.0a0 - - cuxfilter==24.10.*,>=0.0.0a0 - - cuda-version=12.0 - - python>=3.9,<3.12 - - xarray-spatial - - pycaret - - graphistry - - dash - - dask-sql - - pytest-benchmark diff --git a/dependencies.yaml b/dependencies.yaml index faaacb67..ae83599d 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -70,6 +70,10 @@ files: key: test includes: - test_python + test_external: + output: none + includes: + - test_external channels: - rapidsai - rapidsai-nightly @@ -257,3 +261,21 @@ dependencies: - output_types: conda packages: - panel>=1.0,<=1.3.4 + test_external: + common: + - output_types: [conda] + packages: + - coverage + - *cudf_unsuffixed + - cupy>=12.0.0 + - *cuspatial_unsuffixed + - *dask_cudf_unsuffixed + - cuxfilter==24.10.*,>=0.0.0a0 + - python>=3.9,<3.12 + - xarray-spatial + - pycaret + - graphistry + - dash + - dask-sql + - pytest-benchmark + - pytest-xdist diff --git a/python/cuxfilter/charts/core/non_aggregate/core_graph.py b/python/cuxfilter/charts/core/non_aggregate/core_graph.py index 13d30a14..ab9b4101 100644 --- a/python/cuxfilter/charts/core/non_aggregate/core_graph.py +++ b/python/cuxfilter/charts/core/non_aggregate/core_graph.py @@ -50,14 +50,14 @@ def edge_columns(self): @property def node_columns(self): - if self.node_aggregate_col: - return [ - self.node_id, - self.node_x, - self.node_y, - self.node_aggregate_col, - ] - return [self.node_id, self.node_x, self.node_y] + cols = [ + self.node_id, + self.node_x, + self.node_y, + ] + if self.node_aggregate_col != self.node_id: + cols.append(self.node_aggregate_col) + return cols def __init__( self,