Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.10", "3.11", "3.12"]
python: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
# MacOS issue ref.: https://github.com/actions/setup-python/issues/855 & https://github.com/actions/setup-python/issues/865
python-version: ${{ matrix.os == 'macos-latest' && matrix.python == '3.10' && '3.11' || matrix.python }}
python-version: ${{ matrix.python }}
architecture: x64
# MacOS: use crnn_vgg16_bn as recognition architecture to avoid onnxruntime error
- name: Set recognition arch for macOS
Expand All @@ -34,6 +34,6 @@ jobs:
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e . --upgrade
pip install -e .[cpu] --upgrade
- name: Import package
run: python -c "import labeler; print(labeler.__version__)"
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.10", "3.11", "3.12"]
python: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
# MacOS issue ref.: https://github.com/actions/setup-python/issues/855 & https://github.com/actions/setup-python/issues/865
python-version: ${{ matrix.os == 'macos-latest' && matrix.python == '3.10' && '3.11' || matrix.python }}
python-version: ${{ matrix.python }}
architecture: x64
# MacOS: use crnn_vgg16_bn as recognition architecture to avoid onnxruntime error
- name: Set recognition arch for macOS
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ["3.10"]
python: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ["3.10"]
python: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.10"]
python: ["3.11"]
steps:
- uses: actions/checkout@v7
- name: Set up Python
Expand All @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.10"]
python: ["3.11"]
steps:
- uses: actions/checkout@v7
- name: Set up Python
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ venv.bak/
.dmypy.json
dmypy.json

# ruff
.ruff_cache/

# Pyre type checker
.pyre/

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: no-commit-to-branch
args: ['--branch', 'main']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
rev: v0.15.22
hooks:
- id: ruff
args: [ --fix ]
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ Python 3.10 (or higher) and [pip](https://pip.pypa.io/en/stable/) are required t

### Latest release

You can then install the latest release of the package using [pypi](https://pypi.org/project/OnnxTR/) as follows:
You can then install the latest release of the package using [pypi](https://pypi.org/project/doctr-labeler/) as follows:

```bash
pip3 install doctr-labeler
# Install the CPU version
pip3 install "doctr-labeler[cpu]"
# Or with GPU support
pip3 install "doctr-labeler[gpu]"
```

## Keybindings
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainers = [
{name = "Felix Dittrich"},
]
readme = "README.md"
requires-python = ">=3.10.0,<4"
requires-python = ">=3.11.0,<4"
license = {file = "LICENSE"}
keywords=["OCR", "document processing", "labeling", "annotation", "docTR", "OnnxTR"]
classifiers=[
Expand All @@ -22,26 +22,21 @@ classifiers=[
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
dynamic = ["version"]
dependencies = [
"numpy>=1.16.0, <3.0.0",
"opencv-python>=4.5.0, <5.0.0",
"opencv-python>=4.5.0, <6.0.0",
"Pillow>=9.2.0",
"tqdm>=4.30.0",
"huggingface-hub>=0.23.0,<2.0.0",
# GUI
"sv-ttk>=2.6.0",
"darkdetect>=0.8.0",
# AutoML
# Linux & Windows
"onnxtr[gpu]>=0.6.0, <1.0.0; sys_platform != 'darwin'",
# MacOS compatibility
"onnxtr[cpu]>=0.6.0, <1.0.0; sys_platform == 'darwin'",
]

[project.scripts]
Expand Down Expand Up @@ -69,7 +64,12 @@ dev = [
"ruff>=0.1.5",
"mypy>=0.812",
"pre-commit>=2.17.0",
# AutoML
"onnxtr[cpu]>=0.6.0, <1.0.0",
]
# AutoML
cpu = ["onnxtr[cpu]>=0.6.0, <1.0.0"]
gpu = ["onnxtr[gpu]>=0.6.0, <1.0.0"]

[project.urls]
repository = "https://github.com/text2knowledge/docTR-Labeler"
Expand Down Expand Up @@ -113,7 +113,7 @@ ignore_missing_imports = true
[tool.ruff]
exclude = [".git", "venv*", "build", "**/__init__.py"]
line-length = 120
target-version = "py310"
target-version = "py311"
preview=true

[tool.ruff.lint]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import setup

PKG_NAME = "doctr-labeler"
VERSION = os.getenv("BUILD_VERSION", "0.3.1")
VERSION = os.getenv("BUILD_VERSION", "0.4.0")


if __name__ == "__main__":
Expand Down