Gather the CLI command modules into a commands sub-package
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -245,3 +245,11 @@
|
||||
故檔案可再生,依 commit 判準不進 git(且含歌詞全文,
|
||||
版權亦不許);固定匯出全部歌曲,缺歌詞即失敗;單一
|
||||
位置引數收輸出檔路徑,文件範例輸出至 `tools/instance/`。
|
||||
- **指令模組集中為 `commands` sub-package**:五個子命令模組
|
||||
移入 `pop_fem_audit_tools.commands`,`__init__` 以
|
||||
`from .run_llm import main as run_llm_command` 逐條登記為
|
||||
指令清單,`__main__` 只消費此 façade;`_command` 後綴避免
|
||||
與子模組同名遮蔽,測試仍以模組屬性風格使用;基礎設施模組
|
||||
(config/database/models/utils)留頂層。理由:「指令
|
||||
vs 共用底層」由目錄結構直接表達,與「哪個函式屬哪個工作」
|
||||
的歸屬原則同型。
|
||||
|
||||
+14
-13
@@ -34,21 +34,22 @@ pop-fem-audit/
|
||||
│ │ # gitignored;含歌詞全文)
|
||||
│ ├── src/pop_fem_audit_tools/
|
||||
│ │ ├── __main__.py # 套件 CLI 進入點(分派子命令)
|
||||
│ │ ├── build_db.py # build the SQLite working store
|
||||
│ │ │ # from the inputs
|
||||
│ │ ├── config.py # pydantic-settings 設定(.env)
|
||||
│ │ ├── database.py # SQLAlchemy engine / session / Base
|
||||
│ │ ├── export_llm_input.py # export the LLM input JSONL
|
||||
│ │ │ # (lyrics only) from the working
|
||||
│ │ │ # store
|
||||
│ │ ├── fetch_artists.py # fetch artist metadata from
|
||||
│ │ │ # Wikidata into the snapshot CSV
|
||||
│ │ ├── fetch_lyrics.py # fetch missing lyrics from the
|
||||
│ │ │ # public APIs into the lyrics dir
|
||||
│ │ ├── models.py # SQLAlchemy ORM 資料模型
|
||||
│ │ ├── run_llm.py # API runner:2+1 協定、Batch API、
|
||||
│ │ ├── commands/ # CLI 子命令模組(登記於 __init__)
|
||||
│ │ │ ├── build_db.py # build the SQLite working store
|
||||
│ │ │ │ # from the inputs
|
||||
│ │ │ ├── export_llm_input.py # export the LLM input JSONL
|
||||
│ │ │ │ # (lyrics only) from the
|
||||
│ │ │ │ # working store
|
||||
│ │ │ ├── fetch_artists.py # fetch artist metadata from
|
||||
│ │ │ │ # Wikidata into the snapshot CSV
|
||||
│ │ │ ├── fetch_lyrics.py # fetch missing lyrics from the
|
||||
│ │ │ │ # public APIs into the lyrics dir
|
||||
│ │ │ └── run_llm.py # API runner:2+1 協定、Batch API、
|
||||
│ │ │ # 寫入引數指定的 runs 目錄;執行
|
||||
│ │ │ # 方式 pop-fem-audit-tools run-llm
|
||||
│ │ ├── config.py # pydantic-settings 設定(.env)
|
||||
│ │ ├── database.py # SQLAlchemy engine / session / Base
|
||||
│ │ ├── models.py # SQLAlchemy ORM 資料模型
|
||||
│ │ └── utils.py # 共用工具(format_duration)
|
||||
│ └── tests/ # 單元測試(unittest)
|
||||
├── runs/ # 每次執行的完整稽核紀錄(進 git)
|
||||
|
||||
Reference in New Issue
Block a user