-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] refactor
datatypes
mtypes - example fixtures (#458)
This PR refactors the data type specifications and converters to classes. Related: sktime/sktime#3512, related to sktime/sktime#2957. Contains: * a base class for datatype examples, `BaseExample`, to replace the more ad-hoc dictionary design * a complete refactor of the `Table` and `Proba` mtype submodules to this interface * a full refactor of the public framework module with `get_example` logic, in `datatypes`, to allow extensibility with this design Partial mirror in `skpro` of sktime/sktime#6033
- Loading branch information
Showing
7 changed files
with
345 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"""Base module for datatypes.""" | ||
|
||
from skpro.datatypes._base._base import BaseConverter, BaseDatatype | ||
from skpro.datatypes._base._base import BaseConverter, BaseDatatype, BaseExample | ||
|
||
__all__ = ["BaseConverter", "BaseDatatype"] | ||
__all__ = ["BaseConverter", "BaseDatatype", "BaseExample"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
"""Module exports: Series type checkers, converters and mtype inference.""" | ||
|
||
from skpro.datatypes._table._convert import convert_dict as convert_dict_Table | ||
from skpro.datatypes._table._examples import example_dict as example_dict_Table | ||
from skpro.datatypes._table._examples import ( | ||
example_dict_lossy as example_dict_lossy_Table, | ||
) | ||
from skpro.datatypes._table._examples import ( | ||
example_dict_metadata as example_dict_metadata_Table, | ||
) | ||
from skpro.datatypes._table._registry import MTYPE_LIST_TABLE, MTYPE_REGISTER_TABLE | ||
|
||
__all__ = [ | ||
"convert_dict_Table", | ||
"MTYPE_LIST_TABLE", | ||
"MTYPE_REGISTER_TABLE", | ||
"example_dict_Table", | ||
"example_dict_lossy_Table", | ||
"example_dict_metadata_Table", | ||
] |
Oops, something went wrong.