From 28aafacd1e8e0259d9770b9fe43fd65cfd9f7cab Mon Sep 17 00:00:00 2001 From: Yoann Schneider <yschneider@teklia.com> Date: Fri, 31 May 2024 13:43:28 +0000 Subject: [PATCH] Remove document processing dependency --- docs/dev.md | 11 +---------- requirements.txt | 1 - tests/test_image_utils.py | 5 ++++- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docs/dev.md b/docs/dev.md index fc5278e..0626ff2 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -2,17 +2,8 @@ ## Base setup -This package is based on a GitLab package registry containing all the document processing source code. -You need [a personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with [scope](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#personal-access-token-scopes) `read_api` and access to the [teklia-document-processing repository](https://gitlab.teklia.com/tools/document-processing) in order to install this module. You will need to add the below to your `~/.netrc` file: - -```shell -machine gitlab.teklia.com -login __token__ -password <YOUR_PERSONAL_TOKEN> -``` - - Use a virtualenv (e.g. with virtualenvwrapper `mkvirtualenv -a . atr-data-gen`) -- Install `atr-data-generator` as a package (e.g. with pip `pip install --index-url https://gitlab.teklia.com/api/v4/projects/149/packages/pypi/simple -e .`) +- Install `atr-data-generator` as a package (e.g. with pip `pip install -e .`) ## Unit tests diff --git a/requirements.txt b/requirements.txt index 9acefaf..e6d70b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ arkindex-export==0.1.9 requests==2.28.2 -teklia-document-processing==0.2.1 teklia-line-image-extractor==0.2.9 teklia-toolbox==0.1.3 tenacity==8.2.2 diff --git a/tests/test_image_utils.py b/tests/test_image_utils.py index 9dd89bf..9546212 100644 --- a/tests/test_image_utils.py +++ b/tests/test_image_utils.py @@ -1,11 +1,14 @@ # -*- coding: utf-8 -*- +from typing import NamedTuple + import pytest import pytest_lazyfixture -from document_processing.utils import BoundingBox from atr_data_generator.extract.utils import _is_vertical, resize_image_height +BoundingBox = NamedTuple("BoundingBox", x=int, y=int, width=int, height=int) + @pytest.mark.parametrize( "bbox, vertical", -- GitLab