Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] set up exclude list for estimators #496

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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