pyproject.tomlā¢3.34 kB
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "ib-sec-mcp"
version = "0.1.0"
description = "Interactive Brokers portfolio analytics with MCP server support"
readme = "README.md"
requires-python = ">=3.12"
license = {text = "MIT"}
authors = [
{name = "Kenichiro Nishioka"}
]
keywords = ["interactive-brokers", "trading", "analytics", "portfolio", "finance"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Financial and Insurance Industry",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"requests>=2.32.5",
"pandas>=2.2.3",
"pydantic>=2.10.0",
"python-dotenv>=1.0.0",
"httpx>=0.27.0",
"rich>=13.7.0",
"typer>=0.12.0",
"defusedxml>=0.7.1",
"yfinance>=0.2.40",
]
[project.optional-dependencies]
mcp = [
"fastmcp>=2.0.0",
]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",
"ruff>=0.1.0",
"mypy>=1.8.0",
"pre-commit>=4.0.0",
"bandit[toml]>=1.8.0",
]
visualization = [
"plotly>=5.18.0",
"kaleido>=0.2.1",
]
reporting = [
"jinja2>=3.1.0",
"weasyprint>=60.0",
]
[project.scripts]
ib-sec-fetch = "ib_sec_mcp.cli.fetch:app"
ib-sec-analyze = "ib_sec_mcp.cli.analyze:app"
ib-sec-report = "ib_sec_mcp.cli.report:app"
ib-sec-mcp = "ib_sec_mcp.mcp.server:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["ib_sec_mcp*"]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP", "B", "A", "C4", "T20", "SIM"]
ignore = [
"E501", # Line too long (handled by formatter)
"UP038", # isinstance with tuple is fine
"UP024", # asyncio.TimeoutError is intentional for asyncio.wait_for
]
[tool.ruff.lint.per-file-ignores]
"scripts/*.py" = ["T201"] # Allow print in scripts
"legacy/*.py" = ["T201"] # Allow print in legacy scripts
"ib_sec_mcp/cli/*.py" = ["T201"] # Allow print in CLI tools
[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = true
disallow_any_unimported = false
disallow_any_generics = true
disallow_subclassing_any = true
check_untyped_defs = true
no_implicit_reexport = true
plugins = ["pydantic.mypy"]
# Exclude MCP server code (FastMCP integration layer)
# TODO: Gradually add type hints to mcp/ directory
exclude = ["ib_sec_mcp/mcp/"]
# Ignore missing imports for third-party libraries without stubs
[[tool.mypy.overrides]]
module = [
"yfinance",
"yfinance.*",
"fastmcp",
"fastmcp.*",
"mcp",
"mcp.*",
"defusedxml",
"defusedxml.*",
"dotenv",
"pydantic_settings",
"pydantic_settings.*",
]
ignore_missing_imports = true
# Skip config.py due to pydantic-settings Python 3.10+ stub syntax
[[tool.mypy.overrides]]
module = "ib_sec_mcp.utils.config"
follow_imports = "skip"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --cov=ib_sec_mcp --cov-report=term-missing"
[tool.bandit]
exclude_dirs = ["tests", "legacy", ".venv", "venv"]
skips = ["B101", "B601"]