[build-system] requires = ["setuptools>=68"] build-backend = "setuptools.build_meta" [project] name = "ocr-pipeline" version = "0.1.0" description = "OCR pipeline for life science screenshots - RAG ready" readme = "README.md" requires-python = ">=3.11" dependencies = [ # Core "typer[all]>=0.9.0", "pydantic>=2.6.0", "pydantic-settings>=2.2.0", "pyyaml>=6.0.1", "structlog>=24.1.0", "rich>=13.7.0", "tqdm>=4.66.0", # Image processing "opencv-python-headless>=4.9.0", "pillow>=10.2.0", "numpy>=1.26.0", "scikit-image>=0.22.0", # OCR engines "paddleocr>=2.7.0,<3.0.0", "paddlepaddle>=2.6.0", "pytesseract>=0.3.10", # Table detection "torch>=2.2.0", "torchvision>=0.17.0", "transformers>=4.38.0", "timm>=1.0.0", "layoutparser>=0.3.0", # NLP "langchain-text-splitters>=0.0.2", "spacy>=3.7.0", "nbformat>=5.9.0", "legacy-cgi>=2.6.2", # Database "sqlite-utils>=3.37.0", # File watching "watchdog>=3.0.0", # Utilities "python-slugify>=8.0.0", "xxhash>=3.4.0", "python-magic>=0.4.27", "platformdirs>=4.2.0", ] [project.optional-dependencies] dev = [ "pytest>=8.0.0", "pytest-cov>=4.1.0", "pytest-mock>=3.12.0", "ruff>=0.2.0", "mypy>=1.8.0", "pre-commit>=3.6.0", ] grobid = [] full = [ "ocr-pipeline[dev]", ] [project.entry-points.console_scripts] ocr-pipeline = "ocr_pipeline.cli:app" [tool.setuptools.packages.find] where = ["src"] [tool.uv] dev-dependencies = [ "pytest>=8.0.0", "pytest-cov>=4.1.0", "pytest-mock>=3.12.0", "ruff>=0.2.0", "mypy>=1.8.0", "pre-commit>=3.6.0", ] override-dependencies = ["lxml>=5.3.0"] [tool.ruff] line-length = 100 target-version = "py311" select = [ "E", # pycodestyle "F", # pyflakes "I", # isort "N", # pep8-naming "W", # pycodestyle warnings "UP", # pyupgrade "B", # flake8-bugbear "C4", # flake8-comprehensions "T20", # flake8-print ] ignore = [ "E501", # line too long (handled by formatter) "B008", # function calls in default argument ] fixable = ["I", "E", "W", "F"] unfixable = ["N", "B", "C4", "T20", "UP"] [tool.ruff.format] quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "lf" [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 no_implicit_optional = true strict_equality = true show_error_codes = true pretty = true [tool.pytest.ini_options] testpaths = ["tests"] python_files = ["test_*.py"] python_classes = ["Test*"] python_functions = ["test_*"] addopts = "-v --tb=short" filterwarnings = [ "ignore::DeprecationWarning", "ignore::UserWarning:torch", "ignore::UserWarning:transformers", ] [tool.pre-commit-hooks] ruff = { id = "ruff", args = ["check", "--fix"] } ruff-format = { id = "ruff", args = ["format"] } mypy = { id = "mypy" } pytest = { id = "pytest", args = ["-x"] }