Skip to content

Commit

Permalink
Enable pytest failures on FutureWarnings/DeprecationWarnings (#5877)
Browse files Browse the repository at this point in the history
The test suite will now fail on FutureWarnings and DeprecationWarnings as apart of rapidsai/build-planning#26.

pytest.ini was consolidated into pyproject.toml so there's only 1 place with these configs.

There are some `TODO`s including scikit-learn warnings, but I hope it's OK to potentially pass the baton to @betatim :)

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #5877
  • Loading branch information
mroeschke authored May 1, 2024
1 parent 89d5371 commit 48d9f3b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
33 changes: 31 additions & 2 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,42 @@ markers = [
"no_bad_cuml_array_check: Test that should not check for bad CumlArray uses",
]

testpaths = "cuml/tests"
testpaths = [
"cuml/tests",
"cuml/tests/dask",
"cuml/tests/experimental",
"cuml/tests/explainer",
"cuml/tests/stemmer_tests",
]

filterwarnings = [
"error::FutureWarning:cuml[.*]", # Catch uses of deprecated positional args in testing
"error::FutureWarning",
"error::DeprecationWarning",
"error:::cudf",
"ignore:[^.]*ABCs[^.]*:DeprecationWarning:patsy[.*]",
"ignore:(.*)alias(.*):DeprecationWarning:hdbscan[.*]",
# TODO: https://github.com/rapidsai/cuml/issues/5878
"ignore:.*ndarray.scatter_[(max|add)].* is deprecated:DeprecationWarning:cupyx",
# TODO: https://github.com/rapidsai/cuml/issues/5879
"ignore::FutureWarning:sklearn",
"ignore::DeprecationWarning:sklearn",
# https://github.com/pytest-dev/pytest-cov/issues/557
"ignore:The --rsyncdir command line argument:DeprecationWarning",
# https://github.com/scikit-learn/scikit-learn/pull/25157
"ignore:.* is deprecated. Use files:DeprecationWarning",
# https://github.com/scikit-learn/scikit-learn/pull/25741
"ignore:`product` is deprecated as of NumPy 1.25.0:DeprecationWarning",
# https://github.com/scikit-learn-contrib/hdbscan/pull/612
"ignore:`alltrue` is deprecated as of NumPy 1.25.0:DeprecationWarning",
# https://github.com/scikit-learn/scikit-learn/pull/26287
"ignore:is_sparse is deprecated and will be removed:DeprecationWarning",
# From dask-glm
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning",
"ignore:`rcond` parameter will change to the default:FutureWarning",
"ignore:Dask configuration key 'fuse_ave_width':FutureWarning",
# From hdbscan
"ignore:Conversion of an array with ndim > 0:DeprecationWarning",
]

[project]
Expand Down
20 changes: 0 additions & 20 deletions python/pytest.ini

This file was deleted.

0 comments on commit 48d9f3b

Please sign in to comment.