diff --git a/README-DEV.md b/README-DEV.md index 219d125..d7b0a3f 100644 --- a/README-DEV.md +++ b/README-DEV.md @@ -1,6 +1,6 @@ Testing ======= -Use `pytest` to run the tests in [the tests directory](qurator/dinglehopper/tests): +Use `pytest` to run the tests in [the tests directory](dinglehopper/tests): ```bash virtualenv -p /usr/bin/python3 venv . venv/bin/activate @@ -27,7 +27,7 @@ pytest All tests with code coverage: ```bash -pytest --cov=qurator --cov-report=html +pytest --cov=dinglehopper --cov-report=html ``` Static code analysis: diff --git a/qurator/dinglehopper/__init__.py b/dinglehopper/__init__.py similarity index 100% rename from qurator/dinglehopper/__init__.py rename to dinglehopper/__init__.py diff --git a/qurator/dinglehopper/align.py b/dinglehopper/align.py similarity index 100% rename from qurator/dinglehopper/align.py rename to dinglehopper/align.py diff --git a/qurator/dinglehopper/character_error_rate.py b/dinglehopper/character_error_rate.py similarity index 100% rename from qurator/dinglehopper/character_error_rate.py rename to dinglehopper/character_error_rate.py diff --git a/qurator/dinglehopper/cli.py b/dinglehopper/cli.py similarity index 100% rename from qurator/dinglehopper/cli.py rename to dinglehopper/cli.py diff --git a/qurator/dinglehopper/cli_extract.py b/dinglehopper/cli_extract.py similarity index 100% rename from qurator/dinglehopper/cli_extract.py rename to dinglehopper/cli_extract.py diff --git a/qurator/dinglehopper/cli_line_dirs.py b/dinglehopper/cli_line_dirs.py similarity index 100% rename from qurator/dinglehopper/cli_line_dirs.py rename to dinglehopper/cli_line_dirs.py diff --git a/qurator/dinglehopper/config.py b/dinglehopper/config.py similarity index 100% rename from qurator/dinglehopper/config.py rename to dinglehopper/config.py diff --git a/qurator/dinglehopper/edit_distance.py b/dinglehopper/edit_distance.py similarity index 100% rename from qurator/dinglehopper/edit_distance.py rename to dinglehopper/edit_distance.py diff --git a/qurator/dinglehopper/extracted_text.py b/dinglehopper/extracted_text.py similarity index 100% rename from qurator/dinglehopper/extracted_text.py rename to dinglehopper/extracted_text.py diff --git a/qurator/dinglehopper/notebooks/Levenshtein.ipynb b/dinglehopper/notebooks/Levenshtein.ipynb similarity index 100% rename from qurator/dinglehopper/notebooks/Levenshtein.ipynb rename to dinglehopper/notebooks/Levenshtein.ipynb diff --git a/qurator/dinglehopper/notebooks/Unicode normalization and Character segmentation.ipynb b/dinglehopper/notebooks/Unicode normalization and Character segmentation.ipynb similarity index 100% rename from qurator/dinglehopper/notebooks/Unicode normalization and Character segmentation.ipynb rename to dinglehopper/notebooks/Unicode normalization and Character segmentation.ipynb diff --git a/qurator/dinglehopper/ocr_files.py b/dinglehopper/ocr_files.py similarity index 100% rename from qurator/dinglehopper/ocr_files.py rename to dinglehopper/ocr_files.py diff --git a/qurator/dinglehopper/ocrd-tool.json b/dinglehopper/ocrd-tool.json similarity index 100% rename from qurator/dinglehopper/ocrd-tool.json rename to dinglehopper/ocrd-tool.json diff --git a/qurator/dinglehopper/ocrd_cli.py b/dinglehopper/ocrd_cli.py similarity index 100% rename from qurator/dinglehopper/ocrd_cli.py rename to dinglehopper/ocrd_cli.py diff --git a/qurator/dinglehopper/templates/report.html.j2 b/dinglehopper/templates/report.html.j2 similarity index 100% rename from qurator/dinglehopper/templates/report.html.j2 rename to dinglehopper/templates/report.html.j2 diff --git a/qurator/dinglehopper/templates/report.html.js b/dinglehopper/templates/report.html.js similarity index 100% rename from qurator/dinglehopper/templates/report.html.js rename to dinglehopper/templates/report.html.js diff --git a/qurator/dinglehopper/templates/report.json.j2 b/dinglehopper/templates/report.json.j2 similarity index 100% rename from qurator/dinglehopper/templates/report.json.j2 rename to dinglehopper/templates/report.json.j2 diff --git a/qurator/dinglehopper/tests/__init__.py b/dinglehopper/tests/__init__.py similarity index 100% rename from qurator/dinglehopper/tests/__init__.py rename to dinglehopper/tests/__init__.py diff --git a/qurator/dinglehopper/tests/data/00000119.tif b/dinglehopper/tests/data/00000119.tif similarity index 100% rename from qurator/dinglehopper/tests/data/00000119.tif rename to dinglehopper/tests/data/00000119.tif diff --git a/qurator/dinglehopper/tests/data/actevedef_718448162/OCR-D-GT-PAGE/00000024.page.xml b/dinglehopper/tests/data/actevedef_718448162/OCR-D-GT-PAGE/00000024.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/actevedef_718448162/OCR-D-GT-PAGE/00000024.page.xml rename to dinglehopper/tests/data/actevedef_718448162/OCR-D-GT-PAGE/00000024.page.xml diff --git a/qurator/dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml b/dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml similarity index 100% rename from qurator/dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml rename to dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml diff --git a/qurator/dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-TESS/OCR-D-OCR-TESS_0001.xml b/dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-TESS/OCR-D-OCR-TESS_0001.xml similarity index 100% rename from qurator/dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-TESS/OCR-D-OCR-TESS_0001.xml rename to dinglehopper/tests/data/actevedef_718448162/OCR-D-OCR-TESS/OCR-D-OCR-TESS_0001.xml diff --git a/qurator/dinglehopper/tests/data/actevedef_718448162/mets.xml b/dinglehopper/tests/data/actevedef_718448162/mets.xml similarity index 100% rename from qurator/dinglehopper/tests/data/actevedef_718448162/mets.xml rename to dinglehopper/tests/data/actevedef_718448162/mets.xml diff --git a/qurator/dinglehopper/tests/data/bigger-texts/00008228/00008228-00236534.gt4hist.xml b/dinglehopper/tests/data/bigger-texts/00008228/00008228-00236534.gt4hist.xml similarity index 100% rename from qurator/dinglehopper/tests/data/bigger-texts/00008228/00008228-00236534.gt4hist.xml rename to dinglehopper/tests/data/bigger-texts/00008228/00008228-00236534.gt4hist.xml diff --git a/qurator/dinglehopper/tests/data/bigger-texts/00008228/00008228.gt.xml b/dinglehopper/tests/data/bigger-texts/00008228/00008228.gt.xml similarity index 100% rename from qurator/dinglehopper/tests/data/bigger-texts/00008228/00008228.gt.xml rename to dinglehopper/tests/data/bigger-texts/00008228/00008228.gt.xml diff --git a/qurator/dinglehopper/tests/data/brochrnx_73075507X/00000139.gt.page.xml b/dinglehopper/tests/data/brochrnx_73075507X/00000139.gt.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/brochrnx_73075507X/00000139.gt.page.xml rename to dinglehopper/tests/data/brochrnx_73075507X/00000139.gt.page.xml diff --git a/qurator/dinglehopper/tests/data/brochrnx_73075507X/00000139.ocrd-tess.ocr.page.xml b/dinglehopper/tests/data/brochrnx_73075507X/00000139.ocrd-tess.ocr.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/brochrnx_73075507X/00000139.ocrd-tess.ocr.page.xml rename to dinglehopper/tests/data/brochrnx_73075507X/00000139.ocrd-tess.ocr.page.xml diff --git a/qurator/dinglehopper/tests/data/levels-are-different.page.xml b/dinglehopper/tests/data/levels-are-different.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/levels-are-different.page.xml rename to dinglehopper/tests/data/levels-are-different.page.xml diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.gt.page.xml b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.gt.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.gt.page.xml rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.gt.page.xml diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.ocr.tesseract.alto.xml b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.ocr.tesseract.alto.xml similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.ocr.tesseract.alto.xml rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.ocr.tesseract.alto.xml diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.pdf b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.pdf similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.pdf rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.pdf diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.tif b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.tif similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.tif rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan-bad.tif diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.gt.page.xml b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.gt.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.gt.page.xml rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.gt.page.xml diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.ocr.tesseract.alto.xml b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.ocr.tesseract.alto.xml similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.ocr.tesseract.alto.xml rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.ocr.tesseract.alto.xml diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.pdf b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.pdf similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.pdf rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.pdf diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.tif b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.tif similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.tif rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum-scan.tif diff --git a/qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum.odt b/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum.odt similarity index 100% rename from qurator/dinglehopper/tests/data/lorem-ipsum/lorem-ipsum.odt rename to dinglehopper/tests/data/lorem-ipsum/lorem-ipsum.odt diff --git a/qurator/dinglehopper/tests/data/mixed-regions.page.xml b/dinglehopper/tests/data/mixed-regions.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/mixed-regions.page.xml rename to dinglehopper/tests/data/mixed-regions.page.xml diff --git a/qurator/dinglehopper/tests/data/order.page.xml b/dinglehopper/tests/data/order.page.xml similarity index 100% rename from qurator/dinglehopper/tests/data/order.page.xml rename to dinglehopper/tests/data/order.page.xml diff --git a/qurator/dinglehopper/tests/data/table-order/table-no-reading-order.xml b/dinglehopper/tests/data/table-order/table-no-reading-order.xml similarity index 100% rename from qurator/dinglehopper/tests/data/table-order/table-no-reading-order.xml rename to dinglehopper/tests/data/table-order/table-no-reading-order.xml diff --git a/qurator/dinglehopper/tests/data/table-order/table-order-0001.xml b/dinglehopper/tests/data/table-order/table-order-0001.xml similarity index 100% rename from qurator/dinglehopper/tests/data/table-order/table-order-0001.xml rename to dinglehopper/tests/data/table-order/table-order-0001.xml diff --git a/qurator/dinglehopper/tests/data/table-order/table-order-0002.xml b/dinglehopper/tests/data/table-order/table-order-0002.xml similarity index 100% rename from qurator/dinglehopper/tests/data/table-order/table-order-0002.xml rename to dinglehopper/tests/data/table-order/table-order-0002.xml diff --git a/qurator/dinglehopper/tests/data/table-order/table-region.xml b/dinglehopper/tests/data/table-order/table-region.xml similarity index 100% rename from qurator/dinglehopper/tests/data/table-order/table-region.xml rename to dinglehopper/tests/data/table-order/table-region.xml diff --git a/qurator/dinglehopper/tests/data/table-order/table-unordered.xml b/dinglehopper/tests/data/table-order/table-unordered.xml similarity index 100% rename from qurator/dinglehopper/tests/data/table-order/table-unordered.xml rename to dinglehopper/tests/data/table-order/table-unordered.xml diff --git a/qurator/dinglehopper/tests/data/test-fake-ocr.page2018.xml b/dinglehopper/tests/data/test-fake-ocr.page2018.xml similarity index 100% rename from qurator/dinglehopper/tests/data/test-fake-ocr.page2018.xml rename to dinglehopper/tests/data/test-fake-ocr.page2018.xml diff --git a/qurator/dinglehopper/tests/data/test-gt.page2018.xml b/dinglehopper/tests/data/test-gt.page2018.xml similarity index 100% rename from qurator/dinglehopper/tests/data/test-gt.page2018.xml rename to dinglehopper/tests/data/test-gt.page2018.xml diff --git a/qurator/dinglehopper/tests/data/test.alto1.xml b/dinglehopper/tests/data/test.alto1.xml similarity index 100% rename from qurator/dinglehopper/tests/data/test.alto1.xml rename to dinglehopper/tests/data/test.alto1.xml diff --git a/qurator/dinglehopper/tests/data/test.alto2.xml b/dinglehopper/tests/data/test.alto2.xml similarity index 100% rename from qurator/dinglehopper/tests/data/test.alto2.xml rename to dinglehopper/tests/data/test.alto2.xml diff --git a/qurator/dinglehopper/tests/data/test.alto3.xml b/dinglehopper/tests/data/test.alto3.xml similarity index 100% rename from qurator/dinglehopper/tests/data/test.alto3.xml rename to dinglehopper/tests/data/test.alto3.xml diff --git a/qurator/dinglehopper/tests/data/test.page2018.xml b/dinglehopper/tests/data/test.page2018.xml similarity index 100% rename from qurator/dinglehopper/tests/data/test.page2018.xml rename to dinglehopper/tests/data/test.page2018.xml diff --git a/qurator/dinglehopper/tests/data/test.txt b/dinglehopper/tests/data/test.txt similarity index 100% rename from qurator/dinglehopper/tests/data/test.txt rename to dinglehopper/tests/data/test.txt diff --git a/qurator/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/462875_0008.jpg b/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/462875_0008.jpg similarity index 100% rename from qurator/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/462875_0008.jpg rename to dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/462875_0008.jpg diff --git a/qurator/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-GT_0008.xml b/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-GT_0008.xml similarity index 100% rename from qurator/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-GT_0008.xml rename to dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-GT_0008.xml diff --git a/qurator/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-OCR-TESS_0008.xml b/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-OCR-TESS_0008.xml similarity index 100% rename from qurator/dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-OCR-TESS_0008.xml rename to dinglehopper/tests/data/unused-larex-indexed-textequiv-jkamlah/OCR-D-OCR-TESS_0008.xml diff --git a/qurator/dinglehopper/tests/extracted_text_test.py b/dinglehopper/tests/extracted_text_test.py similarity index 100% rename from qurator/dinglehopper/tests/extracted_text_test.py rename to dinglehopper/tests/extracted_text_test.py diff --git a/qurator/dinglehopper/tests/test_align.py b/dinglehopper/tests/test_align.py similarity index 100% rename from qurator/dinglehopper/tests/test_align.py rename to dinglehopper/tests/test_align.py diff --git a/qurator/dinglehopper/tests/test_character_error_rate.py b/dinglehopper/tests/test_character_error_rate.py similarity index 100% rename from qurator/dinglehopper/tests/test_character_error_rate.py rename to dinglehopper/tests/test_character_error_rate.py diff --git a/qurator/dinglehopper/tests/test_edit_distance.py b/dinglehopper/tests/test_edit_distance.py similarity index 100% rename from qurator/dinglehopper/tests/test_edit_distance.py rename to dinglehopper/tests/test_edit_distance.py diff --git a/qurator/dinglehopper/tests/test_editops.py b/dinglehopper/tests/test_editops.py similarity index 100% rename from qurator/dinglehopper/tests/test_editops.py rename to dinglehopper/tests/test_editops.py diff --git a/qurator/dinglehopper/tests/test_integ_align.py b/dinglehopper/tests/test_integ_align.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_align.py rename to dinglehopper/tests/test_integ_align.py diff --git a/qurator/dinglehopper/tests/test_integ_bigger_texts.py b/dinglehopper/tests/test_integ_bigger_texts.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_bigger_texts.py rename to dinglehopper/tests/test_integ_bigger_texts.py diff --git a/qurator/dinglehopper/tests/test_integ_character_error_rate_ocr.py b/dinglehopper/tests/test_integ_character_error_rate_ocr.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_character_error_rate_ocr.py rename to dinglehopper/tests/test_integ_character_error_rate_ocr.py diff --git a/qurator/dinglehopper/tests/test_integ_cli_valid_json.py b/dinglehopper/tests/test_integ_cli_valid_json.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_cli_valid_json.py rename to dinglehopper/tests/test_integ_cli_valid_json.py diff --git a/qurator/dinglehopper/tests/test_integ_edit_distance_ocr.py b/dinglehopper/tests/test_integ_edit_distance_ocr.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_edit_distance_ocr.py rename to dinglehopper/tests/test_integ_edit_distance_ocr.py diff --git a/qurator/dinglehopper/tests/test_integ_ocrd_cli.py b/dinglehopper/tests/test_integ_ocrd_cli.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_ocrd_cli.py rename to dinglehopper/tests/test_integ_ocrd_cli.py diff --git a/qurator/dinglehopper/tests/test_integ_table_extraction.py b/dinglehopper/tests/test_integ_table_extraction.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_table_extraction.py rename to dinglehopper/tests/test_integ_table_extraction.py diff --git a/qurator/dinglehopper/tests/test_integ_word_error_rate_ocr.py b/dinglehopper/tests/test_integ_word_error_rate_ocr.py similarity index 100% rename from qurator/dinglehopper/tests/test_integ_word_error_rate_ocr.py rename to dinglehopper/tests/test_integ_word_error_rate_ocr.py diff --git a/qurator/dinglehopper/tests/test_ocr_files.py b/dinglehopper/tests/test_ocr_files.py similarity index 100% rename from qurator/dinglehopper/tests/test_ocr_files.py rename to dinglehopper/tests/test_ocr_files.py diff --git a/qurator/dinglehopper/tests/test_word_error_rate.py b/dinglehopper/tests/test_word_error_rate.py similarity index 100% rename from qurator/dinglehopper/tests/test_word_error_rate.py rename to dinglehopper/tests/test_word_error_rate.py diff --git a/qurator/dinglehopper/tests/util.py b/dinglehopper/tests/util.py similarity index 100% rename from qurator/dinglehopper/tests/util.py rename to dinglehopper/tests/util.py diff --git a/qurator/dinglehopper/word_error_rate.py b/dinglehopper/word_error_rate.py similarity index 100% rename from qurator/dinglehopper/word_error_rate.py rename to dinglehopper/word_error_rate.py diff --git a/ocrd-tool.json b/ocrd-tool.json index f45153c..f871ff0 120000 --- a/ocrd-tool.json +++ b/ocrd-tool.json @@ -1 +1 @@ -qurator/dinglehopper/ocrd-tool.json \ No newline at end of file +dinglehopper/ocrd-tool.json \ No newline at end of file diff --git a/setup.py b/setup.py index 6a4f57a..d7a3776 100644 --- a/setup.py +++ b/setup.py @@ -16,8 +16,7 @@ setup( long_description_content_type="text/markdown", keywords="qurator ocr", license="Apache", - packages=find_namespace_packages(include=["qurator.*"]) - + find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), + packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), install_requires=install_requires, tests_require=tests_require, package_data={ @@ -25,10 +24,10 @@ setup( }, entry_points={ "console_scripts": [ - "dinglehopper=qurator.dinglehopper.cli:main", - "dinglehopper-line-dirs=qurator.dinglehopper.cli_line_dirs:main", - "dinglehopper-extract=qurator.dinglehopper.cli_extract:main", - "ocrd-dinglehopper=qurator.dinglehopper.ocrd_cli:ocrd_dinglehopper", + "dinglehopper=dinglehopper.cli:main", + "dinglehopper-line-dirs=dinglehopper.cli_line_dirs:main", + "dinglehopper-extract=dinglehopper.cli_extract:main", + "ocrd-dinglehopper=dinglehopper.ocrd_cli:ocrd_dinglehopper", ] }, )