fix: green CI and align README Python version to 3.11+#8
Conversation
- tests/test_gmi_module.py: the canonical-docs guard pinned the literal 'nine feature areas', which the README header trim replaced with 'nine major sections'; update the assertion to match. This was the sole pytest failure breaking CI on 3.11/3.12/3.13. - README: state Supported Python >=3.11, SpatialPerturb extra on 3.11+, and show a 3.11 | 3.12 | 3.13 Python badge (the dynamic PyPI badge reflected the published 0.4.6 metadata until the next release). - pyproject: bump the perturb extra marker to python_version >= '3.11' to match requires-python. - gitignore: ignore local .claude/ agent tooling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
审阅者指南(在小型 PR 上折叠)审阅者指南将文档和元数据中的 Python 支持对齐为 3.11+,修复一个 CI 测试断言以匹配当前 README 的用语,并在 .gitignore 中增加一条小的日常维护项。 文件级变更
提示与命令与 Sourcery 交互
自定义你的使用体验访问你的 控制面板 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideAligns documented and metadata Python support to 3.11+, fixes a CI test assertion to match the current README wording, and adds a small gitignore housekeeping entry. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull request overview
This pull request fixes a CI regression caused by a pinned README wording assertion and aligns documented Python support information with the project’s existing requires-python >=3.11 / CI matrix.
Changes:
- Update the canonical-docs test to match the current README phrasing (“nine major sections”).
- Update README Python support messaging and switch to a static Python 3.11–3.13 badge.
- Tighten the
perturbextra’s environment marker topython_version >= '3.11'and ignore local.claude/tooling output.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/test_gmi_module.py |
Updates the pinned README phrase in the canonical-docs test to match current README text. |
README.md |
Aligns documented supported Python version to 3.11+ and replaces the dynamic PyPI pyversions badge with a static 3.11–3.13 badge. |
pyproject.toml |
Updates the perturb optional dependency marker to require Python 3.11+. |
.gitignore |
Adds .claude/ to ignored local tooling artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
test_gmi_docs_and_package_data_are_canonical测试仍然与 README 中的某个具体短句强耦合;建议改为断言更稳定的结构性标记(例如章节标题、标题数量,或使用正则表达式),以避免今后出现细微措辞变化时再次导致 CI 失败。- 将 Python 版本徽章切换为硬编码图片后,今后每次发布都需要手动更新该徽章;你可能会希望继续使用动态徽章,或者增加一个单一可信来源(例如复用
requires-python的值),以减少版本信息不同步的风险。
给 AI 智能体的提示
Please address the comments from this code review:
## Overall Comments
- The `test_gmi_docs_and_package_data_are_canonical` test is still tightly coupled to a specific README phrase; consider asserting on a more stable structural marker (e.g., section title, heading count, or a regex) so that small wording changes don’t break CI again.
- By switching the Python version badge to a hard-coded image, you’ll need to remember to update it manually for future releases; you might want to either keep a dynamic badge or add a single source of truth (e.g., reuse the `requires-python` value) to reduce the chance of it drifting out of sync.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈不断改进评审质量。
Original comment in English
Hey - I've left some high level feedback:
- The
test_gmi_docs_and_package_data_are_canonicaltest is still tightly coupled to a specific README phrase; consider asserting on a more stable structural marker (e.g., section title, heading count, or a regex) so that small wording changes don’t break CI again. - By switching the Python version badge to a hard-coded image, you’ll need to remember to update it manually for future releases; you might want to either keep a dynamic badge or add a single source of truth (e.g., reuse the
requires-pythonvalue) to reduce the chance of it drifting out of sync.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `test_gmi_docs_and_package_data_are_canonical` test is still tightly coupled to a specific README phrase; consider asserting on a more stable structural marker (e.g., section title, heading count, or a regex) so that small wording changes don’t break CI again.
- By switching the Python version badge to a hard-coded image, you’ll need to remember to update it manually for future releases; you might want to either keep a dynamic badge or add a single source of truth (e.g., reuse the `requires-python` value) to reduce the chance of it drifting out of sync.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
CI fix
The README header trim (#6) replaced the literal phrase
nine feature areaswithnine major sections, buttests/test_gmi_module.py::test_gmi_docs_and_package_data_are_canonicalpins that phrase — the sole pytest failure on 3.11/3.12/3.13. Updates the assertion to match the current wording (verified locally against the real files).Python 3.11+ alignment
requires-pythonand the CI matrix were already 3.11+; this aligns the docs/metadata:Supported Python: >=3.11, SpatialPerturb extra onPython 3.11+, and a static3.11 | 3.12 | 3.13Python badge. (The dynamic PyPIpyversionsbadge showed 3.8–3.13 because it reflects the published 0.4.6 metadata; it would only refresh on the next release.)pyproject.toml: perturb extra marker bumped topython_version >= '3.11'.Housekeeping
.gitignore: ignore local.claude/agent tooling.🤖 Generated with Claude Code
Summary by Sourcery
使文档和测试中声明的 Python 支持版本与现有的 3.11+ 要求保持一致,并修复由于 README 描述变更而导致的 CI 回归问题。
Bug Fixes(错误修复):
Enhancements(功能改进):
Chores(日常维护):
.claude/工具产物。Original summary in English
Summary by Sourcery
Align documented and tested Python support with the existing 3.11+ requirement and fix the CI regression caused by a README wording change.
Bug Fixes:
Enhancements:
Chores:
.claude/tooling artifacts in version control.