election-game/backend/data/pipeline/pyproject.toml

48 lines
988 B
TOML
Raw Normal View History

[build-system]
requires = ["setuptools>=75"]
build-backend = "setuptools.build_meta"
[project]
name = "election-data"
version = "0.1.0"
選戰卡牌第四版:本週戰場、加開行程、逆風重排、逐張地圖校準;手機版修正;刪除人物資料庫與 AI 評分 玩法(docs/26): - 本週戰場:每週一個選情接近的大區,對手全力搶攻,週末淨增多的一方贏(聲勢 +1、多抽一張) - 加開行程:每週一次花資金換 1 點體力;起始資金壓到 500–1,000 萬 - 對手落後 3 個百分點以上急起直追;打對台可以搶廣告版面、讓造勢冷場;大絕招集氣加快 - 逆風 0–10 重排成一級一條規則(ASC_RULES),每一級都看得出差別 - 平衡:空戰對手、對手規則、六種類型、空戰/攻防流派、擴散不看鄰區數、區的大小係數、 對手規模依區數、只有一區的選區沒有本命區和戰場、總統大選全國動員、勢均力敵的第三位候選人 - 逐張地圖校準:apps/sim rogue-calibrate 跑過 219 張勢均力敵地圖,calibration.ts 存每張的對手係數 - 模擬工具載入劇本和伺服器一致(總統合成縣市、立委只取選區村里) 畫面: - 戰場比數、加開按鈕、急起直追提示、週末戰場輸贏;遊戲中「存檔離開」回主選單 - 手機直放、橫放的破版修正(圖鑑完成度、遊戲畫面、首頁、捏人物、服裝店、小遊戲等) 刪除(依使用者決定):人物資料庫(Wikidata、內閣、現任名單 → people.json)與 AI 評分管線、 config/people、相關測試、protocol 的 people.ts、docs/rubric-v1.md;records 用到的 names、cec_results 保留 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5kfuiGbEBhsk7ijDg
2026-10-29 23:42:15 +00:00
description = "凍蒜 2026 資料管線:政府開放資料 → 資料包、歷屆參選人資料庫"
requires-python = ">=3.12"
dependencies = [
"pandas>=3.0",
"numpy>=2.0",
"httpx>=0.28",
"openpyxl>=3.1",
"odfpy>=1.4",
"shapely>=2.0",
"pyshp>=2.3",
"jsonschema>=4.23",
]
[project.optional-dependencies]
dev = ["pytest>=8", "pytest-cov>=5", "ruff>=0.6", "black>=24"]
[project.scripts]
election-data = "election_data.cli:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"unit: 純函式測試,不連網",
"integration: 讀取實際下載的資料檔",
"network: 需要連網",
]
addopts = "-m 'not network'"
[tool.ruff]
line-length = 110
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
[tool.black]
line-length = 110