Files
MCM-ICM_Toolkit/pyproject.toml
T

71 lines
2.2 KiB
TOML
Raw Normal View History

[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "mcm-toolkit"
version = "0.0.1"
description = "MCM/ICM 竞赛层工具箱:高频算法自实现 + 成熟库薄封装 + 统一结果接口"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [{ name = "孤竹居士" }]
keywords = ["MCM", "ICM", "mathematical-modeling", "competition"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Mathematics",
]
# 核心依赖只留 4 个:core / data / stats / viz 只需要这些。
# 其余全部走 optional-dependencies,保证"比赛现场装不上包也能跑一半"。
dependencies = [
"numpy>=1.24",
"scipy>=1.10",
"pandas>=2.0",
"matplotlib>=3.7",
]
[project.optional-dependencies]
ml = ["scikit-learn>=1.3", "statsmodels>=0.14"]
graph = ["networkx>=3.1"]
sensitivity = ["SALib>=1.4"]
symbolic = ["sympy>=1.12"]
moo = ["pymoo>=0.6"]
excel = ["openpyxl>=3.1"]
all = ["mcm-toolkit[ml,graph,sensitivity,symbolic,moo,excel]"]
dev = ["pytest>=7.4", "ruff>=0.4", "pyright>=1.1"]
[project.urls]
Homepage = "https://github.com/"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM", "NPY", "RET", "PTH"]
ignore = ["E501"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"
filterwarnings = ["error::RuntimeWarning"]
[tool.pyright]
include = ["src", "tests"]
typeCheckingMode = "basic"
# 不写 venvPath/venv 的话,pyright 会去 PATH 上找 python;本机 PATH 上的
# python 是 agent-tools 的 shim(Codex 运行时,Python 3.14,没有 numpy/pandas),
# 于是全部报 "无法解析导入 numpy/pandas"。指到工作区的 .venv 才稳定。
venvPath = "."
venv = ".venv"
# 与两套环境一致(venv 3.13.9 / conda 3.13.15);不写会跟着 PATH 上那个 3.14 走。
pythonVersion = "3.13"