-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] decouple registry from base modules, scitype specific data records for documentation of estimator types #6998
Merged
Conversation
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
fkiraly
added
enhancement
Adding new functionality
module:base-framework
BaseObject, registry, base framework
labels
Aug 18, 2024
fkiraly
changed the title
Registry decouple
[ENH] decouple of registry from base modules, scitype specific data records for documentation
Aug 18, 2024
fkiraly
requested review from
achieveordie,
benHeid and
yarnabrina
as code owners
August 18, 2024 19:29
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
fkiraly
changed the title
[ENH] decouple of registry from base modules, scitype specific data records for documentation
[ENH] decouple of registry from base modules, scitype specific data records for documentation of estimator types
Aug 19, 2024
fkiraly
changed the title
[ENH] decouple of registry from base modules, scitype specific data records for documentation of estimator types
[ENH] decouple registry from base modules, scitype specific data records for documentation of estimator types
Aug 19, 2024
benHeid
pushed a commit
to Z-Fran/sktime
that referenced
this pull request
Oct 3, 2024
…rds for documentation of estimator types (sktime#6998) Fixes sktime#6970 by a redesign of the object scitype register that decouples the `registry` module from the rest of `sktime`, by removing all outside imports on module level (except from `sktime.base` and `utils`). As a side effect, this also adds one record class per object type, which can be used as a tagged metadata record and later as a basis or documenting the individual object types in `sktime`. The refactor proceeds as follows: * the base class register is replaced by data record classes similar to the `_tags` module * the imports of base classes are isolated in class methods of those records, `get_base_class`, which returns the base class corresponding to the scitype * exports of objects involving tags, in particular the classes, are replaced by functions that produce the object, further isolating the import to places where it is needed, e.g., `get_base_class_list` To make the changes deprecation safe, imports of coupled objects are intercepted, and replaced by calls on demand, i.e., whenever an external call carries out an import. Further, imports from outside `registry` but inside `sktime` (all from the test framework) are also replaced with the new functions. This lead to some dead functions and objects, which were removed, which further lead to unused imports, which also were removed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6970 by a redesign of the object scitype register that decouples the
registry
module from the rest ofsktime
, by removing all outside imports on module level (except fromsktime.base
andutils
).As a side effect, this also adds one record class per object type, which can be used as a tagged metadata record and later as a basis or documenting the individual object types in
sktime
.The refactor proceeds as follows:
_tags
moduleget_base_class
, which returns the base class corresponding to the scitypeget_base_class_list
To make the changes deprecation safe, imports of coupled objects are intercepted, and replaced by calls on demand, i.e., whenever an external call carries out an import.
Further, imports from outside
registry
but insidesktime
(all from the test framework) are also replaced with the new functions. This lead to some dead functions and objects, which were removed, which further lead to unused imports, which also were removed.