diff --git a/.agents/skills/development-workflow/SKILL.md b/.agents/skills/development-workflow/SKILL.md index 6a0056e36..43cd27056 100644 --- a/.agents/skills/development-workflow/SKILL.md +++ b/.agents/skills/development-workflow/SKILL.md @@ -51,7 +51,7 @@ Prefer existing fixtures and integration classes; do not build a parallel mock f | SQLAlchemy dialect | Relevant PyAthena tests in `tests/pyathena/sqlalchemy/` plus `just test sqla`; also `tests/pyathena/aio/sqlalchemy/` and `just test sqla-async` for shared reflection or async paths. Both PyAthena directories are included in `just test pyathena`. | | Filesystem | Affected S3 filesystem tests, including listing and path boundaries | | Documentation | `just docs lint`; `just docs build` for rendered documentation changes | -| Agent skills | `just docs lint` and `mise exec -- markdownlint-cli2 '.agents/skills/**/*.md'`; inspect links and walk through realistic workflow scenarios | +| Agent skills | `just docs lint` and `mise exec -- rumdl check .agents/skills`; inspect links and walk through realistic workflow scenarios | | Dependency, packaging, or CI configuration | Affected build/install checks and supported Python/dependency combinations from `pyproject.toml`, `uv.lock`, and CI | The `tests/pyathena/` directory includes AWS integration tests despite the recipe's "unit tests" label. diff --git a/.github/workflows/docs-lint.yaml b/.github/workflows/docs-lint.yaml index 77eb5d996..e81e5daf3 100644 --- a/.github/workflows/docs-lint.yaml +++ b/.github/workflows/docs-lint.yaml @@ -12,7 +12,7 @@ on: paths: - 'docs/**' - '**.md' - - '.markdownlint-cli2.jsonc' + - '.rumdl.toml' - '.mise.toml' - 'justfile' - '.github/workflows/docs-lint.yaml' diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc deleted file mode 100644 index 58dd57d4e..000000000 --- a/.markdownlint-cli2.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 The PyAthena authors -// -// Licensed under the MIT License. -// See LICENSE or https://opensource.org/licenses/MIT. -// -// SPDX-License-Identifier: MIT - -{ - // https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md - "config": { - "default": true, - // Docs have long URLs and code lines that would be awkward to wrap - "MD013": false, - // Match existing style: dash bullets, 2-space nested indent - "MD004": { "style": "dash" }, - "MD007": { "indent": 2 }, - // Allow inline HTML used by README (centered images) and MyST admonitions - "MD033": { - "allowed_elements": ["details", "summary", "br", "kbd", "sub", "sup", "div", "img", "p", "a"] - }, - // Cursor docs intentionally repeat subsection names ("Basic usage") under different cursors - "MD024": { "siblings_only": true }, - // `$ command` style is intentional in docs/testing.md and README shell snippets - "MD014": false, - // MyST `(label)=` ref targets must come before the first heading, so the - // first line of many docs/*.md files is not an H1 - "MD041": false - }, - "globs": [ - "docs/**/*.md", - "benchmarks/*.md", - "scripts/**/*.md", - "cloudformation/**/*.md", - "*.md" - ], - "ignores": [ - "docs/_build/**", - "node_modules/**", - ".venv/**", - ".tox/**", - ".pytest_cache/**", - ".serena/**" - ] -} diff --git a/.mise.toml b/.mise.toml index 593993410..13a387b24 100644 --- a/.mise.toml +++ b/.mise.toml @@ -10,4 +10,4 @@ python = "3.12" just = "latest" shellcheck = "0.11.0" actionlint = "1.7.12" -"npm:markdownlint-cli2" = "0.18.1" +rumdl = "0.3.2" diff --git a/.rumdl.toml b/.rumdl.toml new file mode 100644 index 000000000..7b3e8f823 --- /dev/null +++ b/.rumdl.toml @@ -0,0 +1,82 @@ +# Copyright 2026 The PyAthena authors +# +# Licensed under the MIT License. +# See LICENSE or https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + +# https://rumdl.dev/ + +[global] +# A leading "/" anchors a pattern to the repository root; "*.md" alone would +# also match Markdown files in every subdirectory. +include = [ + "docs/**/*.md", + "benchmarks/*.md", + "scripts/**/*.md", + "cloudformation/**/*.md", + "/*.md", +] +# Run the rule set of markdownlint 0.38 (used by markdownlint-cli2 0.18.1, +# the previous linter) instead of every rule rumdl enables by default. +enable = [ + "MD001", "MD003", "MD004", "MD005", "MD007", "MD009", "MD010", "MD011", + "MD012", "MD018", "MD019", "MD020", "MD021", "MD022", "MD023", "MD024", + "MD025", "MD026", "MD027", "MD028", "MD029", "MD030", "MD031", "MD032", + "MD033", "MD034", "MD035", "MD036", "MD037", "MD038", "MD039", "MD040", + "MD042", "MD043", "MD044", "MD045", "MD046", "MD047", "MD048", "MD049", + "MD050", "MD051", "MD052", "MD053", "MD054", "MD055", "MD056", "MD058", + "MD059", + # Not enabled: + # MD013: docs have long URLs and code lines that would be awkward to wrap + # MD014: `$ command` style is intentional in docs/testing.md and README shell snippets + # MD041: MyST `(label)=` ref targets must come before the first heading, so the + # first line of many docs/*.md files is not an H1 +] + +# Sphinx renders docs/ with MyST, so directive fences such as ```{toctree} +# are not code blocks without a language +[per-file-flavor] +"docs/**/*.md" = "myst" + +# Match existing style: dash bullets, 2-space nested indent +[MD004] +style = "dash" + +[MD007] +indent = 2 +style = "fixed" + +# Cursor docs intentionally repeat subsection names ("Basic usage") under different cursors +[MD024] +siblings-only = true + +# Allow inline HTML used by README (centered images) and MyST admonitions +[MD033] +allowed-elements = ["details", "summary", "br", "kbd", "sub", "sup", "div", "img", "p", "a"] + +# Options whose rumdl defaults differ from markdownlint's +[MD001] +front-matter-title = false + +[MD010] +code-blocks = true +spaces-per-tab = 1 + +[MD026] +punctuation = ".,;:!。,;:!" + +[MD027] +list-items = true + +[MD036] +punctuation = ".,;:!?。,;:!?" + +[MD051] +ignore-case = false + +[MD052] +ignore = ["x"] + +[MD053] +ignored-definitions = ["//"] diff --git a/AGENTS.md b/AGENTS.md index 1e1885711..20a8879fd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -102,12 +102,12 @@ uv run --env-file .env pytest -n 1 tests/pyathena/test_cursor.py -v ### Markdown Lint -`docs/**/*.md`, `benchmarks/*.md`, `scripts/**/*.md`, `cloudformation/**/*.md`, and project-root `*.md` files are linted with [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2). The config lives at `.markdownlint-cli2.jsonc`. CI runs lint + Sphinx build on PRs that touch docs (`.github/workflows/docs-lint.yaml`). +`docs/**/*.md`, `benchmarks/*.md`, `scripts/**/*.md`, `cloudformation/**/*.md`, and project-root `*.md` files are linted with [rumdl](https://github.com/rvben/rumdl). The config lives at `.rumdl.toml`. CI runs lint + Sphinx build on PRs that touch docs (`.github/workflows/docs-lint.yaml`). -`markdownlint-cli2` is pinned in `.mise.toml`, so [`mise`](https://mise.jdx.dev/) installs the exact version used in CI. Run locally: +`rumdl` is pinned in `.mise.toml`, so [`mise`](https://mise.jdx.dev/) installs the exact version used in CI. Run locally: ```bash -mise install # one-time: installs markdownlint-cli2 +mise install # one-time: installs rumdl just docs lint # check just docs format # auto-fix what's possible just docs build # build the Sphinx site under docs/_build/html diff --git a/justfile b/justfile index 4f3910ab4..6b7d5a707 100644 --- a/justfile +++ b/justfile @@ -69,8 +69,8 @@ _docs-help: @echo "" @echo "Targets:" @echo " build Build the Sphinx documentation site (docs/_build/html)" - @echo " lint Lint Markdown with markdownlint-cli2" - @echo " format Auto-fix Markdown with markdownlint-cli2" + @echo " lint Lint Markdown with rumdl" + @echo " format Auto-fix Markdown with rumdl" _docs-build: uv run sphinx-multiversion docs docs/_build/html @@ -80,10 +80,10 @@ _docs-build: touch docs/_build/html/.nojekyll _docs-lint: - mise exec -- markdownlint-cli2 + mise exec -- rumdl check _docs-format: - mise exec -- markdownlint-cli2 --fix + mise exec -- rumdl check --fix # Benchmark workspace member with its own Python 3.12 environments: benchmarks/.venv # with Polars 1.x, benchmarks/.venv-polars2 with Polars 2.x, and benchmarks/.venv-s3fs