diff --git a/pyproject.toml b/pyproject.toml index a6fd582..96bba34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" [project] @@ -7,39 +7,36 @@ name = "texteller" authors = [ { name="OleehyO", email="leehy0357@gmail.com" } ] -version = "1.0.0" -description = "Texteller is a tool for converting latex image to text" +dynamic = ["version"] +description = "Texteller is a tool for converting rendered image to original latex code" readme = "README.md" +license = { file = "LICENSE" } requires-python = ">=3.10" dependencies = [ - "accelerate>=1.4.0", - "augraphy>=8.2.6", - "datasets>=3.3.2", - "evaluate>=0.4.3", - "onnx>=1.17.0", - "onnxruntime>=1.20.1", - "opencv-python>=4.11.0.86", - "optimum>=1.24.0", + "click>=8.1.8", + "colorama>=0.4.6", + "opencv-python-headless>=4.11.0.86", "pyclipper>=1.3.0.post6", - "python-multipart>=0.0.20", - "ray[serve]>=2.43.0", - "shapely>=2.0.7", - "streamlit>=1.42.2", + "shapely>=2.1.0", + "streamlit>=1.44.1", "streamlit-paste-button>=0.1.2", - "tensorboardx>=2.6.2.2", "torch>=2.6.0", "torchvision>=0.21.0", "transformers==4.45.2", + "wget>=3.2", ] +[tool.hatch.version] +source = "vcs" + [tool.ruff] -exclude = ['.git', '.mypy_cache', '.ruff_cache', '.venv', 'dist'] -target-version = 'py310' +exclude = [".git", ".mypy_cache", ".ruff_cache", ".venv", "dist"] +target-version = "py310" line-length = 100 [tool.ruff.format] -line-ending = 'lf' -quote-style = 'preserve' +line-ending = "lf" +quote-style = "double" [tool.ruff.lint] select = ["E", "W"] @@ -52,9 +49,43 @@ ignore = [ "F403", "F841", "E501", + "W291", "W293", "E741", + "E712", ] [tool.hatch.build.targets.wheel] packages = ["texteller"] + +[project.scripts] +texteller = "texteller.cli:cli" + +[project.optional-dependencies] +onnxruntime = [ + "optimum[onnxruntime]>=1.24.0", +] +onnxruntime-gpu = [ + "onnxruntime-gpu>=1.21.0", +] +server = [ + "python-multipart>=0.0.20", + "ray[serve]>=2.44.1", +] +test = [ + "pytest>=8.3.5", +] +train = [ + "accelerate>=1.6.0", + "augraphy>=8.2.6", + "datasets>=3.5.0", + "tensorboardx>=2.6.2.2", +] +docs = [ + "myst-parser>=4.0.1", + "nbsphinx>=0.9.7", + "sphinx>=8.1.3", + "sphinx-book-theme>=1.1.4", + "sphinx-copybutton>=0.5.2", + "sphinx-design>=0.6.1", +]