守住本機產物忽略規則
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -88,6 +88,8 @@ data/excel_exports/
|
||||
# 上傳檔案
|
||||
web/static/uploads/
|
||||
web/static/screenshots/
|
||||
uploads/
|
||||
screenshots/
|
||||
MOMO Pro/uploads/
|
||||
MOMO Pro/screenshots/
|
||||
templates/__init__.py
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
- CD migration 全範圍冪等已有回歸守門:`.gitea/workflows/cd.yaml` 必須維持 024-099 pattern、`sort | uniq` 與 `for m in $V5_MIGRATIONS` apply loop。
|
||||
- CD Observability production smoke 已補 timeout 守門:`quick_review.sh --observability-smoke` 必須帶 `--timeout 12`。
|
||||
- 0-byte `database/momo*.db` 迷惑檔已不存在;真實 SQLite 僅在 `data/momo_database.db`。
|
||||
- `.gitignore` 已涵蓋 `.claude/worktrees/`、`.tmp_*`、`MOMO Pro/`、uploads/screenshots。
|
||||
- `.gitignore` 已涵蓋 `.claude/worktrees/`、`.tmp_*`、`MOMO Pro/`、root/uploads/screenshots 與 `MOMO Pro` uploads/screenshots,並由 `tests/test_gitignore_contracts.py` 守住。
|
||||
- `cache_service.py` 已成為 `cache_manager.py` 的相容 shim,`_SALES_CACHE_TTL` 單一來源有測試鎖住。
|
||||
- `aiops-core/requirements.txt` 已不存在,`aiops-core/README.md` 已標記此目錄只保留歷史 stub,不應安裝或部署。
|
||||
- V2 提到的「死依賴」不可整批刪:`beautifulsoup4` 用於多個 crawler、`google-api-python-client` 用於 Google Drive、`google-generativeai` 用於 Gemini paths、`python-pptx` 用於 PPT generator、`matplotlib` 用於 Telegram/圖表/PPT。
|
||||
|
||||
21
tests/test_gitignore_contracts.py
Normal file
21
tests/test_gitignore_contracts.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_local_generated_artifacts_stay_ignored():
|
||||
gitignore = (ROOT / ".gitignore").read_text(encoding="utf-8")
|
||||
|
||||
required_patterns = [
|
||||
".claude/worktrees/",
|
||||
".tmp_*",
|
||||
"MOMO Pro/",
|
||||
"MOMO Pro/uploads/",
|
||||
"MOMO Pro/screenshots/",
|
||||
"uploads/",
|
||||
"screenshots/",
|
||||
"database/*.db",
|
||||
]
|
||||
for pattern in required_patterns:
|
||||
assert pattern in gitignore
|
||||
Reference in New Issue
Block a user