mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-08 11:49:55 +02:00
Merge pull request #133 from qurator-spk/src-layout
Merging package src layout as agreed per meeting today.
This commit is contained in:
commit
256a7c347f
28 changed files with 16 additions and 44 deletions
|
@ -1 +1 @@
|
||||||
qurator/eynollah/ocrd-tool.json
|
src/eynollah/ocrd-tool.json
|
|
@ -3,7 +3,6 @@ requires = ["setuptools>=61.0", "wheel", "setuptools-ocrd"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "eynollah"
|
name = "eynollah"
|
||||||
version = "0.3.1"
|
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Vahid Rezanezhad"},
|
{name = "Vahid Rezanezhad"},
|
||||||
{name = "Staatsbibliothek zu Berlin - Preußischer Kulturbesitz"},
|
{name = "Staatsbibliothek zu Berlin - Preußischer Kulturbesitz"},
|
||||||
|
@ -14,7 +13,7 @@ license.file = "LICENSE"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
keywords = ["document layout analysis", "image segmentation"]
|
keywords = ["document layout analysis", "image segmentation"]
|
||||||
|
|
||||||
dynamic = ["dependencies"]
|
dynamic = ["dependencies", "version"]
|
||||||
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
|
@ -27,8 +26,8 @@ classifiers = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
eynollah = "qurator.eynollah.cli:main"
|
eynollah = "eynollah.cli:main"
|
||||||
ocrd-eynollah-segment = "qurator.eynollah.ocrd_cli:main"
|
ocrd-eynollah-segment = "eynollah.ocrd_cli:main"
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://github.com/qurator-spk/eynollah"
|
Homepage = "https://github.com/qurator-spk/eynollah"
|
||||||
|
@ -38,7 +37,7 @@ Repository = "https://github.com/qurator-spk/eynollah.git"
|
||||||
dependencies = {file = ["requirements.txt"]}
|
dependencies = {file = ["requirements.txt"]}
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
where = ["qurator"]
|
where = ["src"]
|
||||||
|
|
||||||
[tool.setuptools.package-data]
|
[tool.setuptools.package-data]
|
||||||
"*" = ["*.json", '*.yml', '*.xml', '*.xsd']
|
"*" = ["*.json", '*.yml', '*.xml', '*.xsd']
|
||||||
|
|
27
setup.py
27
setup.py
|
@ -1,27 +0,0 @@
|
||||||
from setuptools import setup, find_namespace_packages
|
|
||||||
from json import load
|
|
||||||
|
|
||||||
install_requires = open('requirements.txt').read().split('\n')
|
|
||||||
with open('ocrd-tool.json', 'r', encoding='utf-8') as f:
|
|
||||||
version = load(f)['version']
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='eynollah',
|
|
||||||
version=version,
|
|
||||||
long_description=open('README.md').read(),
|
|
||||||
long_description_content_type='text/markdown',
|
|
||||||
author='Vahid Rezanezhad',
|
|
||||||
url='https://github.com/qurator-spk/eynollah',
|
|
||||||
license='Apache License 2.0',
|
|
||||||
packages=find_namespace_packages(include=['qurator']),
|
|
||||||
install_requires=install_requires,
|
|
||||||
package_data={
|
|
||||||
'': ['*.json']
|
|
||||||
},
|
|
||||||
entry_points={
|
|
||||||
'console_scripts': [
|
|
||||||
'eynollah=qurator.eynollah.cli:main',
|
|
||||||
'ocrd-eynollah-segment=qurator.eynollah.ocrd_cli:main',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
)
|
|
|
@ -1,7 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
import click
|
import click
|
||||||
from ocrd_utils import initLogging, setOverrideLogLevel
|
from ocrd_utils import initLogging, setOverrideLogLevel
|
||||||
from qurator.eynollah.eynollah import Eynollah
|
from eynollah.eynollah import Eynollah
|
||||||
|
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
|
@ -1,5 +1,5 @@
|
||||||
from tests.base import main
|
from tests.base import main
|
||||||
from qurator.eynollah.utils.counter import EynollahIdCounter
|
from eynollah.utils.counter import EynollahIdCounter
|
||||||
|
|
||||||
def test_counter_string():
|
def test_counter_string():
|
||||||
c = EynollahIdCounter()
|
c = EynollahIdCounter()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cv2
|
import cv2
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from qurator.eynollah.utils.pil_cv2 import check_dpi
|
from eynollah.utils.pil_cv2 import check_dpi
|
||||||
from tests.base import main
|
from tests.base import main
|
||||||
|
|
||||||
def test_dpi():
|
def test_dpi():
|
||||||
|
|
|
@ -2,7 +2,7 @@ from os import environ
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from ocrd_utils import pushd_popd
|
from ocrd_utils import pushd_popd
|
||||||
from tests.base import CapturingTestCase as TestCase, main
|
from tests.base import CapturingTestCase as TestCase, main
|
||||||
from qurator.eynollah.cli import main as eynollah_cli
|
from eynollah.cli import main as eynollah_cli
|
||||||
|
|
||||||
testdir = Path(__file__).parent.resolve()
|
testdir = Path(__file__).parent.resolve()
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
def test_utils_import():
|
def test_utils_import():
|
||||||
import qurator.eynollah.utils
|
import eynollah.utils
|
||||||
import qurator.eynollah.utils.contour
|
import eynollah.utils.contour
|
||||||
import qurator.eynollah.utils.drop_capitals
|
import eynollah.utils.drop_capitals
|
||||||
import qurator.eynollah.utils.drop_capitals
|
import eynollah.utils.drop_capitals
|
||||||
import qurator.eynollah.utils.is_nan
|
import eynollah.utils.is_nan
|
||||||
import qurator.eynollah.utils.rotate
|
import eynollah.utils.rotate
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from pytest import main
|
from pytest import main
|
||||||
from qurator.eynollah.utils.xml import create_page_xml
|
from eynollah.utils.xml import create_page_xml
|
||||||
from ocrd_models.ocrd_page import to_xml
|
from ocrd_models.ocrd_page import to_xml
|
||||||
|
|
||||||
PAGE_2019 = 'http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15'
|
PAGE_2019 = 'http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue