- 新增 sql 模組:SQLLoader (LRU 快取)、QueryBuilder (參數化查詢)、CommonFilters (共用篩選器) - 將 18 個內嵌 SQL 抽取至獨立 .sql 檔案 (dashboard, resource, wip, resource_history) - 修復 SQL 注入漏洞:所有使用者輸入改用 Oracle bind variables (:param) - 優化 dashboard KPI 與 workcenter_cards 端點,從 55 秒超時降至 0.1-0.16 秒 - 標記 utils.py 舊函數為 deprecated,保持向下相容 - 新增 51 個 SQL 模組單元測試,全部通過 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
50 lines
1.1 KiB
TOML
50 lines
1.1 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "mes-dashboard"
|
|
version = "0.1.0"
|
|
description = "MES Dashboard Portal"
|
|
readme = "README.md"
|
|
requires-python = ">=3.9"
|
|
license = { text = "MIT" }
|
|
authors = [
|
|
{ name = "MES Dashboard Team" }
|
|
]
|
|
keywords = ["flask", "mes", "dashboard"]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
"Programming Language :: Python :: 3.9",
|
|
"License :: OSI Approved :: MIT License",
|
|
]
|
|
dependencies = [
|
|
"oracledb>=2.0.0",
|
|
"flask>=3.0.0",
|
|
"pandas>=2.0.0",
|
|
"sqlalchemy>=2.0.0",
|
|
"openpyxl>=3.0.0",
|
|
"python-dotenv>=1.0.0",
|
|
"gunicorn>=21.2.0",
|
|
"waitress>=2.1.2; platform_system == 'Windows'",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
test = [
|
|
"pytest>=7.0.0",
|
|
"pytest-playwright>=0.4.0",
|
|
"playwright>=1.40.0",
|
|
"requests>=2.28.0",
|
|
]
|
|
|
|
[tool.setuptools]
|
|
package-dir = {"" = "src"}
|
|
include-package-data = true
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.setuptools.package-data]
|
|
mes_dashboard = ["templates/**/*", "sql/**/*.sql"]
|