pyproject.tomlโข5.05 kB
[project]
name = "mcp-optimizer"
version = "0.4.1"
description = "Mathematical optimization MCP server with PuLP and OR-Tools support"
authors = [
{ name = "Dmitry Anchikov", email = "dmitry.anchikov@gmail.com" }
]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
keywords = ["mcp", "optimization", "linear-programming", "operations-research", "pulp", "ortools"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"fastmcp>=2.5.0",
"ortools>=9.8.0",
"pulp>=2.8.0",
"pydantic>=2.5.0",
"pydantic-settings>=2.1.0",
"uvicorn[standard]>=0.24.0",
"psutil>=5.9.0",
]
[project.optional-dependencies]
stable = [
"fastmcp==2.7.0",
"sse-starlette==2.2.1",
"starlette==0.46.1",
"uvicorn==0.34.0"
]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.26.0",
"pytest-cov>=6.1.1",
"mypy>=1.7.0",
"ruff>=0.11.11",
"bandit>=1.7.5",
]
examples = [
"numpy>=1.24.0",
"pandas>=2.0.0",
"streamlit>=1.28.0",
"plotly>=5.17.0",
]
[project.urls]
Homepage = "https://github.com/dmitryanchikov/mcp-optimizer"
Repository = "https://github.com/dmitryanchikov/mcp-optimizer"
Documentation = "https://github.com/dmitryanchikov/mcp-optimizer#readme"
"Bug Tracker" = "https://github.com/dmitryanchikov/mcp-optimizer/issues"
[project.scripts]
mcp-optimizer = "mcp_optimizer.main:cli_main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/mcp_optimizer"]
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/README.md",
"/LICENSE",
"/pyproject.toml",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--strict-config",
"--tb=short",
]
filterwarnings = [
"ignore::DeprecationWarning:importlib._bootstrap",
"ignore:.*SwigPyPacked.*:DeprecationWarning",
"ignore:.*SwigPyObject.*:DeprecationWarning",
"ignore:.*swigvarlink.*:DeprecationWarning",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"stress: marks tests as stress/performance tests (deselect with '-m \"not stress\"')",
"robustness: marks tests as robustness/edge-case tests",
"timeout: marks tests with timeout limits",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"ortools.*",
"pulp.*",
"pandas.*",
"numpy.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "mcp_optimizer.tools.assignment"
warn_unreachable = false
[[tool.mypy.overrides]]
module = "mcp_optimizer.tools.knapsack"
warn_unreachable = false
[[tool.mypy.overrides]]
module = "mcp_optimizer.tools.validation"
warn_unreachable = false
[tool.ruff]
target-version = "py311"
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by formatter
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"UP038", # Use X | Y instead of Union for Python 3.12+
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["B011"]
[tool.ruff.lint.isort]
known-first-party = ["mcp_optimizer"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# Preserve type: ignore comments on the same line
docstring-code-format = false
[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101", "B601"]