Skip to content

chore: migrate to modernized package management and unify lint/format/test toolchain#1

Merged
Electricitysheep merged 2 commits into
Electricitysheep:mainfrom
Menghuan1918:main
May 10, 2026
Merged

chore: migrate to modernized package management and unify lint/format/test toolchain#1
Electricitysheep merged 2 commits into
Electricitysheep:mainfrom
Menghuan1918:main

Conversation

@Menghuan1918

Copy link
Copy Markdown
Contributor

Changes

Package Management: setuptools + pip → uv

  • Added uv.lock locking 169 dependencies to ensure CI reproducibility
  • Added .python-version (Python 3.10)
  • CI/CD workflows now use astral-sh/setup-uv + uv sync --extra dev / uv build
  • CONTRIBUTING.md updated with uv commands

Toolchain Standardization

  • Format: Enabled ruff format (replacing black/isort, same tool as lint)
  • Commit checks: Added .pre-commit-config.yaml (ruff + ruff-format hooks)
  • Testing: pytest-cov included as dev dependency, no longer manually installed in CI
  • Unified formatting across all 28 source files (ruff format)

Fixes

  • Added .coverage to .gitignore (pytest-cov runtime data file)
  • Fixed 2 unused variables in self_test.py (F841)

变更内容

包管理:setuptools + pip → uv

  • 添加 uv.lock 锁定 169 个依赖,确保 CI 可重现
  • 添加 .python-version(Python 3.10)
  • CI/CD 工作流改用 astral-sh/setup-uv + uv sync --extra dev / uv build
  • CONTRIBUTING.md 更新为 uv 命令

工具链标准化

  • Format: 启用 ruff format(取代 black/isort,与 lint 同工具)
  • 提交检查: 添加 .pre-commit-config.yaml(ruff + ruff-format hooks)
  • 测试: pytest-cov 纳入 dev 依赖,不再在 CI 中手动安装
  • 统一格式化全部 28 个源文件(ruff format

修复

  • .gitignore 添加 .coverage(pytest-cov 运行时数据文件)
  • self_test.py 修复 2 处未使用变量(F841)

详细介绍 pdf-pilot 的功能、安装方式、CLI 和 Python API 使用方法,以及引擎自动选择策略。
- 添加 .python-version 文件指定 Python 3.10
- 在 .gitignore 中忽略 .coverage 文件
- 添加 pre-commit 配置以在提交前自动运行 ruff 格式化和检查
- 更新 pyproject.toml 开发依赖,添加 pytest-cov 和 pre-commit,并配置 ruff 格式化规则
- 更新 GitHub Actions 工作流以使用 uv 进行依赖管理和构建
- 统一代码库的代码风格,包括格式化长行、调整导入顺序、添加空行等
- 更新 CONTRIBUTING.md 文档以反映新的 uv 工作流程
@Electricitysheep
Electricitysheep merged commit 24421a5 into Electricitysheep:main May 10, 2026
0 of 6 checks passed
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