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

Refactor sub modules #78

Merged
merged 22 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Move base classes to skbase.base
  • Loading branch information
RNKuhns committed Nov 22, 2022
commit 5a668c55fc203512ba59b325c5a3d773809c473e
19 changes: 16 additions & 3 deletions skbase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
The included functionality makes it easy to re-use scikit-learn and
sktime design principles in your project.
"""
import warnings

from skbase.base import BaseEstimator, BaseObject, _HeterogenousMetaEstimator
from skbase.lookup import all_objects, get_package_metadata

__version__ = "0.2.0"

Expand All @@ -18,6 +22,15 @@
"get_package_metadata",
]

from skbase._base import BaseEstimator, BaseObject
from skbase._lookup import all_objects, get_package_metadata
from skbase._meta import _HeterogenousMetaEstimator
warnings.warn(
" ".join(
[
"Importing from the `skbase` module is deprecated as of version 0.3.0.",
"Ability to import from `skbase` will be removed in version 0.5.0."
"Import BaseObject, BaseEstimator, and _HeterogenousMetaEstimator"
"from skbase.base. Import lookup functionality "
"(all_objects, get_package_metadata) from skbase.lookup.",
]
),
DeprecationWarning,
)
18 changes: 18 additions & 0 deletions skbase/base/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
""":mod:`skbase.base` contains base classes for creating parametric objects.

The included functionality makes it easy to re-use scikit-learn and
sktime design principles in your project.
"""

__author__ = ["mloning", "RNKuhns", "fkiraly"]
__all__ = [
"BaseObject",
"BaseEstimator",
"_HeterogenousMetaEstimator",
]

from skbase.base._base import BaseEstimator, BaseObject
from skbase.base._meta import _HeterogenousMetaEstimator
File renamed without changes.
2 changes: 1 addition & 1 deletion skbase/_meta.py → skbase/base/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from inspect import isclass

from skbase import BaseEstimator
from skbase.base._base import BaseEstimator


class _HeterogenousMetaEstimator(BaseEstimator):
Expand Down