Skip to content

CI: use pymarkdownlnt - #1502

Open
mgovers wants to merge 19 commits into
mainfrom
pgm/feature/pymarkdownlnt
Open

CI: use pymarkdownlnt#1502
mgovers wants to merge 19 commits into
mainfrom
pgm/feature/pymarkdownlnt

Conversation

@mgovers

@mgovers mgovers commented Jul 28, 2026

Copy link
Copy Markdown
Member

In light of recent events, we are aiming to reduce our amount of dependencies - in particular the npm ones. That means we need to migrate to a markdown linter in the PyPI ecosystem.

Relates to #1499 and #1501 .

Important things to note:

  • wide tables and KaTeX need to be explicitly marked <!-- pyml disable line-length--> and <!-- pyml enable line-length-->.
    • There is NO way to do this inline yet.
    • It needs to be done at the block-level (no indentation), meaning you can only do a full disable and enable for that table/block...

@mgovers mgovers self-assigned this Jul 28, 2026
@mgovers mgovers added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file improvement Improvement on internal implementation do-not-merge This should not be merged github_actions Pull requests that update GitHub Actions code javascript Pull requests that update javascript code labels Jul 28, 2026
Comment thread .pre-commit-config.yaml.jinja
@mgovers
mgovers force-pushed the pgm/feature/pymarkdownlnt branch 2 times, most recently from b765f65 to 8435022 Compare July 28, 2026 13:49
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

update workflows

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

remove markdownlint-cli from devcontainer

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

fix pre-commit

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

more fixes

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

more fixes

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

homogenize

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

fix pyproject.toml

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

minor

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

no run locked (scoped out of pr)

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

fix ci

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

scope out npm packages from refresher

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>

Refresh lock and linter dependencies

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

fix

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@mgovers
mgovers force-pushed the pgm/feature/pymarkdownlnt branch from 048d6ba to 38a2b6a Compare July 28, 2026 14:19
Comment on lines +366 to +370
<!-- pyml disable commands-show-output-->
```powershell
$env:CMAKE_PREFIX_PATH = C:\conda_envs\cpp_pkgs\Library
```
<!-- pyml enable commands-show-output-->

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

some kind of weird false positive where a $ is interpreted as unix $, not as Windows $

@mgovers
mgovers marked this pull request as ready for review July 28, 2026 14:22
mgovers and others added 10 commits July 29, 2026 08:10
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…k-and-linter

Refresh lock and linter dependencies
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…k-and-linter

Refresh lock and linter dependencies
@mgovers mgovers changed the title Pgm/feature/pymarkdownlnt CI: use pymarkdownlnt Jul 29, 2026

@figueroa1395 figueroa1395 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Even though a "newer" tool, it seems to have a good number of downloads and be actively maintained. My only concern is that it seems like it's mainly maintained by one guy (cfr. github).

Other than that, I have no issue with it. In any case we can always switch or drop such a tool entirely.

Comment thread .pre-commit-config.yaml Outdated
Comment thread .github/workflows/check-code-quality.yml
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@mgovers
mgovers force-pushed the pgm/feature/pymarkdownlnt branch from 56c0d4d to 5857ad6 Compare July 30, 2026 05:34
Comment thread docs/user_manual/components.md Outdated

2. If neither `p_sigma` nor `q_sigma` are provided, `power_sigma` represents the standard deviation of the apparent
power. In this case, infinite value of `power_sigma` disables the entire measurement.
<!-- pyml enable line-length-->

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
<!-- pyml enable line-length-->

Comment thread pyproject.toml Outdated
Comment on lines +210 to +212
plugins.line-length.line_length = 120
plugins.line-length.heading_line_length = 120
plugins.line-length.code_block_line_length = 120

@mgovers mgovers Jul 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TODO: check if we can disable line length on code blocks and tables. if not, then disable entirely

mgovers added 6 commits July 31, 2026 14:15
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@nitbharambe

nitbharambe commented Aug 3, 2026

Copy link
Copy Markdown
Member

Some 3 markdownlint ignores are present in the docs. Would you do a global find on them?

@mgovers
mgovers force-pushed the pgm/feature/pymarkdownlnt branch from e7c23dd to 1cfd263 Compare August 3, 2026 09:13
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@mgovers
mgovers force-pushed the pgm/feature/pymarkdownlnt branch from 1cfd263 to 26e32d1 Compare August 3, 2026 09:14
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

Base automatically changed from pgm/feature/dependabot-on-specific-day to main August 3, 2026 10:16

@figueroa1395 figueroa1395 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see the potential issues were addressed. The remaining "exception" blocks from the linter are acceptable to me: only long equations and graphs, as far as I can tell.

The table issue has been resolved.

LGTM.

Comment thread docs/algorithms/lu-solver.md
Comment thread docs/user_manual/data-model.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file do-not-merge This should not be merged documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code improvement Improvement on internal implementation javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants