Files
study-tool/pyproject.toml
T
study-tool aa48145557 feat: 故障推送 / 公需课自动重学 / 插件解耦,发版 v0.0.8
体检修复:启动日志不再打印 AUTH_TOKEN、密钥可清空、推送失败不占整段冷却、目录名与文案统一成 plugins/。
2026-11-01 17:47:22 +08:00

66 lines
1.7 KiB
TOML

[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "study-tool"
version = "0.0.8"
description = "东莞市教师培训平台多账号学习控制台"
requires-python = ">=3.10"
dependencies = [
"fastapi>=0.110",
"uvicorn>=0.27",
"requests>=2.31",
"beautifulsoup4>=4.12",
"lxml>=5.0",
"playwright>=1.40",
"ddddocr",
"python-dotenv>=1.0",
"sqlalchemy>=2.0",
]
[project.scripts]
study-tool = "study_tool.app:main"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]
# 国内镜像:uv 默认走阿里云源,不再直连 pypi.org。
# 换源:UV_DEFAULT_INDEX=https://mirrors.cloud.tencent.com/pypi/simple uv sync
# 想回官方:UV_DEFAULT_INDEX=https://pypi.org/simple uv sync
# (清华源 pypi.tuna.tsinghua.edu.cn 会 403 uv 的 JSON simple 请求,别用)
[[tool.uv.index]]
name = "aliyun"
url = "https://mirrors.aliyun.com/pypi/simple"
default = true
[tool.ruff]
line-length = 120
extend-exclude = ["static", "web"]
# 只拦真正的错误(语法 / 未定义名 / 未用导入);历史模块仍有 star import,先不拦 F403 / F405
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F"]
ignore = ["F403", "F405"]
# 发版:uv tool run bump-my-version bump patch(工作区需干净),自动改 metadata.yaml、提交并打 tag
[tool.bumpversion]
current_version = "0.0.8"
commit = true
tag = true
tag_name = "v{new_version}"
message = "chore(release): v{new_version}"
[[tool.bumpversion.files]]
filename = "metadata.yaml"
search = "version: {current_version}"
replace = "version: {new_version}"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = '(?m)^version = "{current_version}"$'
replace = 'version = "{new_version}"'