| | [build-system] |
| | requires = ["hatchling>=1.8.0"] |
| | build-backend = "hatchling.build" |
| |
|
| | [project] |
| | name = "haystack-ai" |
| | dynamic = ["version"] |
| | description = "LLM framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data." |
| | readme = "README.md" |
| | license = "Apache-2.0" |
| | requires-python = ">=3.8" |
| | authors = [{ name = "deepset.ai", email = "malte.pietsch@deepset.ai" }] |
| | keywords = [ |
| | "BERT", |
| | "QA", |
| | "Question-Answering", |
| | "Reader", |
| | "Retriever", |
| | "albert", |
| | "language-model", |
| | "mrc", |
| | "roberta", |
| | "search", |
| | "semantic-search", |
| | "squad", |
| | "transfer-learning", |
| | "transformer", |
| | ] |
| | classifiers = [ |
| | "Development Status :: 5 - Production/Stable", |
| | "Intended Audience :: Science/Research", |
| | "License :: Freely Distributable", |
| | "License :: OSI Approved :: Apache Software License", |
| | "Operating System :: OS Independent", |
| | "Programming Language :: Python", |
| | "Programming Language :: Python :: 3", |
| | "Programming Language :: Python :: 3.8", |
| | "Programming Language :: Python :: 3.9", |
| | "Programming Language :: Python :: 3.10", |
| | "Programming Language :: Python :: 3.11", |
| | "Programming Language :: Python :: 3.12", |
| | "Topic :: Scientific/Engineering :: Artificial Intelligence", |
| | ] |
| | dependencies = [ |
| | "pandas", |
| | "tqdm", |
| | "tenacity!=8.4.0", |
| | "lazy-imports", |
| | "openai>=1.1.0", |
| | "Jinja2", |
| | "posthog", |
| | "pyyaml", |
| | "more-itertools", |
| | "networkx", |
| | "typing_extensions>=4.7", |
| | "requests", |
| | "numpy", |
| | "python-dateutil", |
| | "haystack-experimental", |
| | ] |
| |
|
| | [tool.hatch.envs.default] |
| | installer = "uv" |
| | dependencies = [ |
| | "pre-commit", |
| | "ruff", |
| | "toml", |
| | "reno", |
| | |
| | |
| | |
| | "dulwich>=0.21.0,<1.0.0", |
| | ] |
| |
|
| | [tool.hatch.envs.default.scripts] |
| | release-note = "reno new {args}" |
| | check = "ruff check {args}" |
| | fix = "ruff check --fix" |
| | format = "ruff format {args}" |
| | format-check = "ruff format --check {args}" |
| |
|
| | [tool.hatch.envs.test] |
| | extra-dependencies = [ |
| | "numpy>=2", |
| |
|
| | "transformers[torch,sentencepiece]==4.44.2", |
| | "huggingface_hub>=0.23.0", |
| | "sentence-transformers>=3.0.0", |
| | "langdetect", |
| | "openai-whisper>=20231106", |
| | "arrow>=1.3.0", |
| |
|
| | |
| | "spacy>=3.8,<3.9", |
| | "spacy-curated-transformers>=0.2,<=0.3", |
| | "en-core-web-trf @ https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.8.0/en_core_web_trf-3.8.0-py3-none-any.whl", |
| |
|
| | |
| | "pypdf", |
| | "pdfminer.six", |
| | "markdown-it-py", |
| | "mdit_plain", |
| | "tika", |
| | "azure-ai-formrecognizer>=3.2.0b2", |
| | "trafilatura", |
| | "python-pptx", |
| | "python-docx", |
| | "jq", |
| |
|
| | "nltk", |
| |
|
| | |
| | "jsonref", |
| | "openapi3", |
| |
|
| | |
| | "jsonschema", |
| |
|
| | |
| | "opentelemetry-sdk", |
| | "ddtrace", |
| |
|
| | |
| | "structlog", |
| |
|
| | |
| | "isort", |
| | "pyproject-parser", |
| |
|
| | |
| | "pytest", |
| | "pytest-bdd", |
| | "pytest-cov", |
| | "pytest-custom_exit_code", |
| | "pytest-asyncio", |
| | "pytest-rerunfailures", |
| | "responses", |
| | "tox", |
| | "coverage", |
| | "python-multipart", |
| | "psutil", |
| | "mypy", |
| | "pip", |
| | "pylint", |
| | "ipython", |
| | ] |
| |
|
| | [tool.hatch.envs.test.scripts] |
| | e2e = "pytest e2e" |
| | unit = 'pytest --cov-report xml:coverage.xml --cov="haystack" -m "not integration" {args:test}' |
| | integration = 'pytest --maxfail=5 -m "integration" {args:test}' |
| | integration-mac = 'pytest --maxfail=5 -m "integration" -k "not tika" {args:test}' |
| | integration-windows = 'pytest --maxfail=5 -m "integration" -k "not tika" {args:test}' |
| | types = "mypy --install-types --non-interactive --cache-dir=.mypy_cache/ {args:haystack}" |
| | lint = "pylint -ry -j 0 {args:haystack}" |
| |
|
| | [tool.hatch.envs.readme] |
| | installer = "uv" |
| | detached = true |
| | dependencies = ["haystack-pydoc-tools"] |
| |
|
| | [tool.hatch.envs.readme.scripts] |
| | sync = "./.github/utils/pydoc-markdown.sh" |
| | delete-outdated = "python ./.github/utils/delete_outdated_docs.py {args}" |
| |
|
| | [project.urls] |
| | "CI: GitHub" = "https://github.com/deepset-ai/haystack/actions" |
| | "Docs: RTD" = "https://haystack.deepset.ai/overview/intro" |
| | "GitHub: issues" = "https://github.com/deepset-ai/haystack/issues" |
| | "GitHub: repo" = "https://github.com/deepset-ai/haystack" |
| | Homepage = "https://github.com/deepset-ai/haystack" |
| |
|
| | [tool.hatch.version] |
| | path = "VERSION.txt" |
| | pattern = "(?P<version>.+)" |
| |
|
| | [tool.hatch.metadata] |
| | allow-direct-references = true |
| |
|
| | [tool.hatch.build.targets.sdist] |
| | include = ["/haystack", "/VERSION.txt"] |
| |
|
| | [tool.hatch.build.targets.wheel] |
| | packages = ["haystack"] |
| |
|
| | [tool.codespell] |
| | ignore-words-list = "ans,astroid,nd,ned,nin,ue,rouge,ist" |
| | quiet-level = 3 |
| | skip = "./test,./e2e" |
| |
|
| | [tool.pylint.'MESSAGES CONTROL'] |
| | max-line-length = 120 |
| | disable = [ |
| |
|
| | |
| | "fixme", |
| | "c-extension-no-member", |
| |
|
| | |
| | "missing-docstring", |
| | "unused-argument", |
| | "no-member", |
| | "line-too-long", |
| | "protected-access", |
| | "too-few-public-methods", |
| | "raise-missing-from", |
| | "invalid-name", |
| | "duplicate-code", |
| | "arguments-differ", |
| | "consider-using-f-string", |
| | "no-else-return", |
| | "attribute-defined-outside-init", |
| | "super-with-arguments", |
| | "redefined-builtin", |
| | "abstract-method", |
| | "unspecified-encoding", |
| | "unidiomatic-typecheck", |
| | "no-name-in-module", |
| | "consider-using-with", |
| | "redefined-outer-name", |
| | "arguments-renamed", |
| | "unnecessary-pass", |
| | "broad-except", |
| | "unnecessary-comprehension", |
| | "subprocess-run-check", |
| | "singleton-comparison", |
| | "consider-iterating-dictionary", |
| | "undefined-loop-variable", |
| | "consider-using-in", |
| | "bare-except", |
| | "unexpected-keyword-arg", |
| | "simplifiable-if-expression", |
| | "use-list-literal", |
| | "broad-exception-raised", |
| |
|
| | |
| | "cyclic-import", |
| | "import-outside-toplevel", |
| | "deprecated-method", |
| | ] |
| | [tool.pylint.'DESIGN'] |
| | max-args = 38 |
| | max-attributes = 28 |
| | max-branches = 34 |
| | max-locals = 45 |
| | max-module-lines = 2468 |
| | max-nested-blocks = 9 |
| | max-statements = 206 |
| | [tool.pylint.'SIMILARITIES'] |
| | min-similarity-lines = 6 |
| |
|
| | [tool.pytest.ini_options] |
| | minversion = "6.0" |
| | addopts = "--strict-markers" |
| | markers = [ |
| | "unit: unit tests", |
| | "integration: integration tests", |
| |
|
| | "generator: generator tests", |
| | "summarizer: summarizer tests", |
| | "embedding_dim: uses a document store with non-default embedding dimension (e.g @pytest.mark.embedding_dim(128))", |
| |
|
| | "tika: requires Tika container", |
| | "parsr: requires Parsr container", |
| | "ocr: requires Tesseract", |
| |
|
| | "elasticsearch: requires Elasticsearch container", |
| | "weaviate: requires Weaviate container", |
| | "pinecone: requires Pinecone credentials", |
| | "faiss: uses FAISS", |
| | "opensearch", |
| | "document_store", |
| | ] |
| | log_cli = true |
| |
|
| | [tool.mypy] |
| | warn_return_any = false |
| | warn_unused_configs = true |
| | ignore_missing_imports = true |
| |
|
| | [tool.ruff] |
| | line-length = 120 |
| | target-version = "py38" |
| | exclude = [".github", "proposals"] |
| |
|
| | [tool.ruff.format] |
| | skip-magic-trailing-comma = true |
| |
|
| | [tool.ruff.lint] |
| | isort.split-on-trailing-comma = false |
| | exclude = ["test/**", "e2e/**"] |
| | select = [ |
| | "ASYNC", |
| | "C4", |
| | "C90", |
| | "E501", |
| | "EXE", |
| | "F", |
| | "INT", |
| | "PERF", |
| | "PL", |
| | "Q", |
| | "SIM", |
| | "SLOT", |
| | "T10", |
| | "W", |
| | "YTT", |
| | "I", |
| | |
| | "A001", |
| | "A002", |
| | "A003", |
| | |
| | "D102", |
| | "D103", |
| | "D209", |
| | "D205", |
| | "D213", |
| | "D417", |
| | "D419", |
| | ] |
| |
|
| | ignore = [ |
| | "F401", |
| | "PERF203", |
| | "PERF401", |
| | "PLR1714", |
| | "PLR5501", |
| | "PLW0603", |
| | "PLW1510", |
| | "PLW2901", |
| | "SIM108", |
| | "SIM115", |
| | "SIM118", |
| | ] |
| |
|
| | [tool.ruff.lint.mccabe] |
| | max-complexity = 28 |
| |
|
| | [tool.ruff.lint.per-file-ignores] |
| | "examples/basic_qa_pipeline.py" = ["C416"] |
| | "haystack/preview/testing/document_store.py" = ["C416", "F821"] |
| | "haystack/telemetry.py" = ["F821"] |
| |
|
| | [tool.ruff.lint.pylint] |
| | allow-magic-value-types = ["float", "int", "str"] |
| | max-args = 14 |
| | max-branches = 21 |
| | max-public-methods = 20 |
| | max-returns = 7 |
| | max-statements = 60 |
| |
|
| | [tool.coverage.run] |
| | omit = ["haystack/testing/*"] |
| |
|