Skip to content

Add CI job that checks for consistent @meta blocks in all md pages #4823

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

Merged
merged 4 commits into from
May 5, 2025

Conversation

lgoettgens
Copy link
Member

While looking through the diff of #4758, I noticed that many files have slightly different content in their @meta blocks. This PR adds a simple check that all of them coincide, and if not, prints out a list of files that need adaptation.

I deliberately did not attempt to fix these issue yet, as that would produce loads of conflicts with #4758.

@lgoettgens lgoettgens added documentation Improvements or additions to documentation CI labels Apr 23, 2025
@lgoettgens lgoettgens requested review from benlorenz and thofma April 23, 2025 15:22
@fingolfin
Copy link
Member

I'd rather wish we could just specify a single @meta block, in one place, and be done with it.... IIRC I had a Documenter.jl feature request for it. Perhaps we can submit a PR to Documenter...

meta = """```@meta
CurrentModule = Oscar
DocTestSetup = Oscar.doctestsetup()
```
Copy link
Member

Choose a reason for hiding this comment

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

Aren't there cases where we need the standard block plus something more? In that case it might be better to only match the first three lines?

Suggested change
```

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't seen such cases yet, so I would only do that once needed.

Copy link
Member

Choose a reason for hiding this comment

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

My mistake: the example I thought I saw in docs/src/NumberTheory/galois.md isn't one -- that file simply has three @meta blocks, but the primary (first) one is "standard", so this is indeed fine!

@fingolfin
Copy link
Member

Needs an update

@lgoettgens lgoettgens force-pushed the lg/CI-check-meta-blocks branch from 09f27ea to 7a58d79 Compare April 30, 2025 10:14
@lgoettgens lgoettgens requested a review from fingolfin May 2, 2025 12:32
@fingolfin fingolfin merged commit b96c04a into oscar-system:master May 5, 2025
32 checks passed
@lgoettgens lgoettgens deleted the lg/CI-check-meta-blocks branch May 6, 2025 12:26
fieker pushed a commit that referenced this pull request May 16, 2025
@lgoettgens lgoettgens added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI documentation Improvements or additions to documentation release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants