diff --git a/sbb_newspapers_org_image/.gitkeep b/qurator/.gitkeep similarity index 100% rename from sbb_newspapers_org_image/.gitkeep rename to qurator/.gitkeep diff --git a/qurator/__init__.py b/qurator/__init__.py new file mode 100644 index 0000000..5284146 --- /dev/null +++ b/qurator/__init__.py @@ -0,0 +1 @@ +__import__("pkg_resources").declare_namespace(__name__) diff --git a/sbb_newspapers_org_image/__init__.py b/qurator/eynollah/__init__.py similarity index 100% rename from sbb_newspapers_org_image/__init__.py rename to qurator/eynollah/__init__.py diff --git a/sbb_newspapers_org_image/cli.py b/qurator/eynollah/cli.py similarity index 98% rename from sbb_newspapers_org_image/cli.py rename to qurator/eynollah/cli.py index c18555d..514853a 100644 --- a/sbb_newspapers_org_image/cli.py +++ b/qurator/eynollah/cli.py @@ -1,7 +1,7 @@ import sys import click from ocrd_utils import initLogging, setOverrideLogLevel -from sbb_newspapers_org_image.eynollah import Eynollah +from qurator.eynollah.eynollah import Eynollah @click.command() diff --git a/sbb_newspapers_org_image/eynollah.py b/qurator/eynollah/eynollah.py similarity index 100% rename from sbb_newspapers_org_image/eynollah.py rename to qurator/eynollah/eynollah.py diff --git a/sbb_newspapers_org_image/plot.py b/qurator/eynollah/plot.py similarity index 100% rename from sbb_newspapers_org_image/plot.py rename to qurator/eynollah/plot.py diff --git a/sbb_newspapers_org_image/utils/__init__.py b/qurator/eynollah/utils/__init__.py similarity index 100% rename from sbb_newspapers_org_image/utils/__init__.py rename to qurator/eynollah/utils/__init__.py diff --git a/sbb_newspapers_org_image/utils/contour.py b/qurator/eynollah/utils/contour.py similarity index 100% rename from sbb_newspapers_org_image/utils/contour.py rename to qurator/eynollah/utils/contour.py diff --git a/sbb_newspapers_org_image/utils/drop_capitals.py b/qurator/eynollah/utils/drop_capitals.py similarity index 100% rename from sbb_newspapers_org_image/utils/drop_capitals.py rename to qurator/eynollah/utils/drop_capitals.py diff --git a/sbb_newspapers_org_image/utils/is_nan.py b/qurator/eynollah/utils/is_nan.py similarity index 100% rename from sbb_newspapers_org_image/utils/is_nan.py rename to qurator/eynollah/utils/is_nan.py diff --git a/sbb_newspapers_org_image/utils/marginals.py b/qurator/eynollah/utils/marginals.py similarity index 100% rename from sbb_newspapers_org_image/utils/marginals.py rename to qurator/eynollah/utils/marginals.py diff --git a/sbb_newspapers_org_image/utils/pil_cv2.py b/qurator/eynollah/utils/pil_cv2.py similarity index 100% rename from sbb_newspapers_org_image/utils/pil_cv2.py rename to qurator/eynollah/utils/pil_cv2.py diff --git a/sbb_newspapers_org_image/utils/resize.py b/qurator/eynollah/utils/resize.py similarity index 100% rename from sbb_newspapers_org_image/utils/resize.py rename to qurator/eynollah/utils/resize.py diff --git a/sbb_newspapers_org_image/utils/rotate.py b/qurator/eynollah/utils/rotate.py similarity index 100% rename from sbb_newspapers_org_image/utils/rotate.py rename to qurator/eynollah/utils/rotate.py diff --git a/sbb_newspapers_org_image/utils/separate_lines.py b/qurator/eynollah/utils/separate_lines.py similarity index 100% rename from sbb_newspapers_org_image/utils/separate_lines.py rename to qurator/eynollah/utils/separate_lines.py diff --git a/sbb_newspapers_org_image/utils/xml.py b/qurator/eynollah/utils/xml.py similarity index 100% rename from sbb_newspapers_org_image/utils/xml.py rename to qurator/eynollah/utils/xml.py diff --git a/sbb_newspapers_org_image/writer.py b/qurator/eynollah/writer.py similarity index 100% rename from sbb_newspapers_org_image/writer.py rename to qurator/eynollah/writer.py diff --git a/setup.py b/setup.py index 8e34b43..7988aee 100644 --- a/setup.py +++ b/setup.py @@ -10,12 +10,13 @@ setup( author='Vahid Rezanezhad', url='https://github.com/qurator-spk/eynollah', license='Apache License 2.0', - packages=find_packages(), + namespace_packages=['qurator'], + packages=find_packages(exclude=['tests']), install_requires=install_requires, entry_points={ 'console_scripts': [ - 'eynollah=sbb_newspapers_org_image.cli:main', - # 'ocrd-eynollah=eynollah.ocrd_cli:cli', + 'eynollah=qurator.eynollah.cli:main', + # 'ocrd-eynollah=qurator.eynollah.ocrd_cli:cli', ] }, ) diff --git a/tests/test_dpi.py b/tests/test_dpi.py index 59c5df4..380928d 100644 --- a/tests/test_dpi.py +++ b/tests/test_dpi.py @@ -1,5 +1,5 @@ from pathlib import Path -from sbb_newspapers_org_image.utils.pil_cv2 import check_dpi +from qurator.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 74f7fde..b1137e7 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 sbb_newspapers_org_image.cli import main as eynollah_cli +from qurator.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 7d1b381..d069479 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -1,7 +1,7 @@ def test_utils_import(): - import sbb_newspapers_org_image.utils - import sbb_newspapers_org_image.utils.contour - import sbb_newspapers_org_image.utils.drop_capitals - import sbb_newspapers_org_image.utils.drop_capitals - import sbb_newspapers_org_image.utils.is_nan - import sbb_newspapers_org_image.utils.rotate + 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 diff --git a/tests/test_xml.py b/tests/test_xml.py index fa0e793..052f91e 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -1,5 +1,5 @@ from lxml import etree as ET -from sbb_newspapers_org_image.utils.xml import create_page_xml, NAMESPACES +from qurator.eynollah.utils.xml import create_page_xml, NAMESPACES def tostring(el): return ET.tostring(el).decode('utf-8')