[build-system]
requires = ["setuptools>=61.0", "wheel", "setuptools-ocrd"]

[project]
name = "eynollah"
authors = [
    {name = "Vahid Rezanezhad"},
    {name = "Staatsbibliothek zu Berlin - Preußischer Kulturbesitz"},
]
description = "Document Layout Analysis"
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.8"
keywords = [
    "document layout analysis",
    "image segmentation",
    "binarization",
    "optical character recognition"
]

dynamic = [
  "dependencies",
  "optional-dependencies",
  "version"
]

classifiers = [
    "Development Status :: 4 - Beta",
    "Environment :: Console",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "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 :: Only",
    "Topic :: Scientific/Engineering :: Image Processing",
]

[project.scripts]
eynollah = "eynollah.cli:main"
eynollah-training = "eynollah.training.cli:main"
ocrd-eynollah-segment = "eynollah.ocrd_cli:main"
ocrd-sbb-binarize = "eynollah.ocrd_cli_binarization:main"

[project.urls]
Homepage = "https://github.com/qurator-spk/eynollah"
Repository = "https://github.com/qurator-spk/eynollah.git"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
optional-dependencies.test = {file = ["requirements-test.txt"]}
optional-dependencies.OCR = {file = ["requirements-ocr.txt"]}
optional-dependencies.plotting = {file = ["requirements-plotting.txt"]}
optional-dependencies.training = {file = ["requirements-training.txt"]}

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"*" = ["*.json", '*.yml', '*.xml', '*.xsd', '*.ttf']

[tool.coverage.run]
branch = true
source = ["eynollah"]

[tool.ruff]
line-length = 120
include = ["pyproject.toml", "src/eynollah/**/*.py"]

[tool.ruff.lint]
ignore = [
# disable unused imports
"F401",
# disable import order
"E402",
# disable unused variables
"F841",
# disable bare except
"E722",
]

[tool.ruff.format]
quote-style = "preserve"

