docs: 同步套件清單並補齊缺少的依賴項

- environment.yml: 補齊 redis, hiredis, requests, psutil
- pyproject.toml: 補齊 redis, hiredis, psutil,新增 Python 3.10/3.11 分類
- requirements.txt: 新增版本策略說明與分類註解
- 三個檔案現已完全同步,使用最低版本限制 (>=) 以允許安全性更新

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
beabigegg
2026-02-04 16:38:57 +08:00
parent 5299d187bc
commit de0904ffa3
3 changed files with 95 additions and 19 deletions

View File

@@ -1,15 +1,44 @@
# Conda environment for MES Dashboard
# Usage: conda env create -f environment.yml
# conda activate mes-dashboard
#
# Note: Most packages use minimum version pins (>=) to allow automatic security updates.
# For reproducible builds, generate a lock file: pip freeze > requirements.lock
name: mes-dashboard
channels:
- conda-forge
- defaults
dependencies:
# Python version - pinned for consistency across deployments
- python=3.11
# Use pip for Python packages (better compatibility with pypi packages)
- pip
- pip:
- 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
# Core Framework
- flask>=3.0.0
# Database
- oracledb>=2.0.0
- sqlalchemy>=2.0.0
# Data Processing
- pandas>=2.0.0
- openpyxl>=3.0.0
# Cache (Redis)
- redis>=5.0.0
- hiredis>=2.0.0 # C parser for better performance
# HTTP Client
- requests>=2.28.0
# Configuration
- python-dotenv>=1.0.0
# WSGI Server (Production)
- gunicorn>=21.2.0
# System Monitoring
- psutil>=5.9.0

View File

@@ -17,17 +17,41 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
]
# Note: Using minimum version pins (>=) to allow automatic security updates.
# For reproducible builds, use: pip freeze > requirements.lock
dependencies = [
"oracledb>=2.0.0",
# Core Framework
"flask>=3.0.0",
"pandas>=2.0.0",
# Database
"oracledb>=2.0.0",
"sqlalchemy>=2.0.0",
# Data Processing
"pandas>=2.0.0",
"openpyxl>=3.0.0",
# Cache (Redis)
"redis>=5.0.0",
"hiredis>=2.0.0",
# HTTP Client
"requests>=2.28.0",
# Configuration
"python-dotenv>=1.0.0",
# WSGI Server
"gunicorn>=21.2.0",
"waitress>=2.1.2; platform_system == 'Windows'",
# System Monitoring
"psutil>=5.9.0",
]
[project.optional-dependencies]
@@ -35,7 +59,6 @@ test = [
"pytest>=7.0.0",
"pytest-playwright>=0.4.0",
"playwright>=1.40.0",
"requests>=2.28.0",
]
[tool.setuptools]

View File

@@ -1,12 +1,36 @@
oracledb>=2.0.0
# MES Dashboard Dependencies
# ===========================
#
# Version Strategy:
# Using minimum version pins (>=) to allow automatic security updates.
# For reproducible builds, generate a lock file: pip freeze > requirements.lock
#
# Python Version: >=3.9 (recommended: 3.11)
# Core Framework
flask>=3.0.0
pandas>=2.0.0
# Database
oracledb>=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"
requests>=2.28.0
# Data Processing
pandas>=2.0.0 # Note: numpy is installed as a dependency
openpyxl>=3.0.0 # Excel file support
# Cache (Redis)
redis>=5.0.0
hiredis>=2.0.0
psutil>=5.9.0
hiredis>=2.0.0 # C parser for better Redis performance
# HTTP Client
requests>=2.28.0
# Configuration
python-dotenv>=1.0.0
# WSGI Server
gunicorn>=21.2.0 # Linux/macOS production server
waitress>=2.1.2; platform_system=="Windows" # Windows alternative
# System Monitoring
psutil>=5.9.0 # Process and system utilities