[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "mosaicx"
version = "1.1.1"
description = "Medical cOmputational Suite for Advanced Intelligent eXtraction"
authors = [
    {name = "Lalith Kumar Shiyam Sundar", email = "lalith.shiyam@med.uni-muenchen.de"},
]
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["radiology", "medical", "llm", "extraction", "pdf", "nlp"]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Healthcare Industry",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Scientific/Engineering :: Medical Science Apps.",
    "Topic :: Text Processing :: Linguistic",
]
requires-python = ">=3.11"
dependencies = [
    "click>=8.1.0",
    "rich>=13.0.0",
    "rich-click>=1.8.0",
    "pydantic>=2.0.0",
    "openai>=1.0.0",
    "dspy-ai>=2.4.0",
    "docling>=2.0.0",
    "pyyaml>=6.0",
    "httpx>=0.25.0",
    "typing-extensions>=4.8.0",
    "ollama>=0.3.0",
    "python-cfonts>=1.0.0",
    "instructor>=1.0.0",
    "reportlab>=4.4.4",
    "requests>=2.31.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.4.0",
    "pytest-asyncio>=0.21.0",
    "pytest-cov>=4.1.0",
    "black>=23.7.0",
    "isort>=5.12.0",
    "mypy>=1.5.0",
    "pre-commit>=3.3.0",
    "ruff>=0.0.280",
]

[project.urls]
Homepage = "https://github.com/LalithShiyam/MOSAICX"
Repository = "https://github.com/LalithShiyam/MOSAICX"
Documentation = "https://github.com/LalithShiyam/MOSAICX#readme"
"Bug Tracker" = "https://github.com/LalithShiyam/MOSAICX/issues"

[project.scripts]
mosaicx = "mosaicx.mosaicx:main"

[tool.hatch.build.targets.wheel]
packages = ["mosaicx"]

[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
  # directories
  \.eggs
  | \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | build
  | dist
)/
'''

[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["mosaicx"]

[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true

[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
markers = [
    "unit: Unit tests",
    "integration: Integration tests", 
    "e2e: End-to-end tests",
    "contract: Contract tests",
    "slow: Slow running tests",
]

[tool.coverage.run]
source = ["mosaicx"]
omit = [
    "*/tests/*",
    "*/test_*",
    "*/__pycache__/*",
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "if self.debug:",
    "if settings.DEBUG",
    "raise AssertionError",
    "raise NotImplementedError",
    "if 0:",
    "if __name__ == .__main__.:",
    "class .*\\bProtocol\\):",
    "@(abc\\.)?abstractmethod",
]

[tool.ruff]
target-version = "py311"
line-length = 88

[tool.ruff.lint]
select = [
    "E",  # pycodestyle errors
    "W",  # pycodestyle warnings
    "F",  # pyflakes
    "I",  # isort
    "B",  # flake8-bugbear
    "C4", # flake8-comprehensions
    "UP", # pyupgrade
]
ignore = [
    "E501",  # line too long, handled by black
    "B008",  # do not perform function calls in argument defaults
    "C901",  # too complex
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["B011"]

[dependency-groups]
dev = [
    "black>=25.1.0",
    "isort>=6.0.1",
    "mypy>=1.17.1",
    "pre-commit>=4.3.0",
    "pytest>=8.4.2",
    "pytest-asyncio>=1.1.0",
    "pytest-cov>=7.0.0",
    "ruff>=0.13.0",
]
