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

Patterns: validate Patterns index pages #1299

Open
Tracked by #524
Eric-Arellano opened this issue May 3, 2024 · 0 comments
Open
Tracked by #524

Patterns: validate Patterns index pages #1299

Eric-Arellano opened this issue May 3, 2024 · 0 comments

Comments

@Eric-Arellano
Copy link
Collaborator

Eric-Arellano commented May 3, 2024

In #1294, each of the 4 patterns pages links out to the rest of the docs app. It provides an alternative organization than the tools-based approach.

We are going to manually maintain both guides/_toc.json and those 4 index pages. There are a few edge cases that would be too complex for us to generate the index files in a clear way. It's best to let humans decide what goes where.

However, we want an automated check to ensure that every page shows up both in the Tools folders & in the Workflow index pages. Likewise, a page should never show up >1 time in the _toc.json or the index pages. The check should not care what TOC section/workflow index the specific page shows up in; we only need to validate that it shows up exactly once in both places.

This code is probably useful for how to parse the index pages:

async function getIndexModuleGroups(fp: string): Promise<ModuleGroup[]> {

Note that the index pages may have sublists, like * with indentation.

We probably need an allowlist mechanism. Right now, Qiskit Serverless only shows up in the Tools and not Workflow index pages.

@Eric-Arellano Eric-Arellano changed the title Patterns: dynamically generate Patterns index pages Patterns: validate Patterns index pages May 29, 2024
github-merge-queue bot pushed a commit that referenced this issue May 30, 2024
This is the first step in
#1297.

We're going to be making last-minute changes for the docs reorg, such as
finalizing URLs at the last minute. So, it's useful to have a program
that can immediately regenerate the entire migration for us at any time.
This program will eventually generate two commits:

1. Move files to guides/
2. Update non-API internal links, like `/run/my-page` to
`/guides/my-page`

Thanks to this script being checked in to version control beforehand, we
will have less code to review in the final migration PR.

This program is not going to be permanent. We decided in
#1299 that we will not
generate the Workflow index pages longterm, only in this initial PR.
Instead, we'll add a validation check. So this program is only temporary
while we work on the migration.

## Follow up improvements

This PR is only the initial foundation of the migration program.
Remaining tasks:

* Finalize the page URLs
* Finalize the page organization in the left ToC and Patterns Index
pages
* Finalize the content for the new pages
* Delete the existing pages and save the change as a Git commit.
* Get CI to be green when running the migration program, such as the
link checker.
* #1299
* #1460

---------

Co-authored-by: javabster <abby.s.mitchell@gmail.com>
Co-authored-by: Arnau Casau <arnaucasau@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant