Skip to content

Commit

Permalink
[ENH] set up exclude list for estimators (#496)
Browse files Browse the repository at this point in the history
This PR sets up an exclude list for estimators in `skpro`.

Similar to `sktime`, excluded tests or estimators can now be specified
in `skpro.tests._config`.

Also adds a skip for #497.
  • Loading branch information
fkiraly authored Nov 17, 2024
1 parent afe5a24 commit 78876d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion skpro/tests/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

# list of str, names of estimators to exclude from testing
# WARNING: tests for these estimators will be skipped
EXCLUDE_ESTIMATORS = ["DummySkipped"]
EXCLUDE_ESTIMATORS = [
"DummySkipped",
"ClassName", # exclude classes from extension templates
]


EXCLUDED_TESTS = {"GLMRegressor": ["test_online_update"]}
8 changes: 7 additions & 1 deletion skpro/tests/test_all_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from skbase.testing.utils.inspect import _get_args

from skpro.registry import OBJECT_TAG_LIST, all_objects
from skpro.tests._config import EXCLUDE_ESTIMATORS, EXCLUDED_TESTS
from skpro.tests.scenarios.scenarios_getter import retrieve_scenarios
from skpro.tests.test_switch import run_test_for_class
from skpro.utils.deep_equals import deep_equals
Expand All @@ -35,7 +36,12 @@ class PackageConfig:

# list of object types (class names) to exclude
# expected type: list of str, str are class names
exclude_objects = ["ClassName"] # exclude classes from extension templates
exclude_objects = EXCLUDE_ESTIMATORS

# list of tests to exclude
# expected type: dict of lists, key:str, value: List[str]
# keys are class names of estimators, values are lists of test names to exclude
excluded_tests = EXCLUDED_TESTS

# list of valid tags
# expected type: list of str, str are tag names
Expand Down

0 comments on commit 78876d6

Please sign in to comment.