You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Way to explicitly shorten identifier in a docstring #782
In a docstring for earhinov_utils.kedro.datasets.gsheets.GoogleSheetsDataset, I would like to mention earshinov_utils.kedro.datasets.pandas.PandasWrapperDataset, and:
I would like the latter to be turned into a hyperlink
I would like the text of the hyperlink to be PandasWrapperDataset instead of earshinov_utils.kedro.datasets.pandas.PandasWrapperDataset, as
I assume that by this moment the user is already familiar with PandasWrapperDataset
even if they are not, they can follow the hyperlink
There seems to be no way to achieve this currently with pdoc. A couple of things that I tried:
PandasWrapperDataset (in backticks, which I cannot use here) is naturally not hyperlinked
[PandasWrapperDataset](earshinov_utils.kedro.datasets.pandas.PandasWrapperDataset) results in a broken markup (even without backticks)
[PandasWrapperDataset][earshinov_py_utils.kedro.datasets.pandas.PandasWrapperDataset] is not recognized
Proposal
I assume, mkdocs, or rather mkdocstrings, or maybe the underlying Griffe, do recognize this syntax:
With pdoc being the best API doc generator for Python, it would be nice if it had this feature as well :)
I would also appreciate if the first bracket supported arbitrary syntax, particularly backticks.
Alternatives
Keep using the full identifier (earshinov_py_utils.kedro.datasets.pandas.PandasWrapperDataset), which makes the rendered documentation harder to read and less visually appealing due to messy line breaks.
Additional context
Thank you for a wonderful tool. Discovered it just this week, and enjoyed the fact that it works out of the box
Activity
mhils commentedon Mar 13, 2025
Happy to accept a PR that makes
[PandasWrapperDataset][earshinov_py_utils.kedro.datasets.pandas.PandasWrapperDataset]work!