[ENH] refactoring html representation documentation link to allow custom linking in private and public extensions to sktime
#6,911 创建于 2024年8月7日
仓库指标
- Star
- (7,162 star)
- PR 合并指标
- (平均合并 26天 10小时) (30 天内合并 86 个 PR)
描述
in https://github.com/sktime/sktime/pull/6876, @mateuszkasprowicz has added functionality (similar to sklearn) in the html repr of estimator objects to link to the documentation.
This covers sktime native estimators, but the link will point to a non-existent location for 2nd/3rd party packages (public packages using the sktime interface), as well as private packages.
I think we should give power users and extenders an option to specify the location the documentation link points to, I would approach the design in two levels here:
- a tag, e.g.,
doc_loc, that is a str with an URL. This would be placed in the "simple" extension templates. - the option to override
_get_doc_link, as an intentional part of the extension template. This should only be used if there are many estimators in the same package, e.g., following a documentation pattern.- The advanced (and not the simple) extension templates, and/or the documentation of the
doc_loctag could explain this override pattern. - There should be a default
_get_doc_link, and it would just get the location from thedoc_loctag.
- The advanced (and not the simple) extension templates, and/or the documentation of the
Finally, once the get_doc_link override point is established, we want to do the following refactor:
- move the mixin up to
scikit-base - change the
sktimemixin to be just an override of theget_doc_linkmethod or similar.
FYI @mateuszkasprowicz as the author; FYI @felipeangelimvieira, @tveten as the two most likely individuals known to me who may like to link to separate documentation online.