Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
pyproject.toml 4.90 KiB
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]

[tool.codespell]
check-filenames = true
check-hidden = true
ignore-words-list = "astroid,gallary,momento,narl,ot,rouge"
# Feel free to un-skip examples, and experimental, you will just need to
# work through many typos (--write-changes and --interactive will help)
skip = "./llama_index/core/_static,./examples,./experimental,*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"

[tool.mypy]
disallow_untyped_defs = true
# Remove venv skip when integrated with pre-commit
exclude = ["_static", "build", "examples", "llama_index/ingestion/client", "notebooks", "venv"]
explicit_package_bases = true
ignore_missing_imports = true
mypy_path = "llama_index"
namespace_packages = true
python_version = "3.8"

[tool.poetry]
authors = ["Jerry Liu <jerry@llamaindex.ai>"]
classifiers = [
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Software Development :: Libraries :: Application Frameworks",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
description = "Interface between LLMs and your data"
documentation = "https://docs.llamaindex.ai/en/stable/"
homepage = "https://llamaindex.ai"
keywords = ["LLM", "NLP", "RAG", "data", "devtools", "index", "retrieval"]
license = "MIT"
maintainers = [
    "Andrei Fajardo <andrei@runllama.ai>",
    "Haotian Zhang <ht@runllama.ai>",
    "Jerry Liu <jerry@llamaindex.ai>",
    "Logan Markewich <logan@llamaindex.ai>",
    "Simon Suo <simon@llamaindex.ai>",
    "Sourabh Desai <sourabh@llamaindex.ai>",
]
name = "llama-index"
packages = [{from = "_llama-index", include = "llama_index"}]
readme = "README.md"
repository = "https://github.com/run-llama/llama_index"
version = "0.10.27"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
llama-index-legacy = "^0.9.48"
llama-index-llms-openai = "^0.1.13"
llama-index-embeddings-openai = "^0.1.5"
llama-index-program-openai = "^0.1.3"
llama-index-question-gen-openai = "^0.1.2"
llama-index-agent-openai = ">=0.1.4,<0.3.0"
llama-index-readers-file = "^0.1.4"
llama-index-readers-llama-parse = "^0.1.2"
llama-index-indices-managed-llama-cloud = "^0.1.2"
llama-index-core = "^0.10.27"
llama-index-multi-modal-llms-openai = "^0.1.3"
llama-index-cli = "^0.1.2"

[tool.poetry.group.dev.dependencies]
black = {extras = ["jupyter"], version = ">=23.7.0,<=24.3.0"}
codespell = {extras = ["toml"], version = ">=v2.2.6"}
mypy = "0.991"
pre-commit = "3.2.0"
pylint = "2.15.10"
ruff = "0.0.292"
types-Deprecated = ">=0.1.0"
types-PyYAML = "^6.0.12.12"
types-protobuf = "^4.24.0.4"
types-redis = "4.5.5.0"
types-requests = "2.28.11.8"  # TODO: unpin when mypy>0.991
types-setuptools = "67.1.0.0"

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
autodoc-pydantic = "<=1.9.0"
docutils = "<0.17"
furo = ">=2023.3.27"
m2r2 = "0.3.2"
myst-nb = "0.17.2"
myst-parser = "0.18.1"
pydantic = "<2.0.0"
sphinx = ">=4.3.0"
sphinx-autobuild = "^2021.3.14"
sphinx-automodapi = "^0.16.0"
sphinx-reredirects = "^0.1.3"
sphinx-rtd-theme = "^1.3.0"
sphinxcontrib-gtagjs = "^0.2.1"

[tool.poetry.scripts]
llamaindex-cli = 'llama_index.cli.command_line:main'

[[tool.poetry.source]]
name = "nvidia-pypi"
priority = "supplemental"
url = "https://pypi.nvidia.com"

[tool.ruff]
exclude = [
    "_static",
    "examples",
    "llama_index/ingestion/client",
    "notebooks",
]
ignore = [
    "COM812",  # Too aggressive
    "D212",  # Using D213
    "D417",  # Too aggressive
    "F541",  # Messes with prompts.py
    "TCH002",
    "UP006",  # Messes with pydantic
    "UP007",  # Wants | over Union, which breaks 3.8
]
# Feel free to add more here
select = [
    "ANN204",
    "B009",
    "B010",
    "B011",
    "B013",
    "B014",
    "C4",
    "COM812",
    "COM819",
    "D201",
    "D202",
    "D203",
    "D204",
    "D207",
    "D208",
    "D209",
    "D211",
    "D213",
    "D214",
    "D215",
    "D3",
    "D4",
    "E7",
    "EXE004",
    "F401",
    "F504",
    "F541",
    "F632",
    "FLY",
    "G010",
    "I002",
    "PERF1",
    "PIE790",
    "PIE794",
    "PIE808",
    "PIE810",
    "PLC0414",
    "PLE2510",
    "PLE2512",
    "PLE2513",
    "PLE2514",
    "PLE2515",
    "PLR1701",
    "PLR1711",
    "PT001",
    "PT003",
    "PT006",
    "PT02",
    "PTH201",
    "PYI",
    "Q",
    "RET501",
    "RET502",
    "RET503",
    "RET504",
    "RSE",
    "RUF005",
    "RUF010",
    "RUF015",
    "RUF1",
    "SIM101",
    "SIM103",
    "SIM109",
    "SIM118",
    "SIM2",
    "SIM300",
    "SIM9",
    "TCH005",
    "TD006",
    "TID",
    "TRY201",
    "UP",
    "W",
]
target-version = "py38"
unfixable = [
    "ERA001",
]

[tool.ruff.flake8-annotations]
mypy-init-return = true

[tool.ruff.pydocstyle]
convention = "google"

[tool.tomlsort]
all = true
in_place = true
spaces_before_inline_comment = 2  # Match Python PEP 8
spaces_indent_inline_array = 4  # Match Python PEP 8
trailing_comma_inline_array = true

[tool.tomlsort.overrides."tool.poetry.dependencies"]
table_keys = false