pyproject.toml•4.2 kB
[tool.ruff]
line-length = 120
target-version = 'py312'
exclude = ["terraform/diagram_script.py", "aws_architecture.jpg"]
[tool.cruft]
skip = [
# general_paths
".env.*",
"terraform/variables",
".github/.github.env",
".github/workflows",
"data",
]
[project]
name = "parliament-mcp"
version = "0.2.0"
authors = [{name = "i.AI", email = "i-dot-ai-enquiries@cabinetoffice.gov.uk"}]
license = {text = "MIT"}
description = "A library for working with UK Parliamentary data"
requires-python = ">=3.12,<3.13"
dependencies = [
"httpx>=0.28.1",
"hishel>=0.1.2",
"rich>=14.0.0",
"pydantic>=2.11.7",
"qdrant-client>=1.15.0",
"openai>=1.97.0",
"boto3>=1.39.10",
"aiohttp>=3.12.13",
"python-dotenv>=1.1.0",
"async-lru>=2.0.5",
"pydantic-settings>=2.10.0",
"dateparser>=1.2.1",
"pyjwt>=2.9.0",
"cryptography>=44.0.1",
"aiolimiter>=1.2.1",
"sentry-sdk>=2.18.0",
"mcp[cli]>=1.9.4",
"fastapi[standard]>=0.115.13",
"uvicorn>=0.34.3",
"chonkie>=1.1.1",
"fastembed>=0.7.1",
"tenacity>=9.1.2",
"boto3>=1.39.12",
"markdownify>=1.2.0",
"markitdown[docx,pdf,xlsx]>=0.1.3",
]
[project.scripts]
parliament-mcp = "parliament_mcp.cli:main"
[dependency-groups]
dev = [
"bumpversion>=0.6.0",
"pytest>=8.3.2",
"pytest-env>=1.1.1",
"pytest-mock>=3.14.0",
"pytest-cov>=5.0.0",
"pytest-dotenv>=0.5.2",
"pytest-asyncio>=0.23.8",
"ruff==0.12.1",
"bandit>=1.7.9",
"detect-secrets>=1.5.0",
"diagrams>=0.23.4",
"ipykernel>=6.29.5",
"pre-commit>=4.0.0",
"openai-agents>=0.1.0",
"testcontainers>=4.10.0",
"docker>=7.1.0",
"pytest-integration-mark>=0.2.0",
"sentry-sdk>=2.18.0",
"qdrant-client[fastembed]>=1.15.0",
]
transfer-from-es = [
"bloom-filter>=1.3.3",
"click>=8.2.1",
"elasticsearch<9",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff.format]
exclude = ["data/*"]
[tool.ruff.lint]
# Dribble in those we have commented out, asterisked ones first
select = [
"A",
"B",
"C",
"E",
"F",
"G",
"I",
"N",
"Q",
"S",
"T",
"W",
"ARG",
"ASYNC",
"BLE",
"COM",
"DJ",
"DTZ",
"EM",
"EXE",
"FURB",
"ICN",
"INT",
"ISC",
"LOG",
"NPY",
"PD",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"PYI",
"RET",
"RSE",
"RUF",
"SIM",
"SLF",
"SLOT",
"TCH",
"TD",
"TID",
"TRY",
"UP",
"YTT",
]
exclude = ["out/*"]
ignore = ["COM812", "DJ001", "RET505", "RET508", "PLR0913"]
[tool.ruff.lint.isort]
known-first-party = ["parliament_mcp"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S104", "S106", "PLR0913", "PLR0915", "PLR2004", "TD003", "S311"]
"*/tests/*" = ["S101", "S106", "PLR0913", "PLR0915", "PLR2004", "TD003"]
# API files need to match external API parameter names
"parliament_mcp/mcp_server/api.py" = ["E501"] # Allow long lines in API files
"parliament_mcp/mcp_server/members.py" = ["N803", "A002", "E501", "N806"] # Allow non-snake_case args, shadowing builtins, long lines, and non lowercase variables
"parliament_mcp/mcp_server/handlers.py" = ["N803", "A001"] # Allow non-snake_case args and shadowing builtins
"parliament_mcp/mcp_server/main.py" = ["ARG001"] # Allow unused args in FastAPI lifespan
"parliament_mcp/models.py" = ["N815", "FURB162"] # Allow mixedCase, timezone handling
"parliament_mcp/settings.py" = ["S104", "TD002", "TD003", "N802"] # Allow binding all interfaces, TODO format, uppercase property names for settings
"parliament_mcp/shared_utils/auth.py" = ["E501"] # Allow longer lines in auth
"parliament_mcp/cli.py" = ["E501", "PLC0415"] # Allow longer lines in CLI help text, allow imports not at top of file
"tests/conftest.py" = ["ARG001"] # Allow unused args in test setup
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
filterwarnings = [
"ignore:websockets.legacy is deprecated:DeprecationWarning",
"ignore:websockets.server.WebSocketServerProtocol is deprecated:DeprecationWarning",
]