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

Reorganize API docs into subpages #927

Merged
merged 5 commits into from
Jul 24, 2023

Conversation

Eric-Arellano
Copy link
Contributor

Before, we had one page that listed every single function and class. When combined with the new Furo theme from #926, this resulted in an incredibly big left sidebar because all entries were shown at the same nesting level.

Now, the API docs are organized into subpages. This is what the top-level page looks like:

Screenshot 2023-07-11 at 12 34 21 PM

An example subpage:

Screenshot 2023-07-11 at 12 35 02 PM

The Algorithms subpage (I'm not sure if this should show all functions on the page or not):

Screenshot 2023-07-11 at 12 39 00 PM


This also fixes two issues with the top-level ToC:

  1. The home page <self> was missing
  2. install.rst had an improper heading style, so the 4 headers on the page were being treated as top-level pages in the left sidebar.

Now, it looks like this:

Screenshot 2023-07-11 at 12 40 45 PM

@coveralls
Copy link

coveralls commented Jul 11, 2023

Pull Request Test Coverage Report for Build 5649247472

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.423%

Totals Coverage Status
Change from base Build 5649211734: 0.0%
Covered Lines: 15283
Relevant Lines: 15850

💛 - Coveralls

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this LGTM, I think this structure will work better once we update the theme package to be the new furo one. Just one inline comment about the max depth for the top level toctree.

I also wonder if we want to mention the new structure in the CONTRIBUTING.md, I thought we said new functions need to update api.rst there, but I can't find it. This is easy enough to do in a follow up PR though, so let's just move forward with this as is and we can look at the contributing documentation in parallel.

===================

.. toctree::
:maxdepth: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think making this depth 2 would be nice so we still retain the list of functions. Especially in the move to furo depth 2 would be needed to show each function in the side bar right? But also for the current pytorch based theme I think having the full function list on the api page is useful, even if a bit overwhelming at times.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxdepth has zero impact on Furo's left sidebar. This is how it renders even with maxdepth set to 1

Screenshot 2023-07-12 at 10 15 48 AM

I think making this depth 2 would be nice so we still retain the list of functions...I think having the full function list on the api page is useful, even if a bit overwhelming at times.

Sounds reasonable to me. We can always change it with one line if we don't like it.

@mtreinish mtreinish added the stable-backport-potential This PR or issue is potentially worth backporting for inclusion in a stable branch label Jul 14, 2023
@mtreinish mtreinish added the automerge Queue a approved PR for merging label Jul 24, 2023
@mtreinish mtreinish added this to the 0.13.1 milestone Jul 24, 2023
@mergify mergify bot merged commit bca9271 into Qiskit:main Jul 24, 2023
mergify bot pushed a commit that referenced this pull request Jul 24, 2023
* Reorganize API docs into subfolders

* Increase maxdepth for functions page

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit bca9271)

# Conflicts:
#	docs/source/api.rst
@Eric-Arellano Eric-Arellano deleted the reorganize-api-docs branch July 24, 2023 21:04
Eric-Arellano added a commit to Eric-Arellano/rustworkx that referenced this pull request Jul 25, 2023
* Reorganize API docs into subfolders

* Increase maxdepth for functions page

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Jul 25, 2023
* Reorganize API docs into subfolders

* Increase maxdepth for functions page

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
raynelfss pushed a commit to raynelfss/rustworkx that referenced this pull request Aug 10, 2023
* Reorganize API docs into subfolders

* Increase maxdepth for functions page

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Queue a approved PR for merging stable-backport-potential This PR or issue is potentially worth backporting for inclusion in a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants