[chore] Setup vcs and deps

This commit is contained in:
OleehyO
2025-04-21 02:41:46 +00:00
parent 5cf9960a7c
commit 7490fa9c5a

View File

@@ -1,5 +1,5 @@
[build-system] [build-system]
requires = ["hatchling"] requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[project] [project]
@@ -7,39 +7,36 @@ name = "texteller"
authors = [ authors = [
{ name="OleehyO", email="leehy0357@gmail.com" } { name="OleehyO", email="leehy0357@gmail.com" }
] ]
version = "1.0.0" dynamic = ["version"]
description = "Texteller is a tool for converting latex image to text" description = "Texteller is a tool for converting rendered image to original latex code"
readme = "README.md" readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10" requires-python = ">=3.10"
dependencies = [ dependencies = [
"accelerate>=1.4.0", "click>=8.1.8",
"augraphy>=8.2.6", "colorama>=0.4.6",
"datasets>=3.3.2", "opencv-python-headless>=4.11.0.86",
"evaluate>=0.4.3",
"onnx>=1.17.0",
"onnxruntime>=1.20.1",
"opencv-python>=4.11.0.86",
"optimum>=1.24.0",
"pyclipper>=1.3.0.post6", "pyclipper>=1.3.0.post6",
"python-multipart>=0.0.20", "shapely>=2.1.0",
"ray[serve]>=2.43.0", "streamlit>=1.44.1",
"shapely>=2.0.7",
"streamlit>=1.42.2",
"streamlit-paste-button>=0.1.2", "streamlit-paste-button>=0.1.2",
"tensorboardx>=2.6.2.2",
"torch>=2.6.0", "torch>=2.6.0",
"torchvision>=0.21.0", "torchvision>=0.21.0",
"transformers==4.45.2", "transformers==4.45.2",
"wget>=3.2",
] ]
[tool.hatch.version]
source = "vcs"
[tool.ruff] [tool.ruff]
exclude = ['.git', '.mypy_cache', '.ruff_cache', '.venv', 'dist'] exclude = [".git", ".mypy_cache", ".ruff_cache", ".venv", "dist"]
target-version = 'py310' target-version = "py310"
line-length = 100 line-length = 100
[tool.ruff.format] [tool.ruff.format]
line-ending = 'lf' line-ending = "lf"
quote-style = 'preserve' quote-style = "double"
[tool.ruff.lint] [tool.ruff.lint]
select = ["E", "W"] select = ["E", "W"]
@@ -52,9 +49,43 @@ ignore = [
"F403", "F403",
"F841", "F841",
"E501", "E501",
"W291",
"W293", "W293",
"E741", "E741",
"E712",
] ]
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
packages = ["texteller"] 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",
]