content: [tool.ruff]
  
  # description of all rules are available on https://docs.astral.sh/ruff/rules/
  lint.select = ["D", "E", "F", "W", "C", "S", "I", "G", "TCH", "SLOT", "RUF", "C90", "N", "YTT", "ASYNC", "A", "C4", "T10", "FURB", "PERF", "AIR", "NPY", "FLY", "PLW2901"]
  
  # we need to check 'mood' of all docstrings, this needs to be enabled explicitly
  lint.extend-select = ["D401"]
  
  lint.ignore = []
  
  # always generate Python 3.11-compatible code.
  target-version = "py311"
  lint.pydocstyle.convention = "google"
  line-length = 100
  
  [tool.ruff.lint.per-file-ignores]
  "tests/*" = ["S101"]
  "scripts/*" = ["S101"]
  
  [tool.pdm.version]
  source = "file"
  path = "ols/version.py"
  
  [tool.coverage.report]
  # unit tests fails if the total coverage measurement is under this threshold value
  fail_under = 90
  
  [tool.mypy]
  disable_error_code = ["union-attr", "return-value", "arg-type", "import-untyped"]
  ignore_missing_imports = true
  plugins = ["pydantic.mypy"]
  
  [tool.pydantic-mypy]
  init_forbid_extra = true
  init_typed = true
  warn_required_dynamic_aliases = true
  
  [tool.bandit]
  skips = []
  exclude_dirs = ["tests", "scripts"]
  
  [tool.pdm]
  distribution = true
  
  [tool.pdm.dev-dependencies]
  dev = [
      "black>=25.1.0",
      "pydocstyle>=6.3.0",
      "mypy>=1.17.0",  # Usually needs to be set to latest stable version available
      "packaging>=24.1",
      "pytest>=8.3.2",
      "pytest-cov>=5.0.0",
      "pytest-asyncio>=0.24.0",
      "pydantic>=2.9.2",
      "ruff>=0.8.0",
      "bandit>=1.7.9",
      "types-requests>=2.32.0.20240622",
      "gradio>=4.44.1",
      "boto3>=1.34.145",
      "pyroscope-io>=0.8.8",
      "memray>=1.15.0",
      "reportportal-client>=5.5.6",
      "pytest-reportportal>=5.4.1",
      "pytest-benchmark[histogram]>=4.0.0",
      "typing-extensions>=4.12.2",
      "pytest-subtests>=0.13.1",
      "build>=1.2.2.post1",
      "twine>=5.1.1",
      "pylint>=3.3.2",
      "matplotlib>=3.10.0",
  ]
  
  # The following section is needed only for torch[cpu] variant on Linux,
  # because this variant need to be downloaded from external link, not from
  # standard Python package index:
  #
  # [[tool.pdm.source]]
  # type = "find_links"
  # url = "https://download.pytorch.org/whl/cpu/torch_stable.html"
  # name = "torch"
  
  
  [build-system]
  requires = ["pdm-backend"]
  build-backend = "pdm.backend"
  
  [project]
  name = "ols"
  dynamic = ["version"]
  description = "OpenShift Lightspeed is an AI powered assistant that runs on OpenShift and provides answers to product questions using backend LLM services."
  authors = []
  # NOTE: langchain bumps causes mypy issues
  dependencies = [
      "pdm>=2.21.0",
      "httpx>=0.27.2",
      "fastapi>=0.115.6",
      "langchain>=0.3.12",
      "langchain-ibm>=0.3.2",
      "llama-index>=0.12.25",
      "llama-index-core>=0.12.2",
      "llama-index-vector-stores-faiss>=0.3.0",
      "llama-index-embeddings-huggingface>=0.4.0",
      "uvicorn>=0.32.1",
      "faiss-cpu>=1.9.0.post1",
      "openai>=1.54.3",
      "ibm-generative-ai>=3.0.0",  # bam dep
      "langchain-openai>=0.2.9",
      "pydantic>=2.9.2",
      "setuptools>=72.1.0",
      "prometheus-client>=0.20.0",
      "kubernetes>=30.1.0",
      "psycopg2-binary>=2.9.9",
      "azure-identity>=1.18.0",
      "langchain-community>0.3.27",  # CVE version
      "sqlalchemy>=2.0.35",
      "ibm-watsonx-ai>=1.3.6",
      "certifi>=2024.8.30",
      "cryptography>=44.0.1",
      "urllib3>=2.2.3",
      "zipp>=3.20.1",
      "jinja2>=3.1.6",
      "starlette>=0.41.3",
      "virtualenv>=20.28.0",
      "requests>=2.32.2",
      "transformers>=4.50.3",
      "langchain-mcp-adapters>=0.0.11",
      "mcp>=1.10.0",  # CVEs in lower version
  ]
  requires-python = ">=3.11.1,<=3.12.10"
  readme = "README.md"
  license = {file = "LICENSE"}
  
  [project.urls]
  Homepage = "https://github.com/openshift/lightspeed-service"
  Issues = "https://github.com/openshift/lightspeed-service/issues"
  
  [project.optional-dependencies]
  evaluation = [
      "scikit-learn>=1.6.1",
      "pandas>=2.1.4",
      "rouge-score>=0.1.2",
      "ragas>=0.2.14",
      "fastparquet>=2024.11.0",
      "tqdm>=4.67.1",
  ]
  [tool.pdm.scripts]
  start = "pdm run make run"
  test = "pdm run make test"
  test-unit = "pdm run make test-unit"
  test-integration = "pdm run make test-integration"
  test-e2e = "pdm run make test-e2e"
  coverage-report = "pdm run make coverage-report"
  unit-tests-coverage-report = "pdm run make unit-tests-coverage-report"
  integration-tests-coverage-report = "pdm run make integration-tests-coverage-report"
  check-types = "pdm run make check-types"
  generate-schema = "pdm run make schema"
  security-check = "pdm run make security-check"
  benchmarks = "pdm run make benchmarks"
  requirements = "pdm run make requirements.txt"
  version = "pdm run make print-version"
  verify-sources = "pdm run make verify"
  verify-packages = " pdm run make verify-packages-completeness"
  
  [tool.setuptools]
  packages = ["ols"]
  
  [tool.pylint."MESSAGES CONTROL"]
  good-names = ["e"]
  disable = ["C0301", "C0302", "E0602", "E0611", "E1101", "R0902", "R0903", "R0913", "R0914", "W0102", "W0212", "W0511", "W0613", "W0621", "W0707", "W0718", "W0719", "R0801", "R0917"]
  