Revert "[U] Wrap into uv tool."

This reverts commit ca9e32763e.
This commit is contained in:
2026-04-15 13:05:45 +08:00
parent ca9e32763e
commit 1bc74cbd1b
14 changed files with 426 additions and 837 deletions

View File

@@ -35,7 +35,6 @@ config-man/
│ └── test_data/ # 测试数据目录
├── docs/ # 文档目录
│ ├── README.md # 文档说明
│ ├── uv-tool.md # uv tool 使用与发布说明
│ ├── USAGE.md # 使用说明
│ ├── progress-tracker.md # 进度跟踪
│ ├── requirements.md # 需求文档
@@ -111,7 +110,7 @@ config-man/
### 4. 标准化
- 遵循Python项目标准结构
- 使用现代Python工具链
- 支持 `uv tool` 分发和标准包构建
- 支持pip安装和开发模式
## 开发工作流
@@ -126,46 +125,40 @@ config-man/
### 2. 运行测试
```bash
# 运行所有测试
uv run pytest
pytest
# 运行单元测试
uv run pytest tests/unit/
pytest tests/unit/
# 运行集成测试
uv run pytest tests/integration/
pytest tests/integration/
# 生成覆盖率报告
uv run pytest --cov=src/config_man
pytest --cov=src/config_man
```
### 3. 代码质量检查
```bash
# 代码格式化
uv run black src/ tests/
black src/ tests/
# 类型检查
uv run mypy src/
mypy src/
# 代码检查
uv run flake8 src/ tests/
flake8 src/ tests/
```
### 4. 安装和发布
```bash
# 从源码临时运行 CLI
uv tool run --from . config-man --help
# 安装为本地工具
uv tool install --from . config-man
# 开发模式安装
pip install -e .
# 构建包
uv build
python -m build
# 验证 wheel 产物
uv tool run --from dist/*.whl config-man --help
# 发布到包索引(按你的发布方式选择)
uv publish
# 发布到PyPI
twine upload dist/
```
## 最佳实践
@@ -184,7 +177,6 @@ uv publish
- 代码和文档同步更新
- 提供完整的使用示例
- 保持文档结构清晰
- 优先保证 `README.md``docs/uv-tool.md``docs/USAGE.md` 中的命令入口一致
### 4. 版本控制
- 合理的.gitignore配置