Skip to content

Commit

Permalink
Merge branch 'py313-full' of https://github.com/sktime/skbase into py…
Browse files Browse the repository at this point in the history
…313-full
  • Loading branch information
fkiraly committed Oct 7, 2024
2 parents a1bfe55 + c62efd8 commit 658085b
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 79 deletions.
8 changes: 2 additions & 6 deletions skbase/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
from typing import List

from skbase.base._base import BaseEstimator, BaseObject
from skbase.base._meta import (
BaseMetaEstimator,
BaseMetaEstimatorMixin,
BaseMetaObject,
BaseMetaObjectMixin,
)
from skbase.base._meta import (BaseMetaEstimator, BaseMetaEstimatorMixin,
BaseMetaObject, BaseMetaObjectMixin)

__author__: List[str] = ["mloning", "RNKuhns", "fkiraly"]
__all__: List[str] = [
Expand Down
3 changes: 2 additions & 1 deletion skbase/base/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,8 @@ def __repr__(self, n_char_max: int = 700):
Maximum (approximate) number of non-blank characters to render. This
can be useful in testing.
"""
from skbase.base._pretty_printing._pprint import _BaseObjectPrettyPrinter
from skbase.base._pretty_printing._pprint import \
_BaseObjectPrettyPrinter

n_max_elements_to_show = 30 # number of elements to show in sequences
# use ellipsis for sequences with a lot of elements
Expand Down
1 change: 0 additions & 1 deletion skbase/base/_pretty_printing/_pprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from collections import OrderedDict

from skbase.base import BaseObject

# from skbase.config import get_config
from skbase.utils._check import _is_scalar_nan

Expand Down
3 changes: 2 additions & 1 deletion skbase/lookup/_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
from functools import lru_cache
from operator import itemgetter
from types import ModuleType
from typing import Any, List, Mapping, MutableMapping, Optional, Sequence, Tuple, Union
from typing import (Any, List, Mapping, MutableMapping, Optional, Sequence,
Tuple, Union)

from skbase.base import BaseObject
from skbase.utils.stdout_mute import StdoutMute
Expand Down
40 changes: 14 additions & 26 deletions skbase/lookup/tests/test_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,20 @@
from skbase.base import BaseEstimator, BaseObject
from skbase.base._base import TagAliaserMixin
from skbase.lookup import all_objects, get_package_metadata
from skbase.lookup._lookup import (
_determine_module_path,
_filter_by_class,
_filter_by_tags,
_get_return_tags,
_import_module,
_is_ignored_module,
_is_non_public_module,
_walk,
)
from skbase.tests.conftest import (
SKBASE_BASE_CLASSES,
SKBASE_CLASSES_BY_MODULE,
SKBASE_FUNCTIONS_BY_MODULE,
SKBASE_MODULES,
SKBASE_PUBLIC_CLASSES_BY_MODULE,
SKBASE_PUBLIC_FUNCTIONS_BY_MODULE,
SKBASE_PUBLIC_MODULES,
ClassWithABTrue,
Parent,
)
from skbase.tests.mock_package.test_mock_package import (
MOCK_PACKAGE_OBJECTS,
CompositionDummy,
NotABaseObject,
)
from skbase.lookup._lookup import (_determine_module_path, _filter_by_class,
_filter_by_tags, _get_return_tags,
_import_module, _is_ignored_module,
_is_non_public_module, _walk)
from skbase.tests.conftest import (SKBASE_BASE_CLASSES,
SKBASE_CLASSES_BY_MODULE,
SKBASE_FUNCTIONS_BY_MODULE, SKBASE_MODULES,
SKBASE_PUBLIC_CLASSES_BY_MODULE,
SKBASE_PUBLIC_FUNCTIONS_BY_MODULE,
SKBASE_PUBLIC_MODULES, ClassWithABTrue,
Parent)
from skbase.tests.mock_package.test_mock_package import (MOCK_PACKAGE_OBJECTS,
CompositionDummy,
NotABaseObject)

__author__: List[str] = ["RNKuhns", "fkiraly"]
__all__: List[str] = []
Expand Down
7 changes: 2 additions & 5 deletions skbase/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
""":mod:`skbase.testing` provides a framework to test ``BaseObject``-s."""
from typing import List

from skbase.testing.test_all_objects import (
BaseFixtureGenerator,
QuickTester,
TestAllObjects,
)
from skbase.testing.test_all_objects import (BaseFixtureGenerator, QuickTester,
TestAllObjects)

__all__: List[str] = ["BaseFixtureGenerator", "QuickTester", "TestAllObjects"]
__author__: List[str] = ["fkiraly"]
5 changes: 2 additions & 3 deletions skbase/testing/test_all_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

from skbase.base import BaseObject
from skbase.lookup import all_objects
from skbase.testing.utils._conditional_fixtures import (
create_conditional_fixtures_and_names,
)
from skbase.testing.utils._conditional_fixtures import \
create_conditional_fixtures_and_names
from skbase.testing.utils.inspect import _get_args
from skbase.utils.deep_equals import deep_equals
from skbase.utils.dependencies import _check_soft_dependencies
Expand Down
8 changes: 2 additions & 6 deletions skbase/tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@

from skbase._exceptions import NotFittedError
from skbase.base import BaseEstimator, BaseObject
from skbase.base._meta import (
BaseMetaEstimator,
BaseMetaObject,
_MetaObjectMixin,
_MetaTagLogicMixin,
)
from skbase.base._meta import (BaseMetaEstimator, BaseMetaObject,
_MetaObjectMixin, _MetaTagLogicMixin)


class MetaObjectTester(BaseMetaObject):
Expand Down
7 changes: 2 additions & 5 deletions skbase/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
from skbase.utils._nested_iter import flatten, is_flat, unflat_len, unflatten
from skbase.utils._utils import subset_dict_keys
from skbase.utils.deep_equals import deep_equals
from skbase.utils.random_state import (
check_random_state,
sample_dependent_seed,
set_random_state,
)
from skbase.utils.random_state import (check_random_state,
sample_dependent_seed, set_random_state)

__author__: List[str] = ["RNKuhns", "fkiraly"]
__all__: List[str] = [
Expand Down
3 changes: 2 additions & 1 deletion skbase/utils/_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import re
from collections.abc import Sequence

from skbase.utils._nested_iter import _remove_single, flatten, is_flat, unflatten
from skbase.utils._nested_iter import (_remove_single, flatten, is_flat,
unflatten)

__author__ = ["fkiraly", "RNKuhns"]
__all__ = [
Expand Down
8 changes: 3 additions & 5 deletions skbase/utils/dependencies/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
"""Utility functionality used through `skbase`."""

from skbase.utils.dependencies._dependencies import (
_check_estimator_deps,
_check_python_version,
_check_soft_dependencies,
)
from skbase.utils.dependencies._dependencies import (_check_estimator_deps,
_check_python_version,
_check_soft_dependencies)

__all__ = [
"_check_python_version",
Expand Down
3 changes: 2 additions & 1 deletion skbase/utils/tests/test_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
import pytest

from skbase.base import BaseEstimator, BaseObject
from skbase.utils._iter import _format_seq_to_str, _scalar_to_seq, make_strings_unique
from skbase.utils._iter import (_format_seq_to_str, _scalar_to_seq,
make_strings_unique)

__author__ = ["RNKuhns"]

Expand Down
9 changes: 2 additions & 7 deletions skbase/utils/tests/test_nested_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@
# import pytest

from skbase.base import BaseEstimator, BaseObject
from skbase.utils._nested_iter import (
_remove_single,
flatten,
is_flat,
unflat_len,
unflatten,
)
from skbase.utils._nested_iter import (_remove_single, flatten, is_flat,
unflat_len, unflatten)

__author__ = ["RNKuhns"]

Expand Down
8 changes: 3 additions & 5 deletions skbase/validate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
"""Tools for validating and comparing BaseObjects and collections of BaseObjects."""
from typing import List

from skbase.validate._named_objects import (
check_sequence_named_objects,
is_named_object_tuple,
is_sequence_named_objects,
)
from skbase.validate._named_objects import (check_sequence_named_objects,
is_named_object_tuple,
is_sequence_named_objects)
from skbase.validate._types import check_sequence, check_type, is_sequence

__author__: List[str] = ["RNKuhns", "fkiraly"]
Expand Down
3 changes: 2 additions & 1 deletion skbase/validate/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import inspect
from typing import Any, List, Optional, Sequence, Tuple, Union

from skbase.utils._iter import _format_seq_to_str, _remove_type_text, _scalar_to_seq
from skbase.utils._iter import (_format_seq_to_str, _remove_type_text,
_scalar_to_seq)

__author__: List[str] = ["RNKuhns", "fkiraly"]
__all__: List[str] = ["check_sequence", "check_type", "is_sequence"]
Expand Down
7 changes: 2 additions & 5 deletions skbase/validate/tests/test_iterable_named_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
import pytest

from skbase.base import BaseEstimator, BaseObject
from skbase.validate import (
check_sequence_named_objects,
is_named_object_tuple,
is_sequence_named_objects,
)
from skbase.validate import (check_sequence_named_objects,
is_named_object_tuple, is_sequence_named_objects)


@pytest.fixture
Expand Down

0 comments on commit 658085b

Please sign in to comment.