From 12dcdb81da94788374d17bb45f1550099a6141bd Mon Sep 17 00:00:00 2001 From: Benjamin Rosemann Date: Mon, 14 Jun 2021 17:08:02 +0200 Subject: [PATCH] Add metrics parameter to integration test --- qurator/dinglehopper/templates/report.html.j2 | 4 ++-- qurator/dinglehopper/tests/test_integ_ocrd_cli.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qurator/dinglehopper/templates/report.html.j2 b/qurator/dinglehopper/templates/report.html.j2 index c1a3797..abbedf3 100644 --- a/qurator/dinglehopper/templates/report.html.j2 +++ b/qurator/dinglehopper/templates/report.html.j2 @@ -61,8 +61,8 @@ {% for result in metrics_results.values() %} {{ result.metric.replace("_", " ") }} - {{ result.accuracy }} - {{ result.error_rate }} + {{ result.accuracy|round(4) }} + {{ result.error_rate|round(4) }} {{ result.reference_elements }} {{ result.compared_elements }} {{ result.weighted_errors }} diff --git a/qurator/dinglehopper/tests/test_integ_ocrd_cli.py b/qurator/dinglehopper/tests/test_integ_ocrd_cli.py index 9b390bd..0193128 100644 --- a/qurator/dinglehopper/tests/test_integ_ocrd_cli.py +++ b/qurator/dinglehopper/tests/test_integ_ocrd_cli.py @@ -34,6 +34,9 @@ def test_ocrd_cli(tmp_path): "OCR-D-GT-PAGE,OCR-D-OCR-CALAMARI", "-O", "OCR-D-OCR-CALAMARI-EVAL", + "-P", + "metrics", + "ca,wa,boc,bow", ] sys.argv[ 1: