Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧑‍💻 从 pdm 迁移到 uv #77

Merged
merged 1 commit into from
Oct 23, 2024
Merged

🧑‍💻 从 pdm 迁移到 uv #77

merged 1 commit into from
Oct 23, 2024

Conversation

A-kirami
Copy link
Owner

@A-kirami A-kirami commented Oct 23, 2024

这个 PR 带来了什么样的更改?

  • 错误修复
  • 新功能
  • 文档/注释
  • 代码格式
  • 代码重构
  • 测试用例
  • 性能优化
  • 外观样式
  • 项目构建
  • 依赖环境
  • 持续集成/部署
  • 其他,请描述:

这个 PR 是否存在破坏性变更?

  • 是的,并已在 issue #___ 号中获得批准
  • 没有

描述

动机和背景

其他信息

检查工作

  • 我对我的代码进行了注释,特别是在难以理解的部分
  • 我的更改需要更新文档,并且已对文档进行了相应的更改
  • 我添加了测试并且已经在本地通过,以证明我的修复补丁或新功能有效
  • 我已检查并确保更改没有与其他打开的 Pull Requests 重复

Copy link

sourcery-ai bot commented Oct 23, 2024

审核指南 by Sourcery

此拉取请求将项目从使用 PDM(Python Development Master)迁移到 UV(Ultrafast Virtualenv)进行依赖管理和构建过程。更改主要影响 GitHub Actions 工作流和项目的贡献指南。

未生成图表,因为更改看起来简单,不需要视觉表示。

文件级更改

更改 详情 文件
在 GitHub Actions 工作流中用 UV 替换 PDM
  • 更新 pyright.yml 工作流以使用 UV 进行依赖安装
  • 更改设置步骤以安装 UV 并使用它同步依赖
  • 更新 release.yml 工作流以使用 UV 进行构建和发布
  • 从 'pdm build' 切换到 'uv build --no-sources' 进行分发构建
  • 从 'pdm publish' 更改为 'uv publish' 发布到 PyPI
.github/workflows/pyright.yml
.github/workflows/release.yml
更新 Pyright 操作配置
  • 将 jakebailey/pyright-action 从 v1 升级到 v2
  • 添加配置以使用最新的 Pylance 版本
.github/workflows/pyright.yml
修改贡献指南以反映切换到 UV
  • 更新使用 UV 而不是 PDM 安装依赖的说明
.github/CONTRIBUTING.md

提示和命令

与 Sourcery 互动

  • 触发新审核: 在拉取请求中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审核评论。
  • 从审核评论生成 GitHub 问题: 通过回复审核评论请求 Sourcery 创建问题。
  • 生成拉取请求标题: 在拉取请求标题的任何地方写 @sourcery-ai 以随时生成标题。
  • 生成拉取请求摘要: 在拉取请求正文的任何地方写 @sourcery-ai summary 以随时生成 PR 摘要。您也可以使用此命令指定摘要应插入的位置。

自定义您的体验

访问您的仪表板以:

  • 启用或禁用审核功能,例如 Sourcery 生成的拉取请求摘要、审核指南等。
  • 更改审核语言。
  • 添加、删除或编辑自定义审核说明。
  • 调整其他审核设置。

获取帮助

Original review guide in English

Reviewer's Guide by Sourcery

This pull request migrates the project from using PDM (Python Development Master) to UV (Ultrafast Virtualenv) for dependency management and build processes. The changes primarily affect GitHub Actions workflows and the project's contribution guide.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Replaced PDM with UV in GitHub Actions workflows
  • Updated pyright.yml workflow to use UV for dependency installation
  • Changed setup steps to install UV and use it for syncing dependencies
  • Updated release.yml workflow to use UV for building and publishing
  • Switched from 'pdm build' to 'uv build --no-sources' for building distributions
  • Changed from 'pdm publish' to 'uv publish' for publishing to PyPI
.github/workflows/pyright.yml
.github/workflows/release.yml
Updated Pyright action configuration
  • Upgraded jakebailey/pyright-action from v1 to v2
  • Added configuration to use the latest Pylance release
.github/workflows/pyright.yml
Modified contribution guide to reflect the switch to UV
  • Updated instructions for installing dependencies using UV instead of PDM
.github/CONTRIBUTING.md

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

@A-kirami - 我已经审查了你的更改 - 这里有一些反馈:

总体评论

  • 从 pdm 到 uv 的迁移看起来实现得很好。不过,你能否提供更多关于此更改动机的背景信息,以及对开发工作流程的预期好处或潜在影响?
  • 考虑添加文档或更新 PR 描述,以解释切换到 uv 的理由以及贡献者适应此更改所需的步骤。
这是我在审查期间查看的内容
  • 🟢 一般问题:一切看起来都很好
  • 🟢 安全性:一切看起来都很好
  • 🟢 测试:一切看起来都很好
  • 🟢 复杂性:一切看起来都很好
  • 🟡 文档:发现 1 个问题

Sourcery 对开源项目免费 - 如果你喜欢我们的评论,请考虑分享它们 ✨
帮助我变得更有用!请点击每条评论上的 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English

Hey @A-kirami - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The migration from pdm to uv looks well-implemented. However, could you please provide more context on the motivation for this change and any expected benefits or potential impacts on the development workflow?
  • Consider adding documentation or updating the PR description to explain the rationale behind switching to uv and any necessary steps for contributors to adapt to this change.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

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.

@@ -62,7 +62,7 @@

如果你不想使用代码空间或者开发容器,你可以在本地环境中开发。

KiramiBot 使用 [pdm](https://pdm.fming.dev/) 管理项目依赖。请确保你已经安装了 pdm,然后在项目根目录下运行 `pdm install` 安装依赖。
KiramiBot 使用 [uv](https://docs.astral.sh/uv/) 管理项目依赖。请确保你已经安装了 uv,然后在项目根目录下运行 `uv sync` 安装依赖。
Copy link

Choose a reason for hiding this comment

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

suggestion (documentation): 考虑添加安装 uv 的说明

提供一个安装 uv 的链接或命令可能会有所帮助,类似于之前版本提到的 pdm。这将使新贡献者更容易入门。

Original comment in English

suggestion (documentation): Consider adding instructions for installing uv

It might be helpful to provide a link or command for installing uv, similar to how the previous version mentioned pdm. This would make it easier for new contributors to get started.

Suggested change
KiramiBot 使用 [uv](https://docs.astral.sh/uv/) 管理项目依赖。请确保你已经安装了 uv,然后在项目根目录下运行 `uv sync` 安装依赖。
KiramiBot 使用 [uv](https://docs.astral.sh/uv/) 管理项目依赖。请按照 [uv 安装指南](https://github.com/astral-sh/uv#installation) 安装 uv。安装完成后,在项目根目录下运行 `uv sync` 安装依赖。
如果你使用 pip,可以通过以下命令安装 uv:

pip install uv

@A-kirami A-kirami merged commit 95a166b into main Oct 23, 2024
4 checks passed
@A-kirami A-kirami deleted the migrate-to-uv branch October 23, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant