Skip to content

Commit

Permalink
Test nx-cugraph package instead of editable install (#4442)
Browse files Browse the repository at this point in the history
We already have the built package, so test that instead of an editable install. This helps avoid having to install the build dependencies for nx-cugraph at test time.

Authors:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Ray Douglass (https://github.com/raydouglass)
  - Rick Ratzel (https://github.com/rlratzel)

URL: #4442
  • Loading branch information
KyleFromNVIDIA authored May 28, 2024
1 parent 2e552df commit 279e66d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ rapids-logger "pytest nx-cugraph"
--cov-report=term

rapids-logger "pytest networkx using nx-cugraph backend"
pushd python/nx-cugraph
# Use editable install to make coverage work
pip install -e . --no-deps
./run_nx_tests.sh
pushd python/nx-cugraph/nx_cugraph
../run_nx_tests.sh
# run_nx_tests.sh outputs coverage data, so check that total coverage is >0.0%
# in case nx-cugraph failed to load but fallback mode allowed the run to pass.
_coverage=$(coverage report|grep "^TOTAL")
Expand All @@ -114,17 +112,17 @@ echo $_coverage | awk '{ if ($NF == "0.0%") exit 1 }'
# Run our tests again (they're fast enough) to add their coverage, then create coverage.json
pytest \
--pyargs nx_cugraph \
--config-file=./pyproject.toml \
--cov-config=./pyproject.toml \
--config-file=../pyproject.toml \
--cov-config=../pyproject.toml \
--cov=nx_cugraph \
--cov-append \
--cov-report=
coverage report \
--include="*/nx_cugraph/algorithms/*" \
--omit=__init__.py \
--show-missing \
--rcfile=./pyproject.toml
coverage json --rcfile=./pyproject.toml
--rcfile=../pyproject.toml
coverage json --rcfile=../pyproject.toml
python -m nx_cugraph.tests.ensure_algos_covered
# Exercise (and show results of) scripts that show implemented networkx algorithms
python -m nx_cugraph.scripts.print_tree --dispatch-name --plc --incomplete --different
Expand Down

0 comments on commit 279e66d

Please sign in to comment.