refactor: split gui into package
This commit is contained in:
+6
-1
@@ -1029,4 +1029,9 @@
|
||||
## 【2026-07-02】T-522 完成 · CI 自动跑语法 + 单元 / GUI 测试
|
||||
- 配置:新增 `.github/workflows/tests.yml`,在 push / pull_request 上使用 `windows-latest` + Python 3.11,安装 `requirements.txt`,设置 `QT_QPA_PLATFORM=offscreen`,运行 `python -m compileall app main.py` 与 `python -m unittest discover -s tests`。
|
||||
- 文档:同步 `docs/03-tech-stack.md`、`docs/README.md`、`docs/current-state.md`;`docs/06-tasks.md` 将 T-522 标为 DONE,下一个可领取任务更新为 T-523。
|
||||
- 验证:`python -m compileall app main.py` 通过;`python -m unittest discover -s tests` 通过(159 tests);`git diff --check` 无空白错误(仅 LF/CRLF 提示)。本地未执行 GitHub Actions 远端 runner,workflow 已按同等命令配置。
|
||||
- 验证:`python -m compileall app main.py` 通过;`python -m unittest discover -s tests` 通过(159 tests);`git diff --check` 无空白错误(仅 LF/CRLF 提示)。本地未执行 GitHub Actions 远端 runner,workflow 已按同等命令配置。
|
||||
## 【2026-07-02】T-523 完成 · 拆分 app/gui.py 为 app/gui/ 包
|
||||
- 代码:删除旧 `app/gui.py`,新增 `app/gui/` 包;`__init__.py` 保持 `from app import gui`、`from app.gui import MainWindow/各 Tab/各 Worker` 等旧导入兼容;`main_window.py` 放 `MainWindow`;`models.py` 放 3 个 TableModel;`widgets.py` 放 Qt 导入、语义色板、空状态卡、批次总览和日志 helper;`workers.py` 放 `GenerateWorker`/`ApplyWorker`/`CollectWorker`/`WriteBackWorker`/`AccountLoginCheckWorker`/`AIModelTestWorker`;`tabs/` 按 ①~⑤ 拆分各 Tab。
|
||||
- 边界:纯结构重构;未改 Shopee/CDP、AI、DB、Excel 行为;PySide6 缺失时仍由 `main()` 返回 1 并提示,旧公开导入路径继续可用。
|
||||
- 文档:同步 `docs/04-architecture.md`、`docs/api.md`、`docs/current-state.md`;`docs/06-tasks.md` 将 T-523 标为 DONE,下一个可领取任务更新为 T-524。
|
||||
- 验证:`python -m compileall app main.py` 通过;`python -m unittest discover -s tests -p "test_gui.py"` 通过(70 tests);`python -m unittest discover -s tests` 通过(159 tests)。
|
||||
Reference in New Issue
Block a user