Skip to content

fix(docs): Upgrade sphinxcontrib-mermaid to v2.0.0; Adjust configuration for new schema (fixes #1866).#1867

Merged
junhaoliao merged 1 commit into
y-scope:mainfrom
junhaoliao:mermaid_elk_version
Jan 13, 2026
Merged

fix(docs): Upgrade sphinxcontrib-mermaid to v2.0.0; Adjust configuration for new schema (fixes #1866).#1867
junhaoliao merged 1 commit into
y-scope:mainfrom
junhaoliao:mermaid_elk_version

Conversation

@junhaoliao

@junhaoliao junhaoliao commented Jan 13, 2026

Copy link
Copy Markdown
Member

Description

The newly released v2.0.0 https://pypi.org/project/sphinxcontrib-mermaid/ changed the Sphinx config option mermaid_include_elk from a version string to a boolean variable. In the docs site's requirements.txt, we did not lock the upper bound of the sphinxcontrib-mermaid dependency and therefore the new version was installed which includes the config schema change which broke the CI.

The PR upgrades the sphinxcontrib-mermaid to 2.0.0 and updates the config value according to the new schema.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

task docs:serve
# observe build success and a docs debug server was launched

Inspected, and compared all Mermaid charts (found by global string search {mermaid}) on the debug docs site with https://docs.yscope.com/clp/main/ and did not find any anomaly. in below browsers:

  • Microsoft Edge: Version 143.0.3650.96 (Official build) (64-bit)
  • Firefox: 146.0.1 canonical-002

on

Operating system: Linux

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated configuration settings for documentation diagram rendering to improve compatibility with current tools.
    • Upgraded documentation dependency versions to ensure stability and optimal build performance.

✏️ Tip: You can customize this high-level summary in your review settings.

@junhaoliao junhaoliao requested a review from a team as a code owner January 13, 2026 19:09
@coderabbitai

coderabbitai Bot commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The changes update the Sphinx Mermaid configuration and dependency requirements. The mermaid_include_elk parameter in the configuration file is changed from a string value to a boolean, and the sphinxcontrib-mermaid package version requirement is bumped from 1.0.0 to 2.0.0 in the documentation dependencies.

Changes

Cohort / File(s) Summary
Mermaid Configuration & Dependencies
docs/conf/conf.py, docs/requirements.txt
Updated mermaid_include_elk from string "0.1.7" to boolean True in Sphinx config; bumped sphinxcontrib-mermaid minimum version from 1.0.0 to 2.0.0

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: upgrading sphinxcontrib-mermaid to v2.0.0 and adjusting the configuration for the new schema.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@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: 1

🤖 Fix all issues with AI agents
In @docs/requirements.txt:
- Line 6: The requirements entry for sphinxcontrib-mermaid incorrectly pins to a
non-existent version (>=2.0.0); update the constraint for the package name
sphinxcontrib-mermaid in docs/requirements.txt to a valid published range (e.g.,
use the latest published version 1.2.3 by pinning to ==1.2.3 or allow upgrades
safely with a range like >=1.2.3,<2.0.0), and note in the PR description that
you checked PyPI and coordinated version strategy with the team if a future
major is intended.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db5866a and 245384c.

📒 Files selected for processing (2)
  • docs/conf/conf.py
  • docs/requirements.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint-check (ubuntu-24.04)
  • GitHub Check: lint-check (macos-15)
  • GitHub Check: check-generated
🔇 Additional comments (1)
docs/conf/conf.py (1)

64-65: Configuration updated correctly for sphinxcontrib-mermaid v2.0.0.

The change from the version string "0.1.7" to True aligns with the new schema in sphinxcontrib-mermaid v2.0.0. The validation described in the PR (successful build and visual inspection of Mermaid charts) confirms correct behaviour.

Comment thread docs/requirements.txt
sphinx_design>=0.6.1
sphinx-copybutton>=0.5.2
sphinxcontrib-mermaid>=1.0.0
sphinxcontrib-mermaid>=2.0.0

@coderabbitai coderabbitai Bot Jan 13, 2026

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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the requirements.txt file
cat -n docs/requirements.txt

Repository: y-scope/clp

Length of output: 232


🏁 Script executed:

# Look for conf.py in the docs directory
find docs -name "conf.py" -o -name "*.py" | head -20

Repository: y-scope/clp

Length of output: 72


🏁 Script executed:

# Check git history for this file to see the actual change
cd docs && git log --oneline -n 10 requirements.txt 2>/dev/null || echo "Git history not available"

Repository: y-scope/clp

Length of output: 167


🏁 Script executed:

# Search for mermaid_include_elk in the codebase
rg "mermaid_include_elk" --type py

Repository: y-scope/clp

Length of output: 99


🏁 Script executed:

# Get the git diff for this change to see what changed from previous version
git show 245384c:docs/requirements.txt 2>/dev/null || git show HEAD~1:docs/requirements.txt 2>/dev/null | head -20

Repository: y-scope/clp

Length of output: 190


🏁 Script executed:

# Check the conf.py file for mermaid configuration context
cat -n docs/conf/conf.py | grep -A 5 -B 5 "mermaid"

Repository: y-scope/clp

Length of output: 1024


🏁 Script executed:

# Check if there's a previous constraint to confirm the version bump
git log -p --follow -S "sphinxcontrib-mermaid" -- docs/requirements.txt 2>/dev/null | head -50

Repository: y-scope/clp

Length of output: 37


🌐 Web query:

sphinxcontrib-mermaid 2.0.0 changelog breaking changes mermaid_include_elk

💡 Result:

I couldn't find any release or changelog for a sphinxcontrib-mermaid version 2.0.0. The latest published releases on PyPI and the project repo are in the 0.x/0.9 series. [1][2]

The extension does include a mermaid_include_elk option (controls which mermaid ELK renderer version is used; leaving it blank disables ELK). See the docs and repo config for current behavior and defaults. [1][2]

Sources:

  • sphinxcontrib-mermaid docs (mermaid_include_elk option). [1]
  • sphinxcontrib-mermaid GitHub repo (options & defaults). [2]

If you want, I can:

  • search GitHub tags/releases more deeply (include forks) for any 2.0.0 tag, or
  • inspect a specific changelog/commit you have in mind.

🏁 Script executed:

# Let's search for any information about sphinxcontrib-mermaid on PyPI or GitHub
python3 <<'EOF'
import subprocess
import json

# Try to find more information about sphinxcontrib-mermaid versions
result = subprocess.run(['pip', 'index', 'versions', 'sphinxcontrib-mermaid'], 
                       capture_output=True, text=True)
print("Available versions:")
print(result.stdout)
print(result.stderr)
EOF

Repository: y-scope/clp

Length of output: 141


🌐 Web query:

sphinxcontrib-mermaid PyPI releases versions latest

💡 Result:

Latest on PyPI: sphinxcontrib-mermaid 1.2.3 — published Nov 26, 2025. [1]

Recent release history (selected):

  • 1.2.3 — Nov 26, 2025. [1]
  • 0.9 — May 28, 2023. [2]
  • 0.8.1 — Feb 25, 2023. [4]
  • 0.8 — Feb 9, 2023. [3]
  • 0.7 — May 31, 2021. [5]
  • 0.6.3 — Feb 21, 2021. [6]

Sources: PyPI release pages for sphinxcontrib-mermaid. [1][2][3][4][5][6]


🏁 Script executed:

# Check if there are any version specifications in other files
rg "sphinxcontrib-mermaid" --type py --type txt --type md

Repository: y-scope/clp

Length of output: 285


🏁 Script executed:

# Check if there's a git history showing what the previous version was
git log --all -p --follow -S "sphinxcontrib-mermaid" -- docs/requirements.txt | head -100

Repository: y-scope/clp

Length of output: 1226


🏁 Script executed:

# Check the actual commit to see the full changes
git show 245384c --stat

Repository: y-scope/clp

Length of output: 50367


🏁 Script executed:

# See if there are any comments or issues referencing #1866
rg "1866" --type md

Repository: y-scope/clp

Length of output: 37


Do not approve this version constraint — sphinxcontrib-mermaid 2.0.0 does not exist on PyPI.

The latest published version is 1.2.3 (November 26, 2025). The dependency constraint >=2.0.0 pins to a non-existent version, which will cause installation failures. This appears to reference either an unreleased future version, a custom fork, or an error. Clarify the version strategy with the team before merging.

🤖 Prompt for AI Agents
In @docs/requirements.txt at line 6, The requirements entry for
sphinxcontrib-mermaid incorrectly pins to a non-existent version (>=2.0.0);
update the constraint for the package name sphinxcontrib-mermaid in
docs/requirements.txt to a valid published range (e.g., use the latest published
version 1.2.3 by pinning to ==1.2.3 or allow upgrades safely with a range like
>=1.2.3,<2.0.0), and note in the PR description that you checked PyPI and
coordinated version strategy with the team if a future major is intended.

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.

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.

🧩 Analysis chain

🌐 Web query:

sphinxcontrib-mermaid version 2.0.0 PyPI 2026

💡 Result:

I couldn't find a sphinxcontrib-mermaid 2.0.0 release on PyPI. The latest published release on PyPI is 1.2.3 (uploaded Nov 26, 2025). [1]

Sources:

  • PyPI project page and release files for sphinxcontrib-mermaid (shows v1.2.3, Nov 26, 2025). [1]

🏁 Script executed:

#!/bin/bash
# Fetch the PyPI page for sphinxcontrib-mermaid to check release history
curl -s https://pypi.org/project/sphinxcontrib-mermaid/ | grep -A 2 "release__version" | head -20

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Use PyPI JSON API to get release information
curl -s https://pypi.org/pypi/sphinxcontrib-mermaid/json | jq -r '.releases | keys | .[]' | sort -V | tail -10

Length of output: 65


@junhaoliao You're absolutely right, and I apologize for the error.

I've now verified via the PyPI JSON API that sphinxcontrib-mermaid 2.0.0 does exist and was published to PyPI. The dependency constraint >=2.0.0 is valid. My previous comment about this being a non-existent version was incorrect.

The version upgrade in this PR is appropriate. Thank you for catching my mistake!


🧠 Learnings used
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1405
File: components/clp-package-utils/pyproject.toml:5-15
Timestamp: 2025-10-13T03:24:35.074Z
Learning: In the y-scope/clp repository, the Python 3.9 to 3.10 version requirement change was intentionally deferred to a separate PR (after PR #1405) to reduce review effort, as decided in an offline discussion between junhaoliao and kirkrodrigues.

Learnt from: haiqi96
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-08-04T18:38:33.130Z
Learning: User haiqi96 requested creating a GitHub issue to document a documentation discrepancy where Task version requirements in docs weren't updated after yscope-utils upgrade in PR #1158.

@quinntaylormitchell quinntaylormitchell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm!

@junhaoliao junhaoliao merged commit ee7f6d4 into y-scope:main Jan 13, 2026
10 of 11 checks passed
davidlion pushed a commit to davidlion/clp that referenced this pull request Jan 17, 2026
@junhaoliao junhaoliao deleted the mermaid_elk_version branch May 7, 2026 19:46
junhaoliao added a commit to junhaoliao/clp that referenced this pull request May 17, 2026
junhaoliao added a commit to junhaoliao/clp that referenced this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants