|
| 1 | +[build-system] |
| 2 | +requires = ["hatchling", "hatch-vcs"] |
| 3 | +build-backend = "hatchling.build" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "docling-serve-haystack" |
| 7 | +dynamic = ["version"] |
| 8 | +description = "Haystack converter component for DoclingServe — document conversion via HTTP" |
| 9 | +readme = "README.md" |
| 10 | +requires-python = ">=3.10" |
| 11 | +license = "Apache-2.0" |
| 12 | +keywords = ["Haystack", "Docling", "DoclingServe", "document conversion", "PDF", "OCR"] |
| 13 | +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] |
| 14 | +classifiers = [ |
| 15 | + "License :: OSI Approved :: Apache Software License", |
| 16 | + "Development Status :: 4 - Beta", |
| 17 | + "Programming Language :: Python", |
| 18 | + "Programming Language :: Python :: 3.10", |
| 19 | + "Programming Language :: Python :: 3.11", |
| 20 | + "Programming Language :: Python :: 3.12", |
| 21 | + "Programming Language :: Python :: 3.13", |
| 22 | + "Programming Language :: Python :: 3.14", |
| 23 | + "Programming Language :: Python :: Implementation :: CPython", |
| 24 | + "Programming Language :: Python :: Implementation :: PyPy", |
| 25 | +] |
| 26 | +dependencies = [ |
| 27 | + "haystack-ai>=2.9.0", |
| 28 | + "httpx>=0.27.0", |
| 29 | +] |
| 30 | + |
| 31 | +[project.urls] |
| 32 | +Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/docling_serve#readme" |
| 33 | +Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" |
| 34 | +Source = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/docling_serve" |
| 35 | + |
| 36 | +[tool.hatch.build.targets.wheel] |
| 37 | +packages = ["src/haystack_integrations"] |
| 38 | + |
| 39 | +[tool.hatch.version] |
| 40 | +source = "vcs" |
| 41 | +tag-pattern = 'integrations\/docling_serve-v(?P<version>.*)' |
| 42 | + |
| 43 | +[tool.hatch.version.raw-options] |
| 44 | +root = "../.." |
| 45 | +git_describe_command = 'git describe --tags --match="integrations/docling_serve-v[0-9]*"' |
| 46 | + |
| 47 | +[tool.hatch.envs.default] |
| 48 | +installer = "uv" |
| 49 | +dependencies = ["haystack-pydoc-tools", "ruff"] |
| 50 | + |
| 51 | +[tool.hatch.envs.default.scripts] |
| 52 | +docs = ["haystack-pydoc pydoc/config_docusaurus.yml"] |
| 53 | +fmt = "ruff check --fix {args}; ruff format {args}" |
| 54 | +fmt-check = "ruff check {args} && ruff format --check {args}" |
| 55 | + |
| 56 | +[tool.hatch.envs.test] |
| 57 | +dependencies = [ |
| 58 | + "pytest", |
| 59 | + "pytest-asyncio", |
| 60 | + "pytest-cov", |
| 61 | + "pytest-rerunfailures", |
| 62 | + "mypy", |
| 63 | + "pip", |
| 64 | +] |
| 65 | + |
| 66 | +[tool.hatch.envs.test.scripts] |
| 67 | +unit = 'pytest -m "not integration" {args:tests}' |
| 68 | +integration = 'pytest -m "integration" {args:tests}' |
| 69 | +all = 'pytest {args:tests}' |
| 70 | +unit-cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x -m "not integration" {args:tests}' |
| 71 | +integration-cov-append-retry = 'pytest --cov=haystack_integrations --cov-append --reruns 3 --reruns-delay 30 -x -m "integration" {args:tests}' |
| 72 | +types = "mypy -p haystack_integrations.components.converters.docling_serve {args}" |
| 73 | + |
| 74 | +[tool.mypy] |
| 75 | +install_types = true |
| 76 | +non_interactive = true |
| 77 | +check_untyped_defs = true |
| 78 | +disallow_incomplete_defs = true |
| 79 | + |
| 80 | +[[tool.mypy.overrides]] |
| 81 | +module = ["httpx"] |
| 82 | +ignore_missing_imports = true |
| 83 | + |
| 84 | +[tool.ruff] |
| 85 | +line-length = 120 |
| 86 | + |
| 87 | +[tool.ruff.lint] |
| 88 | +select = [ |
| 89 | + "A", |
| 90 | + "ANN", |
| 91 | + "ARG", |
| 92 | + "B", |
| 93 | + "C", |
| 94 | + "D102", |
| 95 | + "D103", |
| 96 | + "D205", |
| 97 | + "D209", |
| 98 | + "D213", |
| 99 | + "D417", |
| 100 | + "D419", |
| 101 | + "DTZ", |
| 102 | + "E", |
| 103 | + "EM", |
| 104 | + "F", |
| 105 | + "I", |
| 106 | + "ICN", |
| 107 | + "ISC", |
| 108 | + "N", |
| 109 | + "PLC", |
| 110 | + "PLE", |
| 111 | + "PLR", |
| 112 | + "PLW", |
| 113 | + "Q", |
| 114 | + "RUF", |
| 115 | + "S", |
| 116 | + "T", |
| 117 | + "TID", |
| 118 | + "UP", |
| 119 | + "W", |
| 120 | + "YTT", |
| 121 | +] |
| 122 | +ignore = [ |
| 123 | + "B027", |
| 124 | + "B008", |
| 125 | + "S105", |
| 126 | + "S106", |
| 127 | + "S107", |
| 128 | + "C901", |
| 129 | + "PLR0911", |
| 130 | + "PLR0912", |
| 131 | + "PLR0913", |
| 132 | + "PLR0915", |
| 133 | + "ANN401", |
| 134 | +] |
| 135 | + |
| 136 | +[tool.ruff.lint.isort] |
| 137 | +known-first-party = ["haystack_integrations"] |
| 138 | + |
| 139 | +[tool.ruff.lint.flake8-tidy-imports] |
| 140 | +ban-relative-imports = "parents" |
| 141 | + |
| 142 | +[tool.ruff.lint.per-file-ignores] |
| 143 | +"tests/**/*" = ["PLR2004", "S101", "TID252", "D", "ANN"] |
| 144 | + |
| 145 | +[tool.coverage.run] |
| 146 | +source = ["haystack_integrations"] |
| 147 | +branch = true |
| 148 | +relative_files = true |
| 149 | +parallel = false |
| 150 | + |
| 151 | +[tool.coverage.report] |
| 152 | +omit = ["*/tests/*", "*/__init__.py"] |
| 153 | +show_missing = true |
| 154 | +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] |
| 155 | + |
| 156 | +[tool.pytest.ini_options] |
| 157 | +addopts = "--strict-markers" |
| 158 | +markers = [ |
| 159 | + "integration: integration tests", |
| 160 | +] |
| 161 | +log_cli = true |
| 162 | +asyncio_mode = "auto" |
| 163 | +asyncio_default_fixture_loop_scope = "function" |
0 commit comments