Skip to content

Commit

Permalink
Run tests for coverage from nx_cugraph/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknw committed Nov 8, 2024
1 parent 9b7702b commit db36702
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ repos:
types_or: [python, markdown]
language: python
pass_filenames: false
additional_dependencies: ["networkx>=3.3"]
additional_dependencies: ["networkx>=3.4"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down
10 changes: 6 additions & 4 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ rapids-logger "pytest nx-cugraph"

rapids-logger "pytest networkx using nx-cugraph backend"

pushd nx_cugraph
../run_nx_tests.sh

# run_nx_tests.sh outputs coverage data, so check that total coverage is >0.0%
Expand All @@ -77,8 +78,8 @@ 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
NX_CUGRAPH_USE_COMPAT_GRAPHS=False 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=
Expand All @@ -87,15 +88,16 @@ coverage report \
--include="*/nx_cugraph/algorithms/*" \
--omit=__init__.py \
--show-missing \
--rcfile=./pyproject.toml
--rcfile=../pyproject.toml

coverage json --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
python -m nx_cugraph.scripts.print_table
popd

rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}

0 comments on commit db36702

Please sign in to comment.