Skip to content

fix: green CI and align README Python version to 3.11+#8

Merged
hutaobo merged 1 commit into
mainfrom
claude/zen-ishizaka-19fb62
Jun 12, 2026
Merged

fix: green CI and align README Python version to 3.11+#8
hutaobo merged 1 commit into
mainfrom
claude/zen-ishizaka-19fb62

Conversation

@hutaobo

@hutaobo hutaobo commented Jun 12, 2026

Copy link
Copy Markdown
Owner

CI fix

The README header trim (#6) replaced the literal phrase nine feature areas with nine major sections, but tests/test_gmi_module.py::test_gmi_docs_and_package_data_are_canonical pins 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-python and the CI matrix were already 3.11+; this aligns the docs/metadata:

  • README: Supported Python: >=3.11, SpatialPerturb extra on Python 3.11+, and a static 3.11 | 3.12 | 3.13 Python badge. (The dynamic PyPI pyversions badge 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 to python_version >= '3.11'.

Housekeeping

  • .gitignore: ignore local .claude/ agent tooling.

🤖 Generated with Claude Code

Summary by Sourcery

使文档和测试中声明的 Python 支持版本与现有的 3.11+ 要求保持一致,并修复由于 README 描述变更而导致的 CI 回归问题。

Bug Fixes(错误修复):

  • 更新 canonical-docs 测试以匹配当前 README 的表述,从而保证在 Python 3.11+ 上 CI 能通过。

Enhancements(功能改进):

  • 在 README 中将 Python 支持版本记录为 3.11+,并改为使用静态的 3.11–3.13 徽章。
  • 收紧 SpatialPerturb 可选依赖,使其仅在 Python 3.11+ 环境中安装。

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:

  • Update canonical-docs test to match the current README wording so CI passes on Python 3.11+.

Enhancements:

  • Document Python support as 3.11+ in the README and switch to a static 3.11–3.13 badge.
  • Tighten the SpatialPerturb optional dependency to only install on Python 3.11+.

Chores:

  • Ignore local .claude/ tooling artifacts in version control.

- 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>
Copilot AI review requested due to automatic review settings June 12, 2026 14:25
@hutaobo hutaobo merged commit 30dbf73 into main Jun 12, 2026
8 checks passed
@sourcery-ai

sourcery-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
审阅者指南(在小型 PR 上折叠)

审阅者指南

将文档和元数据中的 Python 支持对齐为 3.11+,修复一个 CI 测试断言以匹配当前 README 的用语,并在 .gitignore 中增加一条小的日常维护项。

文件级变更

变更 详情 文件
将文档和可选依赖的 Python 版本支持与现有的 3.11+ 工具配置对齐。
  • 将动态的 PyPI pyversions 徽章替换为静态徽章,明确列出 Python 3.11、3.12 和 3.13。
  • 将 README 中支持的 Python 版本说明从 >=3.8 更新为 >=3.11。
  • 将 SpatialPerturb bridge 的 README 描述从 Python 3.9+ 更新为 Python 3.11+。
  • 提升 perturb 可选依赖标记,要求 python_version >= '3.11'。
README.md
pyproject.toml
通过将规范化测试与当前 README 文案对齐来修复 CI 失败。
  • 调整 canonical docs/package-data 测试,使其断言 “nine major sections” 而不是 “nine feature areas”,以匹配当前 README 内容。
tests/test_gmi_module.py
在 git 中忽略本地 AI/agent 工具产物。
  • 在 .gitignore 中添加 .claude/ 目录,以避免提交本地 agent 工具文件。
.gitignore

提示与命令

与 Sourcery 交互

  • 触发一次新的审查: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论生成 GitHub issue: 在审查评论下回复,请求 Sourcery 从该评论创建 issue。你也可以在审查评论下回复 @sourcery-ai issue 来从中创建 issue。
  • 生成 pull request 标题: 在 pull request 标题的任意位置写上 @sourcery-ai,即可随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 的正文任意位置写上 @sourcery-ai summary,即可在你想要的位置随时生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 来(重新)生成摘要。
  • 生成审阅者指南: 在 pull request 中评论 @sourcery-ai guide,即可在任意时间(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,即可将所有 Sourcery 评论标记为已解决。如果你已经处理完所有评论且不希望再看到它们,这会很有用。
  • 撤销所有 Sourcery 审查: 在 pull request 中评论 @sourcery-ai dismiss,即可撤销所有现有的 Sourcery 审查。若你想从一次全新的审查开始,这尤其有用——别忘了再评论 @sourcery-ai review 来触发新的审查!

自定义你的使用体验

访问你的 控制面板 以:

  • 启用或禁用审查功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。
  • 更改审查语言。
  • 添加、移除或编辑自定义审查指令。
  • 调整其他审查设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Aligns 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

Change Details Files
Align documented and optional-dependency Python version support with existing 3.11+ tooling configuration.
  • Replaced dynamic PyPI pyversions badge with a static badge explicitly listing Python 3.11, 3.12, and 3.13.
  • Updated README supported Python text from >=3.8 to >=3.11.
  • Updated SpatialPerturb bridge README wording from Python 3.9+ to Python 3.11+.
  • Raised the perturb optional dependency marker to require python_version >= '3.11'.
README.md
pyproject.toml
Fix CI failure by syncing the canonicalization test with current README wording.
  • Adjusted the canonical docs/package-data test to assert on 'nine major sections' instead of 'nine feature areas' to match the current README content.
tests/test_gmi_module.py
Ignore local AI/agent tooling artifacts in git.
  • Added .claude/ directory to .gitignore to avoid committing local agent tooling files.
.gitignore

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 perturb extra’s environment marker to python_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.

@sourcery-ai sourcery-ai 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.

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.

Sourcery 对开源项目是免费的——如果你觉得我们的评审对你有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈不断改进评审质量。
Original comment in English

Hey - I've left some high level feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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