Skip to content

docs: migrate README.rst to README.md and switch Sphinx to MyST parser - #477

Merged
shenxianpeng merged 3 commits into
mainfrom
chore/convert-readme-to-md
Jul 23, 2026
Merged

docs: migrate README.rst to README.md and switch Sphinx to MyST parser#477
shenxianpeng merged 3 commits into
mainfrom
chore/convert-readme-to-md

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

Convert the project's documentation pipeline from reStructuredText to Markdown:

  1. README.rst → README.md — 1:1 content conversion using GitHub Flavored Markdown (alerts, footnotes, pipe tables)
  2. Sphinx → MyST parser — replaced docs/index.rst with docs/index.md (MyST format), added myst-parser so Sphinx can build from Markdown sources
  3. Deleted README.rst — no more dual maintenance

Changes

File Change
README.md New — Markdown conversion with GFM features
README.rst Deleted — replaced by README.md
docs/index.md New — MyST Markdown, {include} directive pulls in README.md
docs/index.rst Deleted — replaced by index.md
docs/conf.py Modified — added myst_parser extension, .md source suffix, myst_all_links_external = True
pyproject.toml Modifiedreadme = "README.md", added myst-parser to docs deps
uv.lock Modified — dependency update for myst-parser

GFM features used

  • > [!TIP] / > [!NOTE] — GitHub alert syntax (replaces .. tip::)
  • [^1] footnotes — GFM footnote syntax (replaces [#f1]_ + HTML backlinks)
  • Pipe table with [^n] inline markers (replaces .. list-table::)

Build verification

  • sphinx-build -b html0 warnings, 0 errors (MyST parser handles the Markdown README correctly)
  • pytest — 430/430 pass (1 deselected pre-existing unrelated failure)
  • ruff, mypy, codespell — all pass
  • Netlify Deploy Preview — ✅ ready

Convert the README from reStructuredText to Markdown with a 1:1
content match. Update pyproject.toml to point to README.md for PyPI.
README.rst is kept for the Sphinx documentation build.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner July 23, 2026 06:08
@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 4abfdf7
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a61b4fbca75880008fc6c2a
😎 Deploy Preview https://deploy-preview-477--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a complete README.md covering installation, configuration, CLI and Python API usage, examples, badges, comparisons, and project information. Updates pyproject.toml to use README.md as the package readme.

Changes

Project documentation

Layer / File(s) Summary
README structure and project overview
README.md
Adds project badges, table of contents, overview, quick-start instructions, installation commands, and hook guidance.
Installation and configuration guidance
README.md, pyproject.toml
Documents configuration precedence, TOML settings, inheritance, environment variables, push-safety checks, and changes package metadata to README.md.
AI and programmatic usage
README.md
Documents JSON and compact CLI output, Python API usage, return-value schemas, and commit or branch validation examples.
Badges, comparisons, and project information
README.md
Adds badge snippets, feature comparisons, versioning, feedback links, and license information.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title matches the README migration, but incorrectly claims a Sphinx MyST parser switch that is not reflected in the changes. Remove the Sphinx/MyST claim and focus on the actual change: migrating the README to Markdown and updating pyproject.toml to use it.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/convert-readme-to-md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added chore documentation Improvements or additions to documentation labels Jul 23, 2026
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.26%. Comparing base (e98e907) to head (4abfdf7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #477      +/-   ##
==========================================
+ Coverage   97.17%   97.26%   +0.08%     
==========================================
  Files          12       12              
  Lines        1168     1168              
==========================================
+ Hits         1135     1136       +1     
+ Misses         33       32       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Jul 23, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by ×2.3

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 376 untouched benchmarks
⏩ 114 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
test_empty_message_passes 1,709.8 µs 747.5 µs ×2.3

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing chore/convert-readme-to-md (4abfdf7) with main (e98e907)

Open in CodSpeed

Footnotes

  1. 114 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Improvements over plain Markdown conversion:
- Use > [!TIP] / > [!NOTE] GFM alert syntax instead of plain blockquote
- Use [^1] footnote syntax instead of HTML <sup>/<b id> backlinks

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 333-347: Update the return-value schema code block in README.md to
use a non-executable text/schema fence or valid placeholder strings such as
"<pass|fail>" for both top-level and per-check status fields; preserve the
documented schema structure and other placeholders.
- Around line 177-186: In the README section containing the pre-commit
configuration example, add an opening YAML code fence immediately before the “In
pre-commit hooks (.pre-commit-config.yaml)” comment, matching the existing
closing fence so subsequent documentation renders outside the block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 53b9ea77-bbe8-4457-beac-50b48e86ae08

📥 Commits

Reviewing files that changed from the base of the PR and between e98e907 and 39b7440.

📒 Files selected for processing (2)
  • README.md
  • pyproject.toml

Comment thread README.md
Comment on lines +177 to +186
# In pre-commit hooks (.pre-commit-config.yaml)
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.11.1
hooks:
- id: check-message
args:
- --subject-imperative=false
- --subject-max-length=100
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add the missing YAML fence.

Line 177 starts a pre-commit configuration example without opening a code block, while Line 186 closes one. This leaves the example unformatted and causes the following configuration documentation to render inside the wrong fenced block.

Proposed fix
-# In pre-commit hooks (.pre-commit-config.yaml)
+```yaml
+# In pre-commit hooks (.pre-commit-config.yaml)
 repos:
   - repo: https://github.com/commit-check/commit-check
...
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# In pre-commit hooks (.pre-commit-config.yaml)
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.11.1
hooks:
- id: check-message
args:
- --subject-imperative=false
- --subject-max-length=100
```
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 177 - 186, In the README section containing the
pre-commit configuration example, add an opening YAML code fence immediately
before the “In pre-commit hooks (.pre-commit-config.yaml)” comment, matching the
existing closing fence so subsequent documentation renders outside the block.

Comment thread README.md
Comment on lines +333 to +347
```python
{
"status": "pass" | "fail",
"checks": [
{
"check": "<rule name>",
"status": "pass" | "fail",
"value": "<actual value that was checked>",
"error": "<human-readable error description>",
"suggest": "<how to fix>",
},
# ... one entry per active rule
]
}
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the return-value schema non-executable or valid Python.

The python code block uses "pass" | "fail", which raises TypeError if copied and executed. Use a text/schema block or represent the alternatives as placeholder strings.

Proposed fix
-```python
+```text
 {
-    "status": "pass" | "fail",
+    "status": "<pass|fail>",
...
-            "status":  "pass" | "fail",
+            "status":  "<pass|fail>",
...
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```python
{
"status": "pass" | "fail",
"checks": [
{
"check": "<rule name>",
"status": "pass" | "fail",
"value": "<actual value that was checked>",
"error": "<human-readable error description>",
"suggest": "<how to fix>",
},
# ... one entry per active rule
]
}
```
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 333 - 347, Update the return-value schema code block
in README.md to use a non-executable text/schema fence or valid placeholder
strings such as "<pass|fail>" for both top-level and per-check status fields;
preserve the documented schema structure and other placeholders.

- Add myst-parser to docs dependencies (pyproject.toml)
- Add myst_parser extension and .md source suffix to conf.py
- Convert docs/index.rst -> docs/index.md (MyST Markdown)
- Replace .. include:: with {include} MyST directive
- Set myst_all_links_external = True to suppress TOC anchor warnings
- Delete README.rst (replaced by README.md)

The Sphinx docs now build entirely from Markdown source files.
All existing .rst documentation pages remain unchanged.
@github-actions github-actions Bot added the chore label Jul 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@shenxianpeng shenxianpeng changed the title docs: migrate README.rst to README.md docs: migrate README.rst to README.md and switch Sphinx to MyST parser Jul 23, 2026
@shenxianpeng
shenxianpeng merged commit 7e4e4cf into main Jul 23, 2026
33 checks passed
@shenxianpeng
shenxianpeng deleted the chore/convert-readme-to-md branch July 23, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant