darachhat
feat: build production-ready Khmer Document Corpus v0.2.0 with Typer CLI, PyMuPDF, Polars, and DI architecture
c4e128a | [build-system] | |
| requires = ["hatchling"] | |
| build-backend = "hatchling.build" | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| # Project Metadata | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| [project] | |
| name = "khmer-document-corpus" | |
| version = "0.2.0" | |
| description = "Production-ready HuggingFace dataset builder for Khmer PDF documents." | |
| readme = "README.md" | |
| license = { text = "CC-BY-4.0" } | |
| authors = [{ name = "Darachhat" }] | |
| keywords = ["khmer", "document-ai", "ocr", "pdf", "dataset", "corpus", "nlp"] | |
| classifiers = [ | |
| "Development Status :: 3 - Alpha", | |
| "Intended Audience :: Science/Research", | |
| "Topic :: Scientific/Engineering :: Artificial Intelligence", | |
| "Programming Language :: Python :: 3", | |
| "Programming Language :: Python :: 3.12", | |
| ] | |
| requires-python = ">=3.12" | |
| dependencies = [ | |
| # CLI | |
| "typer[all]>=0.12", | |
| # PDF parsing | |
| "pymupdf>=1.24", | |
| "pypdf>=4.2", | |
| # DataFrames / exports | |
| "polars>=0.20", | |
| "pyarrow>=16", | |
| # Images | |
| "Pillow>=10.3", | |
| # Schemas & config | |
| "pydantic>=2.7", | |
| "pydantic-settings>=2.3", | |
| "pyyaml>=6.0", | |
| "python-dotenv>=1.0", | |
| # Logging | |
| "loguru>=0.7", | |
| # HuggingFace | |
| "huggingface-hub>=0.23", | |
| "datasets>=2.20", | |
| # Utilities | |
| "rich>=13.7", | |
| "tqdm>=4.66", | |
| ] | |
| [project.optional-dependencies] | |
| dev = [ | |
| "pytest>=8.2", | |
| "pytest-cov>=5.0", | |
| "pytest-asyncio>=0.23", | |
| "ruff>=0.5", | |
| "black>=24.4", | |
| "mypy>=1.10", | |
| "pre-commit>=3.7", | |
| ] | |
| [project.scripts] | |
| corpus = "cli.main:app" | |
| kdc = "cli.main:app" | |
| [project.urls] | |
| Homepage = "https://huggingface.co/datasets/Darachhat/khmer-document-corpus" | |
| Repository = "https://github.com/Darachhat/khmer-document-corpus" | |
| "Bug Tracker" = "https://github.com/Darachhat/khmer-document-corpus/issues" | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| # Build | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| [tool.hatch.build.targets.wheel] | |
| packages = ["app", "cli"] | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| # Ruff | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| [tool.ruff] | |
| line-length = 100 | |
| target-version = "py312" | |
| [tool.ruff.lint] | |
| select = ["E", "F", "I", "UP", "B", "SIM"] | |
| ignore = ["E501", "B008"] | |
| [tool.ruff.lint.isort] | |
| known-first-party = ["app", "cli"] | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| # Black | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| [tool.black] | |
| line-length = 100 | |
| target-version = ["py312"] | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| # mypy | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| [tool.mypy] | |
| python_version = "3.12" | |
| strict = true | |
| ignore_missing_imports = true | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| # pytest | |
| # ────────────────────────────────────────────────────────────────────────────── | |
| [tool.pytest.ini_options] | |
| testpaths = ["tests"] | |
| asyncio_mode = "auto" | |
| addopts = "--tb=short -v" | |
| [tool.coverage.run] | |
| source = ["app", "cli"] | |
| omit = ["tests/*", "scripts/*"] | |