[project]
name = "astro-airflow-mcp"
dynamic = ["version"]
description = "A FastMCP server for Airflow integration that can run standalone or as an Airflow 3 plugin"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"fastmcp>=0.1.0",
"httpx>=0.27.0",
"pydantic>=2.0.0",
"pyyaml>=6.0",
]
[project.optional-dependencies]
plugin = [
"apache-airflow>=3.0.0",
"fastapi>=0.100.0",
]
[project.scripts]
astro-airflow-mcp = "astro_airflow_mcp.__main__:main"
[project.entry-points."airflow.plugins"]
airflow_mcp = "astro_airflow_mcp.plugin:AirflowMCPPlugin"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0+dev"
[tool.hatchling.build.targets.wheel]
packages = ["src/astro_airflow_mcp"]
[dependency-groups]
dev = [
"pytest>=7.0.0",
"pytest-mock>=3.12.0",
"pytest-httpx>=0.30.0",
"ruff>=0.1.0",
"prek>=0.2.0",
"mypy>=1.8.0",
"bandit[toml]>=1.7.0",
"types-PyYAML>=6.0",
]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
extend-select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"ISC", # implicit string concatenation
"LOG", # flake8-logging
"TC", # type-checking imports
"G", # flake8-logging-format
"RET", # flake8-return
"PIE", # flake8-pie (PIE790: unnecessary pass)
"PT", # flake8-pytest-style
"RUF", # Ruff-specific rules
"ASYNC", # flake8-async
"TID252", # relative imports from parent
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"ARG002", # unused method argument
"RUF012", # mutable class attributes (common pattern)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
"tests/**/*.py" = ["ARG001", "ARG002", "PT011"] # Allow unused arguments and broad pytest.raises in tests
[tool.bandit]
exclude_dirs = ["tests", "examples"]
skips = ["B101"] # Skip assert_used check (common in tests)