Skip to content

Commit

Permalink
Add ocrd_all test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joschrew committed Feb 15, 2024
1 parent 3d501b5 commit db322be
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/network/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ DOCKER_OCRD_NETWORK_MTU=1450

OCRD_NETWORK_LOGS_ROOT=/tmp/ocrd_network_logs
OCRD_NETWORK_SOCKETS_ROOT=/tmp/ocrd_network_sockets
OCRD_NETWORK_DATA=ocrd-test-workspace

OCRD_PS_HOST=ps-docker-host
OCRD_PS_PORT=8000
Expand Down
5 changes: 5 additions & 0 deletions tests/network/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ networks:
driver_opts:
com.docker.network.driver.mtu: ${DOCKER_OCRD_NETWORK_MTU}

volumes:
ocrd-test-workspace: {}

services:

ocrd_network_mongo_db:
Expand Down Expand Up @@ -80,6 +83,7 @@ services:
- "./dummy-workflow.txt:/ocrd-data/assets/dummy-workflow.txt"
- "./ocrd_logging.conf:/etc/ocrd_logging.conf"
- "./ps_config.yml:/ocrd-data/ps_config.yml"
- "${OCRD_NETWORK_DATA}:/data"
command: ocrd network processing-server -a 0.0.0.0:8000 /ocrd-data/ps_config.yml

ocrd_dummy_processing_worker:
Expand Down Expand Up @@ -117,4 +121,5 @@ services:
- ${OCRD_NETWORK_LOGS_ROOT}:/ocrd-data/ocrd_network_logs
- ${OCRD_NETWORK_SOCKETS_ROOT}:/ocrd-data/ocrd_network_sockets
- "./dummy-workflow.txt:/ocrd-data/assets/dummy-workflow.txt"
- "./test-workflow-1.txt:/ocrd-data/assets/test-workflow-1.txt"
- "./ocrd_logging.conf:/etc/ocrd_logging.conf"
9 changes: 9 additions & 0 deletions tests/network/test-workflow-1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
olena-binarize -I OCR-D-IMG -O O-1
anybaseocr-crop -I O-1 -O O-2
cis-ocropy-denoise -I O-2 -O O-3 -P dpi 300 -P level-of-operation page -P noise_maxsize 3.0
tesserocr-segment-region -I O-3 -O O-4 -P padding 5 -P find_tables false -P dpi 300
segment-repair -I O-4 -O O-5 -P plausibilize true -P plausibilize_merge_min_overlap 0.7
cis-ocropy-clip -I O-5 -O O-6
cis-ocropy-segment -I O-6 -O O-7 -P spread 2.4 -P dpi 300
cis-ocropy-dewarp -I O-7 -O O-8
tesserocr-recognize -I O-8 -O PAGE -P textequiv_level word -P model Fraktur
2 changes: 1 addition & 1 deletion tests/network/test_ocrd_all_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def test_ocrd_all_workflow():
# This test is supposed to run with ocrd_all not with just core on its own
# Note: the used workflow path is volume mapped
path_to_wf = "/ocrd-data/assets/ocrd_all-test-workflow.txt"
path_to_wf = "/ocrd-data/assets/test-workflow-1.txt"
path_to_mets = "/data/mets.xml"
wf_job_id = post_ps_workflow_request(PROCESSING_SERVER_URL, path_to_wf, path_to_mets)
job_state = poll_job_till_timeout_fail_or_success(
Expand Down

0 comments on commit db322be

Please sign in to comment.