Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[DOC] automated generation of estimators table #354
Comments
|
I think an ideal solution would be to integrate this into the sphinx-generated API reference on our website, so that all documentation is in one place: literature references, author/maintainer details and docstrings. |
|
But sphinx does not generate a "single table" overview like in estimators.md. Or at least, I would not see how your solution of (ab-)using sphinx would do this, @mloning? Further, the taxonomy that sphinx applies is that of code hierarchy, not a semantic hierarchy (TSC, forecasting, transformer types etc) which is more useful to the user? Though if it were true that this works somehow, i.e., you could use sphinx to generate multiple pieces of overview documentation, e.g., tables according to different tags and hierarchies, that would be the optimal solution ... probably? |
|
Our code hierarchy is already aligned with a user-oriented semantic hierarchy for most parts, and we should work towards improving that further in the future with new additions to sktime (more comprehensive typing of transformers, etc). My suggestion is to create an API reference similar to the scikit-learn's API reference, but with a third column for author/maintainer. |
Agreed.
Three-quarters-agreed - I wouldn´t want utility functions in there, but I would like a 4th column with literature refs. But mainly agreed. I just don´t know how to generate such a page automatically... |
Checked scikit-learn. It looks like their API reference is not generated automatically, but manually (see this issue as an example). One package that might provide a solution is pdoc. It generates a set of html files based off the docstrings in the code. It is configurable and should be able to make use of the author variable in each file. I installed it and had it generate html files for the package. Here are some screenshots of what it looks like. It would take some work to configure it properly and combine the html files into a single API reference, but easier than starting from scratch. I looked at some other packages, but I don't know if any exactly generate the API Reference page. |
|
@lynnssi, thanks for looking into this! We already have an API reference here which is great, though we (or at leasts I) don´t know how you could get multiple columns - e.g., to add maintainer or paper link. A more complex variant of the problem would be automated generation of different tables based on tags from the docstrings (e.g., an estimators table with a hierarchy that has depth 2). |





Describe the issue linked to the documentation
Following an idea by @lynssi, we could think about generating the estimators.md automatically following some parsing convention and automated document compilation.
This would be extremely useful i.m.o., as such an auto-generated table would automatically give a look-up of any papers/documents describing algorithms, perhaps tutorials too, and who is currently the maintainer.
It would also be important since the current version is not too well-curated, since it requires much manual intervention.
Suggest a potential alternative/fix
I´m not sure how this would practically work though.
It would require an html or md page to be generated, based on pre-defined tags and hierarchies.