From 21a47c081acc5c0402d3cb1ff1dcd38aad595d4e Mon Sep 17 00:00:00 2001 From: cneud <952378+cneud@users.noreply.github.com> Date: Fri, 23 Feb 2024 20:18:38 +0100 Subject: [PATCH] refactor namespace to `eynollah` --- {qurator => eynollah}/.gitkeep | 0 {qurator => eynollah}/__init__.py | 0 {qurator => eynollah}/eynollah/__init__.py | 0 {qurator => eynollah}/eynollah/cli.py | 2 +- {qurator => eynollah}/eynollah/eynollah.py | 0 {qurator => eynollah}/eynollah/ocrd-tool.json | 0 {qurator => eynollah}/eynollah/ocrd_cli.py | 0 {qurator => eynollah}/eynollah/plot.py | 0 {qurator => eynollah}/eynollah/processor.py | 0 {qurator => eynollah}/eynollah/utils/__init__.py | 0 {qurator => eynollah}/eynollah/utils/contour.py | 0 {qurator => eynollah}/eynollah/utils/counter.py | 0 .../eynollah/utils/drop_capitals.py | 0 {qurator => eynollah}/eynollah/utils/is_nan.py | 0 {qurator => eynollah}/eynollah/utils/marginals.py | 0 {qurator => eynollah}/eynollah/utils/pil_cv2.py | 0 {qurator => eynollah}/eynollah/utils/resize.py | 0 {qurator => eynollah}/eynollah/utils/rotate.py | 0 .../eynollah/utils/separate_lines.py | 0 {qurator => eynollah}/eynollah/utils/xml.py | 0 {qurator => eynollah}/eynollah/writer.py | 0 setup.py | 6 +++--- tests/test_counter.py | 2 +- tests/test_dpi.py | 2 +- tests/test_run.py | 2 +- tests/test_smoke.py | 12 ++++++------ tests/test_xml.py | 2 +- 27 files changed, 14 insertions(+), 14 deletions(-) rename {qurator => eynollah}/.gitkeep (100%) rename {qurator => eynollah}/__init__.py (100%) rename {qurator => eynollah}/eynollah/__init__.py (100%) rename {qurator => eynollah}/eynollah/cli.py (99%) rename {qurator => eynollah}/eynollah/eynollah.py (100%) rename {qurator => eynollah}/eynollah/ocrd-tool.json (100%) rename {qurator => eynollah}/eynollah/ocrd_cli.py (100%) rename {qurator => eynollah}/eynollah/plot.py (100%) rename {qurator => eynollah}/eynollah/processor.py (100%) rename {qurator => eynollah}/eynollah/utils/__init__.py (100%) rename {qurator => eynollah}/eynollah/utils/contour.py (100%) rename {qurator => eynollah}/eynollah/utils/counter.py (100%) rename {qurator => eynollah}/eynollah/utils/drop_capitals.py (100%) rename {qurator => eynollah}/eynollah/utils/is_nan.py (100%) rename {qurator => eynollah}/eynollah/utils/marginals.py (100%) rename {qurator => eynollah}/eynollah/utils/pil_cv2.py (100%) rename {qurator => eynollah}/eynollah/utils/resize.py (100%) rename {qurator => eynollah}/eynollah/utils/rotate.py (100%) rename {qurator => eynollah}/eynollah/utils/separate_lines.py (100%) rename {qurator => eynollah}/eynollah/utils/xml.py (100%) rename {qurator => eynollah}/eynollah/writer.py (100%) diff --git a/qurator/.gitkeep b/eynollah/.gitkeep similarity index 100% rename from qurator/.gitkeep rename to eynollah/.gitkeep diff --git a/qurator/__init__.py b/eynollah/__init__.py similarity index 100% rename from qurator/__init__.py rename to eynollah/__init__.py diff --git a/qurator/eynollah/__init__.py b/eynollah/eynollah/__init__.py similarity index 100% rename from qurator/eynollah/__init__.py rename to eynollah/eynollah/__init__.py diff --git a/qurator/eynollah/cli.py b/eynollah/eynollah/cli.py similarity index 99% rename from qurator/eynollah/cli.py rename to eynollah/eynollah/cli.py index a2a2ad0..b720d83 100644 --- a/qurator/eynollah/cli.py +++ b/eynollah/eynollah/cli.py @@ -1,7 +1,7 @@ import sys import click from ocrd_utils import initLogging, setOverrideLogLevel -from qurator.eynollah.eynollah import Eynollah +from eynollah.eynollah.eynollah import Eynollah @click.command() diff --git a/qurator/eynollah/eynollah.py b/eynollah/eynollah/eynollah.py similarity index 100% rename from qurator/eynollah/eynollah.py rename to eynollah/eynollah/eynollah.py diff --git a/qurator/eynollah/ocrd-tool.json b/eynollah/eynollah/ocrd-tool.json similarity index 100% rename from qurator/eynollah/ocrd-tool.json rename to eynollah/eynollah/ocrd-tool.json diff --git a/qurator/eynollah/ocrd_cli.py b/eynollah/eynollah/ocrd_cli.py similarity index 100% rename from qurator/eynollah/ocrd_cli.py rename to eynollah/eynollah/ocrd_cli.py diff --git a/qurator/eynollah/plot.py b/eynollah/eynollah/plot.py similarity index 100% rename from qurator/eynollah/plot.py rename to eynollah/eynollah/plot.py diff --git a/qurator/eynollah/processor.py b/eynollah/eynollah/processor.py similarity index 100% rename from qurator/eynollah/processor.py rename to eynollah/eynollah/processor.py diff --git a/qurator/eynollah/utils/__init__.py b/eynollah/eynollah/utils/__init__.py similarity index 100% rename from qurator/eynollah/utils/__init__.py rename to eynollah/eynollah/utils/__init__.py diff --git a/qurator/eynollah/utils/contour.py b/eynollah/eynollah/utils/contour.py similarity index 100% rename from qurator/eynollah/utils/contour.py rename to eynollah/eynollah/utils/contour.py diff --git a/qurator/eynollah/utils/counter.py b/eynollah/eynollah/utils/counter.py similarity index 100% rename from qurator/eynollah/utils/counter.py rename to eynollah/eynollah/utils/counter.py diff --git a/qurator/eynollah/utils/drop_capitals.py b/eynollah/eynollah/utils/drop_capitals.py similarity index 100% rename from qurator/eynollah/utils/drop_capitals.py rename to eynollah/eynollah/utils/drop_capitals.py diff --git a/qurator/eynollah/utils/is_nan.py b/eynollah/eynollah/utils/is_nan.py similarity index 100% rename from qurator/eynollah/utils/is_nan.py rename to eynollah/eynollah/utils/is_nan.py diff --git a/qurator/eynollah/utils/marginals.py b/eynollah/eynollah/utils/marginals.py similarity index 100% rename from qurator/eynollah/utils/marginals.py rename to eynollah/eynollah/utils/marginals.py diff --git a/qurator/eynollah/utils/pil_cv2.py b/eynollah/eynollah/utils/pil_cv2.py similarity index 100% rename from qurator/eynollah/utils/pil_cv2.py rename to eynollah/eynollah/utils/pil_cv2.py diff --git a/qurator/eynollah/utils/resize.py b/eynollah/eynollah/utils/resize.py similarity index 100% rename from qurator/eynollah/utils/resize.py rename to eynollah/eynollah/utils/resize.py diff --git a/qurator/eynollah/utils/rotate.py b/eynollah/eynollah/utils/rotate.py similarity index 100% rename from qurator/eynollah/utils/rotate.py rename to eynollah/eynollah/utils/rotate.py diff --git a/qurator/eynollah/utils/separate_lines.py b/eynollah/eynollah/utils/separate_lines.py similarity index 100% rename from qurator/eynollah/utils/separate_lines.py rename to eynollah/eynollah/utils/separate_lines.py diff --git a/qurator/eynollah/utils/xml.py b/eynollah/eynollah/utils/xml.py similarity index 100% rename from qurator/eynollah/utils/xml.py rename to eynollah/eynollah/utils/xml.py diff --git a/qurator/eynollah/writer.py b/eynollah/eynollah/writer.py similarity index 100% rename from qurator/eynollah/writer.py rename to eynollah/eynollah/writer.py diff --git a/setup.py b/setup.py index 9abf158..bc836df 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( author='Vahid Rezanezhad', url='https://github.com/qurator-spk/eynollah', license='Apache License 2.0', - namespace_packages=['qurator'], + namespace_packages=['eynollah'], packages=find_packages(exclude=['tests']), install_requires=install_requires, package_data={ @@ -21,8 +21,8 @@ setup( }, entry_points={ 'console_scripts': [ - 'eynollah=qurator.eynollah.cli:main', - 'ocrd-eynollah-segment=qurator.eynollah.ocrd_cli:main', + 'eynollah=eynollah.eynollah.cli:main', + 'ocrd-eynollah-segment=eynollah.eynollah.ocrd_cli:main', ] }, ) diff --git a/tests/test_counter.py b/tests/test_counter.py index 8ef0756..125b7c1 100644 --- a/tests/test_counter.py +++ b/tests/test_counter.py @@ -1,5 +1,5 @@ from tests.base import main -from qurator.eynollah.utils.counter import EynollahIdCounter +from eynollah.eynollah.utils.counter import EynollahIdCounter def test_counter_string(): c = EynollahIdCounter() diff --git a/tests/test_dpi.py b/tests/test_dpi.py index 510ffc5..6317cd4 100644 --- a/tests/test_dpi.py +++ b/tests/test_dpi.py @@ -1,6 +1,6 @@ import cv2 from pathlib import Path -from qurator.eynollah.utils.pil_cv2 import check_dpi +from eynollah.eynollah.utils.pil_cv2 import check_dpi from tests.base import main def test_dpi(): diff --git a/tests/test_run.py b/tests/test_run.py index b1137e7..eeee964 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -2,7 +2,7 @@ from os import environ from pathlib import Path from ocrd_utils import pushd_popd from tests.base import CapturingTestCase as TestCase, main -from qurator.eynollah.cli import main as eynollah_cli +from eynollah.eynollah.cli import main as eynollah_cli testdir = Path(__file__).parent.resolve() diff --git a/tests/test_smoke.py b/tests/test_smoke.py index d069479..b0a7846 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -1,7 +1,7 @@ def test_utils_import(): - import qurator.eynollah.utils - import qurator.eynollah.utils.contour - import qurator.eynollah.utils.drop_capitals - import qurator.eynollah.utils.drop_capitals - import qurator.eynollah.utils.is_nan - import qurator.eynollah.utils.rotate + import eynollah.eynollah.utils + import eynollah.eynollah.utils.contour + import eynollah.eynollah.utils.drop_capitals + import eynollah.eynollah.utils.drop_capitals + import eynollah.eynollah.utils.is_nan + import eynollah.eynollah.utils.rotate diff --git a/tests/test_xml.py b/tests/test_xml.py index 8422fd1..c8bac53 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -1,5 +1,5 @@ from pytest import main -from qurator.eynollah.utils.xml import create_page_xml +from eynollah.eynollah.utils.xml import create_page_xml from ocrd_models.ocrd_page import to_xml PAGE_2019 = 'http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15'