Skip to content

Add a linter that Tutorials index page includes all tutorials #2830

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

Open
Eric-Arellano opened this issue Mar 20, 2025 · 5 comments
Open

Add a linter that Tutorials index page includes all tutorials #2830

Eric-Arellano opened this issue Mar 20, 2025 · 5 comments

Comments

@Eric-Arellano
Copy link
Collaborator

The Tutorials index page is going to list all tutorials twice:

  1. By task
  2. By tool

We need to ensure that every file in tutorials/ shows up exactly once in both sections in tutorials/index.mdx.

This check will be similar to checkPatternsIndex.ts, but I think their implementation diverges enough that it's going to be clearer to create a dedicated check.

At a minimum, verify the URL is identical. If it isn't too hard, also verify the title is the same (relates to #2489).

Ensure this check is added to CI and the ./check script.

@Eric-Arellano Eric-Arellano added needs triage 🤔 this issue needs to be prioritized by the docs team and removed needs triage 🤔 this issue needs to be prioritized by the docs team labels Mar 20, 2025
@Gyan-max
Copy link
Contributor

Gyan-max commented Apr 4, 2025

Hi @Eric-Arellano, I’d like to take this on! I’ll work on adding a linter to ensure all tutorials in tutorials/ appear in both sections of index.mdx, with URL matching and possibly title checks.

@Eric-Arellano
Copy link
Collaborator Author

Hey Gyan, thanks! We still need to add a little more information to this for how exactly it will work. I'll coordinate with Frank if we think this would be a good issue to work on, along with adding more instructions.

@Gyan-max
Copy link
Contributor

Gyan-max commented Apr 4, 2025

Sure, thankyou for the clarification.

@Eric-Arellano Eric-Arellano self-assigned this Apr 8, 2025
@frankharkins
Copy link
Member

Hi @Gyan-max, I've added a script to check the links in #2978, however, it doesn't check titles. Once #2978 is merged, it would be great if you could adapt the script to also check titles. I recommend you:

  1. Add a new capturing group to the regex
  2. Use Python's json module to get the title from each notebook
  3. Add an extra check that the capture group matches the title from the notebook

@Gyan-max
Copy link
Contributor

Hi @Gyan-max, I've added a script to check the links in #2978, however, it doesn't check titles. Once #2978 is merged, it would be great if you could adapt the script to also check titles. I recommend you:

  1. Add a new capturing group to the regex
  2. Use Python's json module to get the title from each notebook
  3. Add an extra check that the capture group matches the title from the notebook

Sure,

let #2978 be merged, then i'll adapt the script and modify it to check for title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants