-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Docs now built with sphinx directly and API reference refactored #810
Conversation
Thanks for the review @droumis ! It's still not quite clear to me what's the best structure for the API reference of Param, it's a good experiment anyway and give us some insights on how we'll structure Panel's one. Unfortunately I won't have time to complete this PR now so feel free to take it over if you have some bandwidth and interest in getting it in Param 2.0. Otherwise it can sit there as it's definitely not a blocker for the release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR is a big improvement on what we had before so I'm going ahead and merging it. We also discussed this in our docs sync the other day and decided that manually curating overview pages is going to be the only sensible way forward but that we would likely try to add some automation to automate the process of listing all objects of a single type, e.g. for listing all Parameter subclasses, and for listing all methods/attributes of a specific class, e.g. for the Parameters namespace.
ok, I'm experimenting with ways to avoid the redirect and have a better tiered left nav, but I can finish later in another PR |
Or, if you can wait until tomorrow to merge, I have some time later today |
Sounds great, I'll wait. |
I figured out how we can have the reference API section headings in the leftnav instead of the individual class pages. https://holoviz-dev.github.io/param/reference/index.html Screen.Recording.2023-08-18.at.9.47.13.AM.movIn order to have links in the leftnav, each section heading has to be a separate file, so I've broken them out into files that are now in doc/reference/param/. However, to get their contents aggregated on the same page as before, I used the 'include' directive to insert the content from each of the new section pages into a single param/index.md page. Additionally, to be listed in the leftnav, each page needs a title (e.g. '# title').. which screws up the include directive. To fix that, I used ":start-line: 2" for each include directive to skip over the title in the first line. Additionally, the autosummary extension automatically adds its generated pages to the toc... so in order to suppress this, I installed a new plugin called sphinx-remove-toctrees. This should also speed up the docs build for bigger holoviz projects if we choose to implement it across packages. I've added it to the 'doc' list in pyproject.toml for now. Lastly, I've renamed "Main objects" to "Parameterized objects", and I've moved the |
ready to merge. We can iterate on the structure more later |
Co-authored-by: Demetris Roumis <[email protected]>
3cfd735
to
3c3e957
Compare
Main changes:
nbsite
is no longer the executable that builds the docs, instead it's done with sphinx directly. To make this change, I've had to move all the notebooks from./examples
to./doc
. This isn't a problem for the Param project as it doesn't have anexamples
command like Panel and other HoloViz projects. This change should make it easier to work on the docs and use tools likesphinx-autobuild
.autosummary
extension, I'm not sure I like it entirely as you can't configure that much the autogenerated doc for each entry compared to what you can do with e.g.autoclass
. It still feels like an improvement though!Here are two ways to reference the API from the docs (thanks to this SO post)
param/doc/reference/param.md
Line 22 in 5d0cffb
param/doc/user_guide/Parameter_Types.ipynb
Line 65 in 5d0cffb
EDIT: I built the dev docs from this branch, see the new API page https://holoviz-dev.github.io/param/reference/index.html
@droumis do you mind reviewing this PR?