Revamp docs and add interactive python examples with sphinx-pyodide#171
Revamp docs and add interactive python examples with sphinx-pyodide#171rlskoeser wants to merge 16 commits into
Conversation
Assisted-by: OpenCode:BigPickle (glm-5.1)
Assisted-by: ClaudeCode:claude-sonnet-4-6
- Fixed output consistency — all calls use repr(), with the format conversion separated into a clear comment - Added "Parsing and Formatting" section heading (same ~~~~~ level as "Calendars") - Added Gregorian examples — French and Kinyarwanda to illustrate the multilingual support - Added holidays examples — Epiphany (fixed), Easter and Ash Wednesday (movable feasts) Assisted-by: ClaudeCode:claude-sonnet-4-6
Assisted-by: ClaudeCode:claude-sonnet-4-6
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe docs build now uses furo with Pyodide support, the homepage and navigation are rewritten, a new usage guide is added, and CI/publish workflows switch cache and build steps to uv-based settings. ChangesDocumentation build and content overhaul
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
docs/_static/custom.css (1)
2-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRedundant with
sidebar-logo-widthCSS variable.
docs/conf.pyalready sets"sidebar-logo-width": "200px"in bothlight_css_variablesanddark_css_variables, which furo uses to size.sidebar-logo. This custom rule duplicates that value; if one is changed without the other, they'll silently drift out of sync.🤖 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 `@docs/_static/custom.css` around lines 2 - 6, The .sidebar-logo rule in the custom stylesheet duplicates the sizing already controlled by the sidebar-logo-width theme variable in docs/conf.py. Remove the redundant custom CSS from custom.css and rely on the existing Furo CSS variable settings so the sidebar logo size stays defined in one place.docs/example_usage.rst (1)
8-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winHardcoded version string in wheel filename will drift from the package version.
./wheels/undate-0.8.0.dev0-py3-none-any.whlhardcodes the current dev version. Every timeundate.__version__bumps (already read dynamically indocs/conf.pyfor thereleasesetting), this path must be manually kept in sync or the pyodide packages install will fail to find the wheel silently breaking every downstream interactive example on this page.Consider generating this wheel filename dynamically (e.g., via a Jinja/
|release|substitution ifsphinx_pyodidesupports it, or a smallconf.py-level string replacement) rather than hardcoding it in the.rstsource.🤖 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 `@docs/example_usage.rst` around lines 8 - 14, The pyodide example hardcodes the undate wheel filename, so it will drift whenever the package version changes. Update the example in example_usage.rst to derive the wheel name from the same dynamic version source used in docs/conf.py (for example via a release-based substitution or conf.py-driven text replacement) instead of embedding the version directly. Make the change around the pyodide directive and its :packages: entry so the package path stays in sync with undate.__version__.
🤖 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 `@pyproject.toml`:
- Around line 133-135: The [tool.uv.sources] entry for sphinx-pyodide is
hard-pinned to a sibling local path, which breaks clean-clone docs/dev installs;
update the sphinx-pyodide source definition to use a published or git-based
source instead of ../sphinx-pyodide, or adjust the docs/dev setup so the
dependency is available without requiring a neighboring checkout. Make the
change in pyproject.toml near the sphinx-pyodide source override so uv sync and
docs builds work from a fresh clone.
---
Nitpick comments:
In `@docs/_static/custom.css`:
- Around line 2-6: The .sidebar-logo rule in the custom stylesheet duplicates
the sizing already controlled by the sidebar-logo-width theme variable in
docs/conf.py. Remove the redundant custom CSS from custom.css and rely on the
existing Furo CSS variable settings so the sidebar logo size stays defined in
one place.
In `@docs/example_usage.rst`:
- Around line 8-14: The pyodide example hardcodes the undate wheel filename, so
it will drift whenever the package version changes. Update the example in
example_usage.rst to derive the wheel name from the same dynamic version source
used in docs/conf.py (for example via a release-based substitution or
conf.py-driven text replacement) instead of embedding the version directly. Make
the change around the pyodide directive and its :packages: entry so the package
path stays in sync with undate.__version__.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 403ff8ff-51b9-4bdb-bcde-350cc9e3bd5e
⛔ Files ignored due to path filters (2)
docs/_static/undate_logo.svgis excluded by!**/*.svgdocs/_static/undate_logo_dark.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
docs/_static/custom.cssdocs/conf.pydocs/example_usage.rstdocs/index.rstdocs/readme.mdpyproject.toml
💤 Files with no reviewable changes (1)
- docs/readme.md
Assisted-by: ClaudeCode:claude-sonnet-4-6
Assisted-by: ClaudeCode:claude-sonnet-4-6
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/unit_tests.yml (1)
40-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueStale comment above cache config.
Line 40's comment says "use github python action instead of uv to take advantage of caching," but the step below uses
astral-sh/setup-uvwith its own cache (enable-cache/cache-dependency-glob), not the GitHub-providedactions/setup-python. Worth updating/removing this comment to avoid confusion now that uv caching is explicit.🤖 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 @.github/workflows/unit_tests.yml around lines 40 - 46, The comment above the Python setup step is stale and no longer matches the actual implementation in the unit_tests workflow. Update or remove the note near the setup-uv step so it accurately reflects that the workflow uses astral-sh/setup-uv with explicit cache settings (enable-cache and cache-dependency-glob), not actions/setup-python. Refer to the “Set up Python” step in the workflow and keep the comment aligned with the current caching approach.
🤖 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 @.github/workflows/python-publish.yml:
- Around line 28-33: The release workflow currently uses astral-sh/setup-uv with
its default caching behavior, which should be disabled for the PyPI publish job.
Update the Set up uv step to explicitly set enable-cache to false in the
setup-uv configuration so the Build package/publish flow does not use cache in
this workflow.
---
Nitpick comments:
In @.github/workflows/unit_tests.yml:
- Around line 40-46: The comment above the Python setup step is stale and no
longer matches the actual implementation in the unit_tests workflow. Update or
remove the note near the setup-uv step so it accurately reflects that the
workflow uses astral-sh/setup-uv with explicit cache settings (enable-cache and
cache-dependency-glob), not actions/setup-python. Refer to the “Set up Python”
step in the workflow and keep the comment aligned with the current caching
approach.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8dc3b2f8-88e9-4a6c-a013-04f4391b733d
📒 Files selected for processing (4)
.github/workflows/check.yml.github/workflows/python-publish.yml.github/workflows/unit_tests.ymlpyproject.toml
✅ Files skipped from review due to trivial changes (1)
- .github/workflows/check.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- pyproject.toml
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | ||
| with: | ||
| python-version: "3.x" | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install build | ||
| python-version: "3.12" | ||
| - name: Build package | ||
| run: python -m build | ||
| run: uv build |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
astral-sh/setup-uv action enable-cache default value GitHub Actions
💡 Result:
The default value for the enable-cache input in the astral-sh/setup-uv GitHub Action is "auto" [1][2][3]. When set to "auto," the action automatically enables caching on GitHub-hosted runners and disables it on self-hosted runners [1][2][3]. Other valid values for this input are "true" (to force enable) and "false" (to force disable) [1][2].
Citations:
- 1: https://github.com/astral-sh/setup-uv
- 2: https://github.com/astral-sh/setup-uv?tab=readme-ov-file
- 3: https://github.com/astral-sh/setup-uv/blob/main/README.md
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the workflow file with line numbers around the referenced section.
sed -n '1,120p' .github/workflows/python-publish.yml | cat -nRepository: dh-tech/undate-python
Length of output: 1605
Disable setup-uv caching in this release workflow. astral-sh/setup-uv defaults to enable-cache: auto, which turns caching on for ubuntu-latest; this job publishes artifacts to PyPI, so set enable-cache: false here.
🧰 Tools
🪛 zizmor (1.26.1)
[error] 29-29: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default
(cache-poisoning)
🤖 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 @.github/workflows/python-publish.yml around lines 28 - 33, The release
workflow currently uses astral-sh/setup-uv with its default caching behavior,
which should be disabled for the PyPI publish job. Update the Set up uv step to
explicitly set enable-cache to false in the setup-uv configuration so the Build
package/publish flow does not use cache in this workflow.
Source: Linters/SAST tools
Assisted-by: ClaudeCode:claude-sonnet-4-6
Summary by CodeRabbit