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 index page into sections #12333

Merged
merged 4 commits into from
May 9, 2024

Conversation

Eric-Arellano
Copy link
Collaborator

@Eric-Arellano Eric-Arellano commented May 2, 2024

In Qiskit/documentation#1255 (motivating issue: Qiskit/documentation#1211), we reorganize the Qiskit table of contents into logical groups. This PR changes the index page to mirror the groupings.

Screenshots

index page Screenshot 2024-05-02 at 3 43 03 PM Screenshot 2024-05-02 at 3 43 38 PM
docs ToC

image

Keeping in sync with qiskit/documentation

While we duplicate the groupings between this index page and qiskit/documentation's Sphinx -> MDX pipeline, we will add a test in qiskit/documentation after this PR lands to ensure that the two files are in sync: Qiskit/documentation#1300. Qiskit/qiskit is seen as the source of truth; qiskit/documentation will update to reflect qiskit/qiskit when changes are made.

(Given the docs architecture, it would be non-trivial to have the docs generation generate its groupings based on the index page. It's simpler to validate through a test that runs in CI.)

@Eric-Arellano Eric-Arellano added on hold Can not fix yet documentation Something is not clear or an error documentation stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: None Do not include in changelog labels May 2, 2024
@Eric-Arellano Eric-Arellano added this to the 1.1.0 milestone May 2, 2024
@coveralls
Copy link

coveralls commented May 2, 2024

Pull Request Test Coverage Report for Build 9021265465

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 89.643%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 5 92.37%
Totals Coverage Status
Change from base Build 9021064982: 0.0%
Covered Lines: 62205
Relevant Lines: 69392

💛 - Coveralls

@mtreinish mtreinish removed the on hold Can not fix yet label May 3, 2024
@Eric-Arellano Eric-Arellano changed the title [blocked by #12331] Reorganize API index page into sections Reorganize API index page into sections May 6, 2024
@Eric-Arellano Eric-Arellano marked this pull request as ready for review May 6, 2024 11:47
@Eric-Arellano Eric-Arellano requested a review from a team as a code owner May 6, 2024 11:47
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

github-merge-queue bot pushed a commit to Qiskit/documentation that referenced this pull request May 7, 2024
Closes #1211. See
Qiskit/qiskit#12333 for the sibling PR in
Qiskit. We'll land the test
#1300 once both PRs have
landed.

This uses the same grouping as
#1211 (comment),
if people prefer reviewing the list over code.

Before:
<img width="254" alt="Screenshot 2024-05-01 at 10 27 43 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/5b503347-accd-4847-a7e2-aedf3546fcba">

After:

<img width="269" alt="Screenshot 2024-05-01 at 10 28 02 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/c1a358f6-26f5-4e6e-80e9-2ee440eec94f">

<img width="272" alt="Screenshot 2024-05-01 at 10 28 15 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/c3c80ca7-96e5-4942-ac39-6795b9504277">

This also improves historical APIs

<img width="271" alt="Screenshot 2024-05-01 at 10 29 08 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/362cc70f-4c7e-49c4-9447-78af2a648452">
SooluThomas
SooluThomas previously approved these changes May 9, 2024
Copy link
Member

@SooluThomas SooluThomas left a comment

Choose a reason for hiding this comment

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

The changes looks great and neat!

qiskit.synthesis.unitary.aqc
transpiler
transpiler_passes
transpiler_synthesis_plugins
Copy link
Member

Choose a reason for hiding this comment

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

Is this supposed to be in alphabetical order? If so wouldn't it be at the end of the list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should be alphabetical based on the module name, not the RST file name. We want to mirror the left TOC:

Screenshot 2024-05-09 at 12 01 12 PM

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok that makes sense. Do you think it's worth updating the comment you added at the top of the file to make that distinction, because when I read that I assumed it meant the filename needed to be in alphabetical order. (although in hindsight this makes a lot more sense given how toctree works)

@mtreinish mtreinish added this pull request to the merge queue May 9, 2024
Merged via the queue into Qiskit:main with commit 8c8c78a May 9, 2024
15 checks passed
@Eric-Arellano Eric-Arellano deleted the EA/index-page branch May 9, 2024 19:46
mergify bot pushed a commit that referenced this pull request May 9, 2024
* Reorganize API index page into sections

* Sort alphabetically within each section

* Clarify ordering expectation

(cherry picked from commit 8c8c78a)
github-merge-queue bot pushed a commit that referenced this pull request May 9, 2024
* Reorganize API index page into sections

* Sort alphabetically within each section

* Clarify ordering expectation

(cherry picked from commit 8c8c78a)

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
github-merge-queue bot pushed a commit to Qiskit/documentation that referenced this pull request May 12, 2024
The Qiskit devs were worried about the index page from
Qiskit/qiskit#12333 falling out of sync with our
custom grouping for `_toc.json`.

This PR adds a test to ensure that the two files are in sync. In
particular, it checks that the grouping and sequence of modules is
identical. It does not check that the label for the groups are the same,
though.

For now, we only check the dev docs because the latest docs (1.0) fail.
#1341 will also start
checking the latest docs once 1.1 is released.
ElePT pushed a commit to ElePT/qiskit that referenced this pull request May 31, 2024
* Reorganize API index page into sections

* Sort alphabetically within each section

* Clarify ordering expectation
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
Closes Qiskit#1211. See
Qiskit/qiskit#12333 for the sibling PR in
Qiskit. We'll land the test
Qiskit#1300 once both PRs have
landed.

This uses the same grouping as
Qiskit#1211 (comment),
if people prefer reviewing the list over code.

Before:
<img width="254" alt="Screenshot 2024-05-01 at 10 27 43 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/5b503347-accd-4847-a7e2-aedf3546fcba">

After:

<img width="269" alt="Screenshot 2024-05-01 at 10 28 02 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/c1a358f6-26f5-4e6e-80e9-2ee440eec94f">

<img width="272" alt="Screenshot 2024-05-01 at 10 28 15 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/c3c80ca7-96e5-4942-ac39-6795b9504277">

This also improves historical APIs

<img width="271" alt="Screenshot 2024-05-01 at 10 29 08 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/362cc70f-4c7e-49c4-9447-78af2a648452">
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
The Qiskit devs were worried about the index page from
Qiskit/qiskit#12333 falling out of sync with our
custom grouping for `_toc.json`.

This PR adds a test to ensure that the two files are in sync. In
particular, it checks that the grouping and sequence of modules is
identical. It does not check that the label for the groups are the same,
though.

For now, we only check the dev docs because the latest docs (1.0) fail.
Qiskit#1341 will also start
checking the latest docs once 1.1 is released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog documentation Something is not clear or an error documentation stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants