pyproject.tomlā¢10.4 kB
[build-system]
requires = ["hatchling>=1.26.0"]
build-backend = "hatchling.build"
[project]
name = "databeak"
version = "0.1.2"
description = "DataBeak: MCP server for comprehensive CSV file operations with pandas-based tools"
readme = "README.md"
requires-python = ">=3.12"
license = {text = "Apache-2.0"}
authors = [
{name = "Jonathan Springer", email = "jps@s390x.com"},
]
maintainers = [
{name = "Jonathan Springer", email = "jps@s390x.com"},
]
keywords = [
"csv",
"mcp",
"model-context-protocol",
"data-analysis",
"data-manipulation",
"pandas",
"fastmcp",
"data-validation",
"data-quality",
"data-profiling",
"outlier-detection",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Office/Business :: Financial :: Spreadsheet",
"Topic :: Utilities",
"Typing :: Typed",
"Framework :: AsyncIO",
]
dependencies = [
"pandas>=2.2.3",
"numpy>=2.1.3",
"pydantic>=2.10.4",
"aiofiles>=24.1.0",
"python-dateutil>=2.9.0",
"httpx>=0.27.0",
"openpyxl>=3.1.5",
"pyarrow>=17.0.0",
"tabulate>=0.9.0",
"pytz>=2024.2",
"pydantic-settings>=2.10.1",
"psutil>=7.0.0",
"scipy>=1.16.1",
"simpleeval>=1.0.3",
"pandera>=0.26.1",
"fastapi>=0.117.1",
"uvicorn>=0.36.0",
"fastmcp>=2.12.4",
"smithery>=0.4.2",
]
[project.urls]
Homepage = "https://github.com/jonpspri/databeak"
Documentation = "https://github.com/jonpspri/databeak#readme"
Repository = "https://github.com/jonpspri/databeak"
Issues = "https://github.com/jonpspri/databeak/issues"
Changelog = "https://github.com/jonpspri/databeak/blob/main/CHANGELOG.md"
"Release Notes" = "https://github.com/jonpspri/databeak/releases"
[project.scripts]
databeak = "databeak.server:main"
csv = "databeak.server:main" # Legacy alias
sync-versions = "scripts.sync_versions:main" # Version synchronization utility
# Note: We use uv for environment and dependency management
# Hatchling is used only as the build backend for packaging
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/examples",
"README.md",
"LICENSE",
"NOTICE",
"CHANGELOG.md",
"pyproject.toml",
]
exclude = [
"*.pyc",
"__pycache__",
".git",
".github",
".venv",
".env",
".DS_Store",
"*.egg-info",
".pytest_cache",
".mypy_cache",
".ruff_cache",
"htmlcov",
".coverage",
]
[tool.hatch.build.targets.wheel]
packages = ["src/databeak"]
[tool.ruff]
line-length = 100
fix = true
output-format = "grouped"
show-fixes = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"ASYNC",# flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PERF", # Perflint
"PIE", # flake8-pie
"PL", # Pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"T20", # flake8-print
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"D203", # Incompatible with formatter
"D211", "D213", # Incompatible with D203, D212
"E501", # line too long (handled by ruff format)
"COM812", # Missing trailing comma (handled by ruff format)
"RET501", # Copilot and Clyde Code PR reviewers prefer 'return None' to 'return'
"SIM105", # contextlib.suppress is slower that try-except-pass
"SIM108", # Ternary operator - preference
# TODO: Work on bringing these into play
"PLR0911", "PLR0912", "PLR0913", "PLR0915", # Complexity findings that make the AI cry
]
[tool.ruff.lint.per-file-ignores]
# Allow unused arguments, naive datetime, temp files, binding all interfaces, blocking file ops, and assert in tests
"tests/*" = ["ARG", "DTZ", "S108", "S104", "ASYNC230", "S101", "SLF001",
"D", # Docstring requirements (tests don't need comprehensive documentation)
"PLC0415", # Local import
"PLR2004", # Magic numbers are a HUGE part of testing
"RUF043", # Regex in asserts in tests
"RUF059", # Unused unpacked variable
"PT011", # TODO: Revisit post v0.1.0
"TRY300", # TODO: Revisit post v0.1.0
]
"examples/*" = ["T201", "T203", "PL"] # Allow print() in examples
"scripts/*" = [
"T201", "T203", # Allow print() in scripts
"TRY300", # TODO: Revisit post v0.1.0
]
[tool.ruff.lint.isort]
known-first-party = ["src", "databeak"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
[tool.mypy]
python_version = "3.12"
mypy_path = "./src"
namespace_packages = false
explicit_package_bases = false
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_unimported = false
disallow_any_explicit = false
disallow_any_generics = true # From pydantic recommendation
no_implicit_optional = true
no_implicit_reexport = true # From pydantic recommendation
check_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
show_error_codes = true
strict_equality = true
pretty = true
show_column_numbers = true
show_error_context = true
follow_imports = "silent" # From pydantic recommendation
exclude = ["examples/"]
plugins = [
"pydantic.mypy",
# "pandera.mypy", # TODO: Enable when pre-commit environment supports pandera
]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = false # Too many Enums gumming up the works
warn_required_dynamic_aliases = true
[tool.pandera.mypy]
# Enable enhanced DataFrame type checking with Pandera
warn_untyped_dataframes = true
warn_untyped_fields = true
[[tool.mypy.overrides]]
module = [
"fastmcp",
"tabulate",
"openpyxl",
"pyarrow",
"numexpr",
"bottleneck",
"fastparquet",
"pytest",
"simpleeval",
"smithery",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["tests.*", "tests.unit.*", "tests.integration.*", "tests.security.*"]
disallow_untyped_defs = true
disallow_any_explicit = true
#disable_error_code = ["arg-type", "no-untyped-def"]
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "examples.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "src.databeak.models.pandera_schemas"
ignore_errors = true # Complex Pandera/FastMCP type compatibility - TODO: resolve in future PR
[[tool.mypy.overrides]]
module = "tests.unit.models.test_pandera_schemas"
ignore_errors = true # Pandera not available in pre-commit environment
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["./tests"]
pythonpath = ["./src"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "module"
asyncio_default_test_loop_scope = "module"
addopts = [
"--strict-markers",
"--tb=short",
"--verbose",
"--color=yes",
"-ra",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"asyncio: marks tests as async",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.coverage.run]
source = ["src"]
branch = true
parallel = true
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/site-packages/*",
"src/databeak/__main__.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"pass",
"@abstractmethod",
"@abc.abstractmethod",
]
precision = 2
show_missing = true
skip_covered = false
skip_empty = true
sort = "Cover"
fail_under = 80
[tool.coverage.html]
directory = "htmlcov"
title = "DataBeak Coverage Report"
[tool.coverage.json]
output = "coverage.json"
pretty_print = true
# Markdown formatting
[tool.mdformat]
wrap = 80
number = true
end_of_line = "lf"
# Documentation
[tool.mkdocs]
site_name = "DataBeak"
site_description = "Comprehensive CSV manipulation and analysis via Model Context Protocol"
site_author = "Santosh Ray"
repo_url = "https://github.com/jonpspri/databeak"
repo_name = "databeak"
[tool.smithery]
server = "databeak.server:create_server"
[dependency-groups]
dev = [
"mdformat>=0.7.22",
"mdformat-frontmatter>=2.0.8",
"mdformat-gfm>=0.4.1",
"mdformat-ruff>=0.1.3",
"mkdocs>=1.6.1",
"mkdocs-material>=9.6.18",
"mkdocs-mermaid2-plugin>=1.2.2",
"mkdocstrings[python]>=0.30.0",
"mypy>=1.17.1",
"pandas-stubs>=2.3.0",
"pre-commit>=4.3.0",
"pymarkdownlnt>=0.9.32",
"pytest>=8.4.2",
"pytest-asyncio>=1.1.0",
"pytest-cov>=6.2.1",
"pytest-xdist>=3.8.0",
"ruff>=0.12.10",
"twine>=6.1.0",
"ty>=0.0.1a21",
"types-aiofiles>=24.1.0.20250822",
"types-jsonschema>=4.25.1.20250822",
"types-psutil>=7.0.0.20250822",
"types-pytz>=2025.2.0.20250809",
"types-tabulate>=0.9.0.20241207",
]
# Pre-commit hooks configuration (for reference)
# Create .pre-commit-config.yaml separately