upgrade-python-deps

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Your task

你的任务

Upgrade all Python dependencies and verify nothing is broken.
升级所有Python依赖并验证没有功能损坏。

Step 1: Upgrade the lock file

步骤1:升级锁文件

Run
uv lock --upgrade
to upgrade all dependencies to their latest compatible versions.
Review the output for any resolution errors. If there are conflicts, report them to the user and ask how to proceed before continuing.
运行
uv lock --upgrade
将所有依赖升级到其最新兼容版本。
检查输出是否存在解析错误。如果出现冲突,请向用户报告并在继续前询问后续处理方式。

Step 2: Sync the environment

步骤2:同步环境

Run
uv sync
to install the upgraded dependencies into the virtual environment.
运行
uv sync
将升级后的依赖安装到虚拟环境中。

Step 3: Run post-upgrade checks

步骤3:运行升级后检查

Run these checks sequentially, stopping if any step fails:
  • Type checking: Run
    uv run mypy .
    and report any new type errors. These may be caused by updated type stubs or changes in library APIs.
  • Tests: Run
    make test
    to verify the test suite still passes.
依次运行以下检查,任意步骤失败则停止执行:
  • 类型检查:运行
    uv run mypy .
    并报告所有新出现的类型错误。这些错误可能是由类型存根更新或库API变更导致的。
  • 测试:运行
    make test
    验证测试套件仍可正常通过。

Step 4: Summarize and commit

步骤4:总结并提交

Summarize what was done:
  • Which packages were upgraded (notable version changes)
  • Whether any type errors were introduced
  • Whether all tests passed
  • Any issues that need manual attention
If there were failures, present the issues and ask how the user wants to proceed.
If everything passed, ask the user if they'd like to commit the changes. If yes, commit using the
/commit
skill.
总结已完成的操作:
  • 哪些包被升级(值得关注的版本变更)
  • 是否引入了新的类型错误
  • 是否所有测试都通过
  • 任何需要人工处理的问题
如果出现失败,请展示问题并询问用户希望如何处理。
如果所有检查都通过,询问用户是否需要提交变更。如果同意,使用
/commit
skill 进行提交。