Files
docling-mcp/pyproject.toml
Peter Staar dc5dc90c71 WIP: first agent to write Docling documents
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2025-05-28 07:37:23 +02:00

206 lines
5.7 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "docling-mcp"
version = "0.3.0" # DO NOT EDIT, updated automatically
description = "Running Docling as an agent using tools"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{name="Peter Staar", email="taa@zurich.ibm.com"},
{name="Adel Zaalouk", email="azaalouk@redhat.com"},
{name="Michele Dolfi", email="dol@zurich.ibm.com"},
{name="Panos Vagenas", email="pva@zurich.ibm.com"},
{name="Christoph Auer", email="cau@zurich.ibm.com"},
{name="Cesar Berrospi Ramis", email="ceb@zurich.ibm.com"},
]
maintainers = [
{name="Peter Staar", email="taa@zurich.ibm.com"},
{name="Adel Zaalouk", email="azaalouk@redhat.com"},
{name="Michele Dolfi", email="dol@zurich.ibm.com"},
{name="Panos Vagenas", email="pva@zurich.ibm.com"},
{name="Christoph Auer", email="cau@zurich.ibm.com"},
{name="Cesar Berrospi Ramis", email="ceb@zurich.ibm.com"},
]
readme = "README.md"
keywords = ["mcp", "message control protocol", "agents", "agentic", "AI", "artificial intelligence", "document understanding", "RAG", "Docling"]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Typing :: Typed",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Build Tools",
]
requires-python = ">=3.10"
dependencies = [
"docling~=2.25",
"httpx>=0.28.1",
"llama-index>=0.12.33",
"llama-index-core>=0.12.28",
"llama-index-embeddings-huggingface>=0.5.2",
"llama-index-embeddings-openai>=0.3.1",
"llama-index-llms-ollama>=0.5.4",
"llama-index-node-parser-docling>=0.3.1",
"llama-index-readers-docling>=0.3.2",
"llama-index-readers-file>=0.4.7",
"llama-index-vector-stores-milvus>=0.7.2",
"mcp[cli]>=1.4.0",
"pydantic~=2.10",
"pydantic-settings~=2.4",
"python-dotenv>=1.1.0",
]
[project.optional-dependencies]
tesserocr = [
"tesserocr~=2.7"
]
rapidocr = [
"rapidocr-onnxruntime~=1.4; python_version<'3.13'",
"onnxruntime~=1.7",
]
llama-stack = [
"fire>=0.7.0",
"llama-stack-client>=0.2.8",
]
[dependency-groups]
dev = [
"mypy~=1.11",
"pre-commit-uv~=4.1",
"pytest~=8.3",
"pytest-check~=2.4",
"pytest-cov>=6.1.1",
"python-semantic-release~=7.32",
"ruff>=0.9.6",
]
[project.scripts]
docling-mcp-server = "docling_mcp.servers.mcp_server:app"
[project.urls]
Homepage = "https://github.com/docling-project/docling-mcp"
Repository = "https://github.com/docling-project/docling-mcp"
Issues = "https://github.com/docling-project/docling-mcp/issues"
Changelog = "https://github.com/docling-project/docling-mcp/blob/main/CHANGELOG.md"
[tool.hatch.build.targets.sdist]
include = ["docling_mcp"]
[tool.ruff]
line-length = 88
indent-width = 4
respect-gitignore = true
include = ["docling_mcp", "tests"]
[tool.ruff.format]
skip-magic-trailing-comma = false
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions, mccabe
"D", # flake8-docstrings
"E", # pycodestyle errors (default)
"F", # pyflakes (default)
"I", # isort
"PD", # pandas-vet
"PIE", # pie
# "PTH", # pathlib
"Q", # flake8-quotes
# "RET", # return
"RUF", # Enable all ruff-specific checks
# "SIM", # simplify
"S307", # eval
# "T20", # (disallow print statements) keep debugging statements out of the codebase
"W", # pycodestyle warnings
"ASYNC", # async
"UP", # pyupgrade
]
ignore = [
"E501", # Line too long, handled by ruff formatter
"D107", # "Missing docstring in __init__",
"F811", # "redefinition of the same function"
"PL", # Pylint
"RUF012", # Mutable Class Attributes
"UP007", # Option and Union
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"] # import violations, module imported but unused
"docling_mcp/servers/mcp_server.py" = ["F401"] # module inmported but unused
"tests/**.py" = ["D"] # ignore flake8-docstrings in tests
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
"pydantic.validator",
]
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.ruff.lint.isort.sections]
"docling" = ["docling", "docling_core"]
[tool.ruff.lint.isort]
combine-as-imports = true
section-order = [
"future",
"standard-library",
"third-party",
"docling",
"first-party",
"local-folder",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
pretty = true
strict = true
no_implicit_optional = true
plugins = "pydantic.mypy"
python_version = "3.10"
[[tool.mypy.overrides]]
module = [
"easyocr.*",
"tesserocr.*",
"rapidocr_onnxruntime.*",
"requests.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
minversion = "8.2"
testpaths = [
"tests",
]
addopts = "-rA --color=yes --tb=short --maxfail=5"
markers = [
"asyncio",
]
[tool.semantic_release]
# for default values check:
# https://github.com/python-semantic-release/python-semantic-release/blob/v7.32.2/semantic_release/defaults.cfg
version_source = "tag_only"
branch = "main"
# configure types which should trigger minor and patch version bumps respectively
# (note that they must be a subset of the configured allowed types):
parser_angular_allowed_types = "build,chore,ci,docs,feat,fix,perf,style,refactor,test"
parser_angular_minor_types = "feat"
parser_angular_patch_types = "fix,perf"