Skip to content

Pgm/feature/pymarkdownlnt - #1502

Open
mgovers wants to merge 1 commit into
pgm/feature/dependabot-on-specific-dayfrom
pgm/feature/pymarkdownlnt
Open

Pgm/feature/pymarkdownlnt#1502
mgovers wants to merge 1 commit into
pgm/feature/dependabot-on-specific-dayfrom
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...
  • Pre-commit seems to be doing some weird environment management when running multi-threaded that bypasses the uv environment. This means that we can mostly get rid of it, but some manual handling is still required if using a different index than pythonhosted. I did not find a reason why this behavior changes nor a solid workaround. We can only do what we can.

@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 on lines +57 to +65
require_serial: true
- id: pymarkdown-scan
name: pymarkdown-scan
alias: markdown-check
entry: uv run --frozen pymarkdown scan
language: system
pass_filenames: true
types: [ markdown ]
require_serial: true

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.

for some weird reason, require_serial: true is needed to prevent a new environment from being created and used. I tried digging really deeply into it, including setting environment variables, etc, but pre-commit kept trying to create a new environment but not pulling data from the pypi mirror index i specified but from the pythonhosted one. I still haven't figured out why but it seems to have something to do with different environments and multithreading

@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
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant