content: [build-system]
  requires = [
    "setuptools>=48",
    "setuptools_scm[toml]>=6.3.1",
    # protobuf-generation tools
    "grpcio-tools==1.75.1",
    "mypy-protobuf==3.6.0",
    "types-protobuf>=3.20.4"
  ]
  build-backend = "setuptools.build_meta"
  
  [project]
  name = "vllm-tgis-adapter"
  description = "vLLM adapter for a TGIS-compatible grpc server"
  readme = "README.md"
  license = {text = "Apache 2"}
  authors = [{name = "Daniele Trifirò", email = "dtrifiro@redhat.com"}]
  classifiers = [
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Development Status :: 4 - Beta"
  ]
  requires-python = ">=3.9"
  dynamic = ["version"]
  dependencies = [
    "vllm>=0.10.0",
    "prometheus_client==0.21.1",
    "grpcio==1.75.1",
    "grpcio-health-checking==1.75.1",
    "grpcio-reflection==1.75.1",
    "accelerate==1.7.0",
    "hf-transfer==0.1.9",
    "cachetools~=5.5"
  ]
  
  [project.urls]
  Issues = "https://github.com/opendatahub-io/vllm-tgis-adapter/issues"
  Source = "https://github.com/opendatahub-io/vllm-tgis-adapter"
  
  [project.scripts]
  grpc_healthcheck = "vllm_tgis_adapter.healthcheck:cli"
  model-util = "vllm_tgis_adapter.tgis_utils.scripts:cli"
  text-generation-server = "vllm_tgis_adapter.tgis_utils.scripts:cli"
  
  [project.optional-dependencies]
  tests = [
    "pytest==8.3.5",
    "pytest-cov==6.0.0",
    "pytest-mock==3.14.0",
    "pytest-asyncio==0.25.3",
    "requests==2.32.3"
  ]
  dev = [
    "vllm_tgis_adapter[tests]",
    "ruff==0.11.11",
    "mypy==1.15.0",
    "types-protobuf==5.28.0.20240924",
    "types-requests==2.32.0.20250515"
  ]
  flash_attn = [
    # it's easier to install flash-attn from wheel rather than like this as extra
    # "https://github.com/Dao-AILab/flash-attention/releases/download/v2.5.6/flash_attn-2.5.6+cu118torch2.0cxx11abiFALSE-cp311-cp311-linux_x86_64.whl",
    "flash-attn==2.6.3",
    "packaging",  # FIXME: temporary, until https://github.com/Dao-AILab/flash-attention/pull/937 is released
    "ninja"
  ]
  
  [tool.setuptools_scm]
  version_file = "src/vllm_tgis_adapter/_version.py"
  
  [tool.setuptools.packages.find]
  where = ["src"]
  namespaces = false
  
  [tool.setuptools.package-data]
  vllm_tgis_adapter = [
    "**/*.proto"
  ]
  
  [tool.pytest.ini_options]
  addopts = "-ra -k \"not hf_data\""
  markers = [
    "hf_data: marks tests that download data from HF hub (deselect with '-m \"not hf_data\"')"
  ]
  
  [tool.coverage.run]
  branch = true
  source = ["vllm_tgis_adapter", "tests"]
  
  [tool.coverage.paths]
  source = ["src", "*/site-packages"]
  
  [tool.coverage.report]
  show_missing = true
  exclude_lines = [
    "pragma: no cover",
    "if __name__ == .__main__.:",
    "if typing.TYPE_CHECKING:",
    "if TYPE_CHECKING:",
    "raise NotImplementedError",
    "raise AssertionError",
    "@overload"
  ]
  
  [tool.mypy]
  # Error output
  show_column_numbers = true
  show_error_codes = true
  show_error_context = true
  show_traceback = true
  pretty = true
  check_untyped_defs = false
  # Warnings
  warn_no_return = true
  warn_redundant_casts = true
  warn_unreachable = true
  files = ["src", "tests"]
  
  [[tool.mypy.overrides]]
  ignore_missing_imports = true
  module = [
    "grpc"
  ]
  
  [tool.codespell]
  ignore-words-list = " "
  
  [tool.ruff]
  output-format = "full"
  show-fixes = true
  
  [tool.ruff.lint]
  ignore = [
    "S101",  # assert
    "PLR2004",  # magic-value-comparison
    "PLW2901",  # redefined-loop-name
    "ISC001",  # single-line-implicit-string-concatenation
    "SIM105",  # suppressible-exception
    "SIM108",  # if-else-block-instead-of-if-exp
    "D100",  # Missing docstring in public module
    "D101",  # Missing docstring in public class
    "D102",  # Missing docstring in public method
    "D103",  # Missing docstring in public function
    "D104",  # Missing docstring in public package
    "D107",  # Missing docstring in init
    "EM102",  # Exception must not use a string literal, assign to variable first
    "D203",  # one blank line before class
    "D213",  # multi-line-summary-second-line
    "PTH123",  # open() should be replaced by Path.open
    "ANN204",  # missing  issing return type annotation for special method `__init__`
    "EM101",  # Exception must not use a string literal, assign to variable first
    "TRY003",  # Avoid specifying long messages outside the exception class
    "TD",  # todo messages
    "FIX",  # todo messages
    "ERA001",  # commented out code
    # formatting
    "COM812",
    "RET504"  # Unnecessary assignment to `args` before `return` statement
  ]
  select = ["ALL"]
  
  [tool.ruff.lint.per-file-ignores]
  "**/__init__.py" = ["F401"]
  "*src/vllm_tgis_adapter/grpc/grpc_server.py" = [
    "N802",  # name should be lowercase
    "ERA001"  # Found commented-out code
  ]
  "src/vllm_tgis_adapter/healthcheck.py" = ["T201"]
  "src/vllm_tgis_adapter/_version.py" = ["ALL"]
  "tests/**" = ["S", "ARG001", "ARG002", "ANN", "PT019", "FBT001", "FBT002"]
  "tests/utils.py" = ["T201"]
  "setup.py" = [
    "T201",  # print() use
    "S603",  # subprocess call: check for execution of untrusted input
    "D",  # docs
    "ANN",  # annotations
    "TRY003"  # long messages outside exception class
  ]
  "src/vllm_tgis_adapter/http.py" = [
    "A005"  # module shadows a Python standard-library module
  ]
  "src/vllm_tgis_adapter/logging.py" = [
    "A005"  # module shadows a Python standard-library module
  ]
  "examples/*" = [
    "T201",
    "D",
    "ANN",
    "TRY003",
    'INP001',
    "PTH109",
    "EM101",
    "BLE001",
    "PLR0913"
  ]
  ".github/scripts/install_vllm_build_deps.py" = [
    "EXE003"
  ]
  
  [tool.ruff.lint.flake8-type-checking]
  strict = true
  
  [tool.ruff.lint.isort]
  known-first-party = ["vllm_tgis_adapter"]
  