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

Update dependency mdformat-mkdocs to v4 #15011

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 16, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mdformat-mkdocs (changelog) ==3.1.1 -> ==4.0.0 age adoption passing confidence

Release Notes

kyleking/mdformat-mkdocs (mdformat-mkdocs)

v4.0.0

Compare Source

What's Changed

Full Changelog: KyleKing/mdformat-mkdocs@v3.1.1...v4.0.0


Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the internal An internal refactor or improvement label Dec 16, 2024
@dhruvmanila
Copy link
Member

dhruvmanila commented Dec 16, 2024

This major version update adds a change where it would add newlines after the title of content tabs (https://squidfunk.github.io/mkdocs-material/reference/content-tabs) but then the markdownlint linter will complain as the code block style will become inconsistent (https://github.com/DavidAnson/markdownlint/blob/main/doc/md046.md). This is not caught by this PR because the mdformat-mkdocs dependency is pinned to <4.0.0 in our pre-commit config:

- mdformat-mkdocs<4.0.0

We can move ahead with this PR but we should update the version specifier in our pre-commit config and possibly ignore MD046.

@MichaReiser
Copy link
Member

@dhruvmanila are you planning on owning this?

@dhruvmanila
Copy link
Member

@dhruvmanila are you planning on owning this?

Yeah

@dhruvmanila
Copy link
Member

I've made the following changes:

  • Update mdformat-mkdocs to 4.0.0 in our pre-commit config and use == specifier for it
  • Apply the formatting changes which adds a blank line after the title of content tabs
  • Ignore MD046 with a reference to why we're doing so

I tested this change by rendering the affected pages locally and everything looked the same as today.

@dhruvmanila
Copy link
Member

Weird, I did a fresh run of pre-commit locally (i.e., after pre-commit clean) and it passed. I'll try to re-run once the CI is completed.

@dhruvmanila
Copy link
Member

Ok, I see the issue. Now, mdformat-mkdocs also conflicts with the mdformat-admon plugin because both registers for admonition and admonition_title nodes.

@dhruvmanila
Copy link
Member

Oh, I didn't realize @AlexWaygood pinned the version because of these conflicts xD (#14992)

@dhruvmanila
Copy link
Member

I've asked the plugin author if this change means that we don't need the mdformat-admon plugin (KyleKing/mdformat-admon#22 (comment)). Once that's resolved, we can merge this PR otherwise I'll see what the solution should be.

@AlexWaygood
Copy link
Member

Oh, I didn't realize @AlexWaygood pinned the version because of these conflicts xD (#14992)

Haha, yeah, I merged a hotfix last night because the new release meant pre-commit started failing randomly on contributor PRs, which was understandably causing confusion 😄

Copy link
Contributor

@KyleKing KyleKing left a comment

Choose a reason for hiding this comment

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

This should resolve the issue! I'll update the release notes

docs/requirements-insiders.txt Outdated Show resolved Hide resolved
docs/requirements.txt Outdated Show resolved Hide resolved
@dhruvmanila
Copy link
Member

This should resolve the issue! I'll update the release notes

Thank you for reviewing this PR!

<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

Resolve mdformat issues raised while upgrading to `mdformat-mkdocs` in
#15011

## Test Plan

```sh
> uv run --no-project --isolated --with-requirements docs/requirements.txt scripts/generate_mkdocs.py
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.33s
     Running `target/debug/ruff_dev generate-docs`
Rule F401 references deprecated option lint.ignore-init-module-imports.
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/ruff_dev generate-rules-table`
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/ruff_dev generate-options`
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/ruff rule --all --output-format json`  
```
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@dhruvmanila dhruvmanila merged commit 50739f9 into main Dec 16, 2024
21 checks passed
@dhruvmanila dhruvmanila deleted the renovate/mdformat-mkdocs-4.x branch December 16, 2024 17:18
dcreager added a commit that referenced this pull request Dec 16, 2024
* main:
  Bump zizmor pre-commit hook to the latest version and fix new warnings (#15022)
  Add `actionlint` as a pre-commit hook (with shellcheck integration) (#15021)
  Update dependency mdformat-mkdocs to v4 (#15011)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants