# --- BUILD SYSTEM ---
[build-system]
requires = ["uv_build>=0.8.22,<0.9.0"]
build-backend = "uv_build"
# --- PROJECT CONFIGURATION ---
[project]
name = "gcal-mcp"
version = "0.0.1"
description = "A Dedalus MCP server for read-only access to the Google Calendar API v3."
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [
{ name = "Dedalus Labs", email = "support@dedalus.ai" },
]
maintainers = [
{ name = "Dedalus Labs", email = "support@dedalus.ai" },
]
keywords = ["ai", "mcp", "agents", "dedalus", "google", "calendar", "api"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed",
]
dependencies = [
"dedalus-mcp>=0.4.1",
# Data validation & serialization
"pydantic>=2.12.5",
# High-performance event loop
"python-dotenv>=1.2.1",
# Google OAuth (installed app flow + refresh)
"google-auth>=2.0.0",
"google-auth-oauthlib>=1.0.0",
"uvloop>=0.22.1; platform_system != 'Windows'",
]
# --- PROJECT URLS ---
[project.urls]
Homepage = "https://github.com/annyzhou/gcal-mcp"
Repository = "https://github.com/annyzhou/gcal-mcp"
Issues = "https://github.com/annyzhou/gcal-mcp/issues"
# --- DEPENDENCY GROUPS ---
[dependency-groups]
# Runtime dependencies (keep in sync with [project] dependencies)
runtime = [
"pydantic>=2.12.5",
"uvloop>=0.22.1; platform_system != 'Windows'",
]
# Test suite dependencies
test = [
"anyio>=4.11.0",
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
"pytest-cov>=7.0.0",
"pytest-mock>=3.15.1",
]
# Linting and static analysis tools
lint = ["ruff>=0.13.3", "pre-commit>=4.3.0", "ty>=0.0.1a21"]
# Debugging tools
debug = ["pdbpp>=0.10.3", "icecream>=2.1.8"]
# Developer convenience bundle (includes all dev groups)
dev = [
{ include-group = "runtime" },
{ include-group = "test" },
{ include-group = "lint" },
{ include-group = "debug" },
]
# --- UV CONFIGURATION ---
[tool.uv]
preview = true # Enable all preview features
package = false # Not a distributable package, just a runnable project
default-groups = [
"runtime",
] # Install runtime deps by default; add dev/test explicitly
cache-dir = ".cache/uv"
# Performance optimizations
compile-bytecode = true # 10-20% faster startup
link-mode = "hardlink" # Fastest cache linking (macOS/Linux)
# Platform targeting (20-30% faster resolution)
environments = ["sys_platform == 'linux'", "sys_platform == 'darwin'"]
# Concurrency settings
concurrent-downloads = 50 # Balanced for stability
concurrent-builds = 4 # Prevent system overload
concurrent-installs = 4 # Safe concurrency level
# Resolution strategy
resolution = "highest" # Latest compatible versions
prerelease = "if-necessary" # Allow prereleases when needed
fork-strategy = "fewest" # Minimize version conflicts
# Index optimization
index-strategy = "first-index" # Use first matching index
# Python version management
python-preference = "managed" # Use uv-managed Python installations
python-downloads = "automatic" # Auto-download Python versions
# Source configuration for development
[tool.uv.sources]
# Example for local development packages
# my-local-package = { path = "../my-local-package", editable = true }
[tool.uv.build-backend]
source-exclude = [
"dist/**",
"**/__pycache__/**",
"**/build/**",
"**/.pytest_cache/**",
"**/.mypy_cache/**",
]
# --- RUFF CONFIGURATION - GOOGLE PYTHON STYLE GUIDE ---
[tool.ruff]
line-length = 120 # Modern Python standard (Django, FastAPI)
target-version = "py310" # Target Python 3.10
extend-exclude = [
"build/",
"dist/",
".venv/",
"__pycache__/",
]
# =============================================================================
# RUFF FORMATTING
# =============================================================================
[tool.ruff.format]
docstring-code-format = true # Format code in docstrings
docstring-code-line-length = 72 # Google style for docstrings
skip-magic-trailing-comma = true # Preserve one-liners, don't auto-expand
quote-style = "double" # Google style uses double quotes
indent-style = "space" # Google style uses spaces (4 spaces)
# --- RUFF LINTING ---
[tool.ruff.lint]
select = [
# Core linting
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
# Import and formatting
"I", # isort
"UP", # pyupgrade
# Code quality
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
# Documentation and style
"D", # pydocstyle
"N", # pep8-naming (Google naming conventions)
# Type annotations
"ANN", # flake8-annotations (type hints)
"TCH", # flake8-type-checking
# Security
"S", # bandit (security)
# Error handling
"BLE", # flake8-blind-except
"TRY", # tryceratops
"RSE", # flake8-raise
"RET", # flake8-return
# Performance
"PERF", # perflint
"FLY", # flynt
"FURB", # refurb
# Specific use cases
"ARG", # flake8-unused-arguments
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"ERA", # eradicate
"EXE", # flake8-executable
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"SLF", # flake8-self
"SLOT", # flake8-slots
"T20", # flake8-print
"TID", # tidy imports
]
ignore = [
# Formatter conflicts
"COM812", # trailing comma (handled by formatter)
"E501", # line too long (handled by formatter)
"ISC001", # single-line-implicit-string-concatenation
# Import organization
"E402", # module level import not at top of file
"TID252", # prefer absolute imports over relative imports
# Docstring requirements (Google style allows flexibility)
"D100", # missing docstring in public module
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
"D104", # missing docstring in public package
"D105", # missing docstring in magic method
"D107", # missing docstring in __init__
# Development and testing
"S101", # use of assert (OK in tests)
"T201", # print found (OK for CLI tools)
# Return style preferences
"RET504", # unnecessary assignment before return statement
]
unfixable = ["B", "TRY", "RUF"]
# --- RUFF LINTING - PYDOCSTYLE ---
[tool.ruff.lint.pydocstyle]
convention = "google" # Google docstring style
# --- RUFF LINTING - ISORT ---
[tool.ruff.lint.isort]
known-first-party = ["src"]
force-single-line = false
force-sort-within-sections = true
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
split-on-trailing-comma = true
lines-after-imports = 2
relative-imports-order = "closest-to-furthest"
# --- RUFF LINTING - FLAKE8-QUOTES ---
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
# --- RUFF LINTING - FLAKE8-ANNOTATIONS ---
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
ignore-fully-untyped = true
# --- RUFF LINTING - PYLINT ---
[tool.ruff.lint.pylint]
max-args = 8 # Google style allows reasonable number of args
# --- PYTEST CONFIGURATION ---
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--tb=short",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=60",
"-v",
"--color=yes",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
]
log_cli = false
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
# --- COVERAGE CONFIGURATION ---
[tool.coverage.run]
source = ["src"]
omit = ["tests/*", "*/tests/*", "test_*.py", "*_test.py"]
[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 .*\\(.*Protocol.*\\):",
"@(abc\\.)?abstractmethod",
]
# --- TY CONFIGURATION - ULTRA-FAST TYPE CHECKING ---
[tool.ty.rules]
# Core type safety (error level)
invalid-assignment = "error"
invalid-return-type = "error"
invalid-argument-type = "error"
missing-argument = "error"
too-many-positional-arguments = "error"
unresolved-reference = "error"
# Class and inheritance safety
invalid-base = "error"
conflicting-metaclass = "error"
subclass-of-final-class = "error"
# Development warnings
possibly-unbound-attribute = "warn"
undefined-reveal = "warn"
unknown-rule = "warn"
# Low priority checks
division-by-zero = "ignore" # Runtime check is better
unused-ignore-comment = "ignore" # Keep for development flexibility
# --- TY ENVIRONMENT CONFIGURATION ---
[tool.ty.environment]
root = ["src"]
python-platform = "darwin" # Optimized for macOS
python-version = "3.10" # Target Python version
# --- TY TERMINAL CONFIGURATION ---
[tool.ty.terminal]
output-format = "concise" # Clean, compact output
error-on-warning = false # Allow warnings during development
# --- TY SOURCE CONFIGURATION ---
[tool.ty.src]
include = ["**/*.py", "**/*.pyi"]
exclude = [
"build/**",
"dist/**",
".venv/**",
"__pycache__/**",
"*.egg-info/**",
".pytest_cache/**",
".ruff_cache/**",
".mypy_cache/**",
]
respect-ignore-files = true