Skip to content

Commit 95ed795

Browse files
author
shijiashuai
committed
refactor: 终极重构 - 清理冗余、锁定依赖、增强CI
### Fixed - 删除重复的 deduplicator.py 文件 (src/deduplicator.py, src/core/deduplicator.py) - 修复 CI 中未执行 mypy/bandit/coverage 的问题 - 锁定依赖版本确保可重复构建 (使用 ~= 约束) ### Removed - 删除遗留目录 (agent/, _bmad/, _bmad-output/) - 删除临时配置文件 (config_temp.json) - 删除重复的 docs/index.md - 精简 OpenSpec 归档 (保留最新的 2026-04-26) ### Changed - 增强 CI 工作流:添加 mypy 类型检查、bandit 安全检查、覆盖率报告 - 添加 Dependabot 支持 GitHub Actions 更新 - pre-commit 配置添加 mypy 检查
1 parent 29724fb commit 95ed795

27 files changed

Lines changed: 309 additions & 4239 deletions

File tree

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@ updates:
2020
labels:
2121
- "dependencies"
2222
- "documentation"
23+
24+
- package-ecosystem: "github-actions"
25+
directory: "/"
26+
schedule:
27+
interval: "monthly"
28+
open-pull-requests-limit: 1
29+
labels:
30+
- "dependencies"
31+
- "ci"
32+
commit-message:
33+
prefix: "ci"
34+
include: "scope"

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ jobs:
4040
- name: Flake8
4141
run: python -m flake8 src/ main.py --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics
4242

43+
- name: Type check (mypy)
44+
run: python -m mypy src/ --ignore-missing-imports
45+
46+
- name: Security check (bandit)
47+
run: python -m bandit -r src/ -c pyproject.toml -ll
48+
4349
- name: Runtime path baseline
4450
run: python -m pytest -q tests/test_runtime_paths.py
4551

@@ -68,7 +74,14 @@ jobs:
6874
python -m pip install ".[dev]"
6975
7076
- name: Run test suite
71-
run: python -m pytest -q
77+
run: python -m pytest -q --cov=src --cov-report=xml --cov-report=term-missing
78+
79+
- name: Upload coverage report
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: coverage-report-${{ matrix.python-version }}
83+
path: coverage.xml
84+
retention-days: 7
7285

7386
build:
7487
name: Build package

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ repos:
3838
- id: isort
3939
args: ["--profile", "black"]
4040

41+
# ====================
42+
# Type Checking
43+
# ====================
44+
- repo: https://github.com/pre-commit/mirrors-mypy
45+
rev: v1.10.0
46+
hooks:
47+
- id: mypy
48+
args: [--ignore-missing-imports]
49+
additional_dependencies: [types-requests, types-PyYAML]
50+
4151
# ====================
4252
# Linting
4353
# ====================

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,24 @@ This file keeps a **small maintained release record** for CleanBook. Detailed hi
44

55
## [Unreleased]
66

7+
## [2.0.2] - 2026-04-28
8+
9+
### Fixed
10+
- 删除重复的 deduplicator.py 文件 (src/deduplicator.py, src/core/deduplicator.py)
11+
- 修复 CI 中未执行 mypy/bandit/coverage 的问题
12+
- 锁定依赖版本确保可重复构建 (使用 ~= 约束)
13+
14+
### Removed
15+
- 删除遗留目录 (agent/, _bmad/, _bmad-output/)
16+
- 删除临时配置文件 (config_temp.json)
17+
- 删除重复的 docs/index.md
18+
- 精简 OpenSpec 归档 (保留最新的 2026-04-26)
19+
720
### Changed
8-
- Repository closeout normalization in progress: governance, docs surface, workflows, packaging, and runtime validation are being simplified around the maintained CLI product.
21+
- 增强 CI 工作流:添加 mypy 类型检查、bandit 安全检查、覆盖率报告
22+
- 添加 Dependabot 支持 GitHub Actions 更新
23+
- pre-commit 配置添加 mypy 检查
24+
- 更新 GitHub 仓库描述和 topics
925

1026
## Recent Releases
1127

0 commit comments

Comments
 (0)