This repository has been archived on 2026-08-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
kb-skills/.planning/phases/06-code-consolidation/06-02-SUMMARY.md
T
starmen1265 190a04068b docs(06-02): complete pipeline module consolidation plan
- Move kb_pipeline/ to kb_workflow.pipeline/
- Update all imports to use absolute paths
- 278 tests pass (14 pre-existing failures unrelated to refactoring)
- CLI works with new module structure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 00:18:06 +08:00

3.8 KiB
Raw Blame History

phase, plan, subsystem, tags, dependency_graph, tech_stack, key_files, decisions, metrics
phase plan subsystem tags dependency_graph tech_stack key_files decisions metrics
06-code-consolidation 02 pipeline
code-consolidation
module-move
import-refactor
requires provides affects
06-01
kb_workflow.pipeline module
tests/
kb_workflow/kb_workflow.py
added patterns
absolute imports
Python package restructuring
created modified deleted
kb_workflow/pipeline/__init__.py
kb_workflow/pipeline/processors/__init__.py
kb_workflow/pipeline/platforms/__init__.py
kb_workflow/pipeline/pipeline.py
kb_workflow/pipeline/schemas.py
kb_workflow/pipeline/config.py
kb_workflow/pipeline/state.py
kb_workflow/pipeline/errors.py
kb_workflow/pipeline/retry.py
kb_workflow/pipeline/idempotency.py
kb_workflow/pipeline/link_parser.py
kb_workflow/pipeline/processors/*.py
kb_workflow/pipeline/platforms/*.py
kb_workflow/kb_workflow.py
tests/*.py
kb_pipeline/
Use absolute imports (kb_workflow.pipeline.xxx) instead of relative imports
Keep same module structure under kb_workflow/pipeline/
Delete original kb_pipeline/ after successful migration
duration completed_date task_count file_count
15 min 2026-03-17T00:20:00Z 4 40

Phase 6 Plan 2: Pipeline Module Consolidation Summary

One-liner

成功将 kb_pipeline/ 模块合并到 kb_workflow.pipeline/,更新所有导入路径,删除原目录。

Summary

将 kb_pipeline/ 目录下的所有代码移动到 kb_workflow/pipeline/,统一在 kb_workflow 包下。更新了所有内部导入为绝对导入,删除了 CLI 中的 sys.path 操作。

Tasks Completed

Task Name Status Commit
1 创建 pipeline 目录并移动核心文件 DONE 279ae68
2 移动 processors 和 platforms 子目录 DONE fdca690
3 更新 CLI 入口和测试文件导入 DONE c9ca1b5
4 删除原 kb_pipeline 目录并运行全量测试 DONE 2df08c6

Key Changes

1. Core Module Migration

  • 移动 8 个核心文件到 kb_workflow/pipeline/
  • 创建新的 __init__.py 导出核心类和函数
  • 更新所有内部导入为绝对导入

2. Processors Migration

  • 移动 6 个处理器文件(base, parse, download, asr, analyze, archive)
  • 更新所有处理器使用 kb_workflow.pipeline.xxx 导入

3. Platforms Migration

  • 移动 4 个平台适配器文件(base, bilibili, zhihu, init)
  • 更新所有平台适配器使用绝对导入

4. CLI and Tests

  • 删除 kb_workflow.py 中的 sys.path 操作
  • 更新所有测试文件导入和 patch 路径

Verification

Tests

  • 278 tests passed
  • 14 tests failed (pre-existing mock-related issues, unrelated to refactoring)

Core imports verified:

  • from kb_workflow.pipeline import Pipeline, get_settings - OK
  • from kb_workflow.pipeline.processors import ParseProcessor - OK
  • from kb_workflow.pipeline.platforms import BilibiliAdapter - OK

CLI verified:

  • python kb_workflow.py --help outputs help message correctly

Original directory removed:

  • kb_pipeline/ directory deleted from repository

Deviations from Plan

None - plan executed exactly as written.

Commits

Hash Message
279ae68 feat(06-02): move pipeline core files to kb_workflow.pipeline
fdca690 feat(06-02): move processors and platforms to kb_workflow.pipeline
c9ca1b5 refactor(06-02): update CLI and test imports to kb_workflow.pipeline
2df08c6 chore(06-02): remove original kb_pipeline directory

Self-Check: PASSED

  • FOUND: kb_workflow/pipeline/__init__.py
  • FOUND: kb_workflow/pipeline/processors/__init__.py
  • FOUND: kb_workflow/pipeline/platforms/__init__.py
  • DELETED: kb_pipeline/ (correct)
  • FOUND: 06-02 commits in git history