Skip to content
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: Allow to have dropdown menu to show the API of reporters #1302

Closed
wants to merge 4 commits into from

Conversation

glemaitre
Copy link
Member

@glemaitre glemaitre commented Feb 10, 2025

closes #1095

It is a wip PR to show that we can get a sort of dropdown menu with several level to show the API documentation of reporters, without the feeling that there is so much information at the top level.

The trick is to have a directory structure:

reference/
├── index.rst
├── report.rst
└── report/
    └── estimator_report.rst

that creates the tree on the navigation sidebar. The not ideal thing is the content of report.rst. We need to think what content we want in this intermediate page. However, I think it is a good start to explore.

A couple of screen:

image

image

(I obviously broke the API auto-generated documentation but it should be possible to fix it).

@glemaitre glemaitre marked this pull request as draft February 10, 2025 12:05
Copy link
Contributor

github-actions bot commented Feb 10, 2025

Documentation preview @ c18e983

@glemaitre
Copy link
Member Author

I let the PR in this stage for the moment. If anyone wants to take over, please do not hesitate.

@auguste-probabl
Copy link
Contributor

@sylvaincom What do you think?

@auguste-probabl auguste-probabl removed their request for review February 11, 2025 14:36
@sylvaincom
Copy link
Contributor

I like what I see, thanks

@sylvaincom
Copy link
Contributor

@auguste-probabl did you want to take this over? Or should I?

@auguste-probabl
Copy link
Contributor

@auguste-probabl did you want to take this over? Or should I?

I can take it DW

@auguste-probabl
Copy link
Contributor

auguste-probabl commented Feb 14, 2025

@sylvaincom @MarieS-WiMLDS I've been expanding on this PR, and I found something which I need your opinion on: the API index page (https://skoredoc.k.probabl.dev/1302/reference/index.html) no longer lists all the public class/functions using the autosummary table, like we have currently (https://skore.probabl.ai/0.6/api.html). Instead we have a table of contents to navigate to the individual pages.

As far as I can tell, we can't have both a summary table with everything, and drop-downs in the sidebar. Which do you prefer?

@glemaitre Feel free to correct me if there's a way to do it

@MarieSacksick
Copy link
Contributor

To make sure, are you talking about this page?
image

If we have to choose, I prefer to have the dropdown and not the autosummary than having a looooong list on the left with the autosummary.

@auguste-probabl
Copy link
Contributor

To make sure, are you talking about this page?

Yes exactly

@glemaitre
Copy link
Member Author

We might be able to increase the depth of the toc tree but indeed it will not be as nice as what we had before.

I think that I would be fine with a slightly deeper toc tree since that if you click on it, you will end up in a subsection. Perfectly, in the future, I would be happy that we have a manual generation of all public methods as in scikit-learn: https://scikit-learn.org/stable/api/index.html

However, I'm also OK if someone has stronger opinion on this one.

@sylvaincom
Copy link
Contributor

If we have to choose, I prefer to have the dropdown and not the autosummary than having a looooong list on the left with the autosummary.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: Enable drop-downs in the API
4 participants