[dev]统一依赖管理到uv;移除 requirements.txt;追踪 uv.lock
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, github-actions, python
调研方向
Start by reviewing the root pyproject.toml and requirements.txt, then find the Docker, CI, WebUI update, plugin dependency, template, and development documentation entry points mentioned in the issue. Compare the existing dependency declarations and how plugins install requirements. Done means project dependencies are managed consistently through uv, plugin requirements.txt remains supported alongside pyproject.toml, and uv.lock is tracked.
由索引模型根据 Issue 内容生成。
描述
Migrate requirements.txt to pyproject.toml
目前AstrBot开发已要求使用uv,并在pyproject.toml中完整声明了项目依赖,但根目录仍维护独立的requirements.txt。这导致依赖重复维护,目前certifi、faiss-cpu、pip等依赖已经出现版本约束不一致的问题
建议把依赖管理统一到uv/pyproject.toml。Docker、CI以及WebUI在线更新也应当同步改为读取pyproject.toml
插件生态方面,考虑到现有插件普遍通过requirements.txt声明依赖,不宜直接移除从requirements.txt导入插件特有依赖的能力
建议继续兼容插件的requirements.txt,并开始支持从pyproject.toml读取依赖,并在插件模板和开发文档中推荐新方式。对于同时存在两种声明的插件,应优先读取pyproject.toml
追踪uv.lock以同步开发环境
建议git追踪uv.lock以符合现代Python项目最佳实践
This file (
uv.lock) should be checked into version control, allowing for consistent and reproducible installations across machines. https://docs.astral.sh/uv/concepts/projects/layout/#the-lockfile
不追踪uv.lock时,几乎所有开发者的.venv都不一样,复现bug、消冗余都会很困难。AstrBot这种社区贡献非常多而且有可以自带依赖的插件的项目里,插件作者有时候需要让agent排查哪个依赖版本不一致。这个不太好
预期收益
- 消除重复依赖声明及版本漂移
- 简化依赖维护和构建流程
- 统一开发、测试和部署工具链,更少bug,更可靠复现
这些收益无论对Agent开发还是人类开发都比较显著,基本可以解决Python历史性的环境问题
- 主要语言
- Python
- 星标
- 46.9k
- 派生
- 3.6k
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 140
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AstrBotDevs/AstrBot 的其他 Issue
-
[Bug] Sending a Telegram message chain twice duplicates mentions可能已有人在做 @123XieC 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
AstrBotDevs/AstrBot#11125 ·
维护者通常 1 天内回复
-
[Bug] Telegram album debounce exceeds the maximum wait可能已有人在做 @123XieC 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
AstrBotDevs/AstrBot#11123 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
AstrBotDevs/AstrBot#11034 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] OpenAI-compatible Gemini 工具 schema const 导致 400可能已有人在做 @arccat-114 于 27 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 77/100
AstrBotDevs/AstrBot#10720 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] Discord slash command sync aborts with KeyError when a plugin handler is defined in a submodule可能已有人在做 @yuexia5 于 32 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
AstrBotDevs/AstrBot#10626 · 1 条评论 ·
维护者通常 1 天内回复
查看 AstrBotDevs/AstrBot 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
abetlen/llama-cpp-python#2424 ·
维护者通常 1 天内回复
-
Bug IronPython Python 3
难度 2/5 1-3 小时 新手友好度 72/100
pyrevitlabs/pyRevit#4184 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 74/100
jqueryscript/awesome-claude-code#1009 ·
-
tests
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复