content: [build-system]
  requires = ["setuptools", "wheel"]
  build-backend = "setuptools.build_meta"
  
  [project]
  name = "python-doctr"
  description = "Document Text Recognition (docTR): deep Learning for high-performance OCR on documents."
  authors = [{name = "Mindee", email = "contact@mindee.com"}]
  maintainers = [
      {name = "François-Guillaume Fernandez"},
      {name = "Charles Gaillard"},
      {name = "Olivier Dulcy"},
      {name = "Felix Dittrich"},
  ]
  readme = "README.md"
  requires-python = ">=3.10.0,<4"
  license = {file = "LICENSE"}
  keywords=["OCR", "deep learning", "computer vision", "pytorch", "text detection", "text recognition"]
  classifiers=[
          "Development Status :: 4 - Beta",
          "Intended Audience :: Developers",
          "Intended Audience :: Education",
          "Intended Audience :: Science/Research",
          "License :: OSI Approved :: Apache Software License",
          "Natural Language :: English",
          "Operating System :: OS Independent",
          "Programming Language :: Python :: 3",
          "Programming Language :: Python :: 3.10",
          "Programming Language :: Python :: 3.11",
          "Programming Language :: Python :: 3.12",
          "Topic :: Scientific/Engineering :: Artificial Intelligence",
  ]
  dynamic = ["version"]
  dependencies = [
      "torch>=2.0.0,<3.0.0",
      "torchvision>=0.15.0",
      "onnx>=1.12.0,<3.0.0",
      # For proper typing, mypy needs numpy>=1.20.0 (cf. https://github.com/numpy/numpy/pull/16515)
      # Additional typing support is brought by numpy>=1.22.4, but core build sticks to >=1.16.0
      "numpy>=1.16.0,<3.0.0",
      "scipy>=1.4.0,<2.0.0",
      "h5py>=3.1.0,<4.0.0",
      "opencv-python>=4.5.0,<5.0.0",
      "pypdfium2>=4.11.0,<5.0.0",
      "pyclipper>=1.2.0,<2.0.0",
      "shapely>=1.6.0,<3.0.0",
      "langdetect>=1.0.9,<2.0.0",
      "rapidfuzz>=3.0.0,<4.0.0",
      "huggingface-hub>=0.20.0,<1.0.0",
      "Pillow>=9.2.0",
      "defusedxml>=0.7.0",
      "anyascii>=0.3.2",
      "validators>=0.18.0",
      "tqdm>=4.30.0",
  ]
  
  [project.optional-dependencies]
  html = [
      "weasyprint>=55.0",
  ]
  viz = [
      "matplotlib>=3.1.0",
      "mplcursors>=0.3",
  ]
  contrib = [
      "onnxruntime>=1.11.0",
  ]
  testing = [
      "pytest>=5.3.2",
      "coverage[toml]>=4.5.4",
      "onnxruntime>=1.11.0",
      "requests>=2.20.0",
      "psutil>=5.9.5"
  ]
  quality = [
      "ruff>=0.1.5",
      "mypy>=0.812",
      "pre-commit>=2.17.0",
  ]
  docs = [
      "sphinx>=3.0.0,!=3.5.0",
      "sphinxemoji>=0.1.8",
      "sphinx-copybutton>=0.3.1",
      "docutils<0.23",
      "recommonmark>=0.7.1",
      "sphinx-markdown-tables>=0.0.15",
      "sphinx-tabs>=3.3.0",
      "furo>=2022.3.4",
  ]
  dev = [
      # PyTorch
      "torch>=2.0.0,<3.0.0",
      "torchvision>=0.15.0",
      "onnx>=1.12.0,<3.0.0",
      # Extras
      "weasyprint>=55.0",
      "matplotlib>=3.1.0",
      "mplcursors>=0.3",
      # Testing
      "pytest>=5.3.2",
      "coverage[toml]>=4.5.4",
      "onnxruntime>=1.11.0",
      "requests>=2.20.0",
      "psutil>=5.9.5",
      # Quality
      "ruff>=0.3.0",
      "mypy>=1.0",
      "pre-commit>=3.0.0",
      # Docs
      "sphinx>=3.0.0,!=3.5.0",
      "sphinxemoji>=0.1.8",
      "sphinx-copybutton>=0.3.1",
      "docutils<0.23",
      "recommonmark>=0.7.1",
      "sphinx-markdown-tables>=0.0.15",
      "sphinx-tabs>=3.3.0",
      "furo>=2022.3.4",
  ]
  
  [project.urls]
  documentation = "https://mindee.github.io/doctr"
  repository = "https://github.com/mindee/doctr"
  tracker = "https://github.com/mindee/doctr/issues"
  changelog = "https://mindee.github.io/doctr/changelog.html"
  
  [tool.setuptools]
  zip-safe = true
  
  [tool.setuptools.packages.find]
  exclude = ["api*", "demo*", "docs*", "notebooks*", "references*", "scripts*", "tests*"]
  
  [tool.setuptools.package-data]
  doctr = ["py.typed"]
  
  [tool.mypy]
  files = "doctr/"
  show_error_codes = true
  pretty = true
  warn_unused_ignores = true
  warn_redundant_casts = true
  no_implicit_optional = true
  check_untyped_defs = true
  implicit_reexport = false
  
  [[tool.mypy.overrides]]
  module = [
  	"anyascii.*",
  	"torchvision.*",
      "onnxruntime.*",
  	"PIL.*",
  	"tqdm.*",
  	"scipy.*",
  	"cv2.*",
  	"h5py.*",
  	"matplotlib.*",
  	"pyclipper.*",
  	"shapely.*",
  	"mplcursors.*",
  	"defusedxml.*",
  	"weasyprint.*",
  	"huggingface_hub.*",
  	"pypdfium2.*",
  	"rapidfuzz.*",
  	"langdetect.*",
  ]
  ignore_missing_imports = true
  
  [tool.ruff]
  exclude = [".git", "venv*", "build", "**/__init__.py"]
  line-length = 120
  target-version = "py310"
  preview=true
  
  [tool.ruff.lint]
  select = [
      # https://docs.astral.sh/ruff/rules/
      "E", "W", "F", "I", "N", "Q", "C4", "T10", "LOG",
      "D101", "D103", "D201","D202","D207","D208","D214","D215","D300","D301","D417", "D419", "D207"  # pydocstyle
  ]
  ignore = ["E402", "E203", "F403", "E731", "N812", "N817", "C408", "LOG015"]
  
  [tool.ruff.lint.isort]
  known-first-party = ["doctr", "app", "utils"]
  known-third-party = ["torch", "torchvision", "wandb", "tqdm", "fastapi", "onnxruntime", "cv2"]
  
  [tool.ruff.lint.per-file-ignores]
  "doctr/models/**.py" = ["N806", "F841"]
  "doctr/datasets/**.py" = ["N806"]
  "tests/**.py" = ["D"]
  "scripts/**.py" = ["D"]
  "docs/**.py" = ["D"]
  "references/**.py" = ["D"]
  "api/**.py" = ["D"]
  "demo/**.py" = ["D"]
  ".github/**.py" = ["D"]
  
  
  [tool.ruff.lint.flake8-quotes]
  docstring-quotes = "double"
  
  [tool.coverage.run]
  source = ["doctr"]
  