From 06fe4de8d22edeb13285c73403ecedd3c14e1559 Mon Sep 17 00:00:00 2001 From: dx-tan Date: Mon, 18 Mar 2024 14:31:23 +0700 Subject: [PATCH] Fix: test cases --- .gitignore | 1 + cope2n-ai-fi/Dockerfile | 2 +- cope2n-ai-fi/modules/sdsvkvu | 2 +- cope2n-api/fwd_api/utils/sdsvkvu | 2 +- docker-compose-dev.yml | 12 ++++++------ test_samples/test_15/result.json | 4 ++++ test_samples/test_17/result.json | 4 ++++ test_samples/test_21.json | 4 ++++ test_samples/test_22.json | 4 ++++ test_samples/test_23.json | 4 ++++ test_samples/test_24.json | 4 ++++ test_samples/test_25.json | 4 ++++ tests/test_set_07_01_invoice_06_imei.py | 4 ++++ 13 files changed, 42 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 7f48c33..8d7c64e 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ cope2n-api/reviewed/date.xlsx cope2n-api/reviewed/retailer.xlsx /scripts/* scripts/crawl_database.py +redundant_models/ \ No newline at end of file diff --git a/cope2n-ai-fi/Dockerfile b/cope2n-ai-fi/Dockerfile index ed5d957..156497d 100755 --- a/cope2n-ai-fi/Dockerfile +++ b/cope2n-ai-fi/Dockerfile @@ -15,7 +15,7 @@ RUN pip install mmcv==1.6.0 -f https://download.openmmlab.com/mmcv/dst/cu116/tor RUN ln -s /opt/conda/lib/python3.10/site-packages/torch/lib/libcudnn.so.8 /usr/lib/libcudnn.so && \ ln -s /opt/conda/lib/libcublas.so /usr/lib/libcublas.so -# RUN python -m pip install paddlepaddle-gpu==2.4.2.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html --no-cache-dir +RUN python -m pip install paddlepaddle-gpu==2.4.2.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html --no-cache-dir RUN pip install fastdeploy-gpu-python==1.0.7 -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html --no-cache-dir diff --git a/cope2n-ai-fi/modules/sdsvkvu b/cope2n-ai-fi/modules/sdsvkvu index bae5f73..2012803 160000 --- a/cope2n-ai-fi/modules/sdsvkvu +++ b/cope2n-ai-fi/modules/sdsvkvu @@ -1 +1 @@ -Subproject commit bae5f732e12c5d5307b3ce14a98fa198ea49e372 +Subproject commit 20128037dbfca217fa3d3ca4551cc7f8ae8a190e diff --git a/cope2n-api/fwd_api/utils/sdsvkvu b/cope2n-api/fwd_api/utils/sdsvkvu index 671d791..2012803 160000 --- a/cope2n-api/fwd_api/utils/sdsvkvu +++ b/cope2n-api/fwd_api/utils/sdsvkvu @@ -1 +1 @@ -Subproject commit 671d7917c657ad185a06772e0b707b45fe59788a +Subproject commit 20128037dbfca217fa3d3ca4551cc7f8ae8a190e diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index d9553eb..ffb2d60 100755 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -89,12 +89,12 @@ services: depends_on: db-sbt: condition: service_started - # command: sh -c "chmod -R 777 /app; sleep 5; python manage.py collectstatic --no-input && - # python manage.py makemigrations && - # python manage.py migrate && - # python manage.py compilemessages && - # gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:9000" # pre-makemigrations on prod - command: bash -c "tail -f > /dev/null" + command: sh -c "chmod -R 777 /app; sleep 5; python manage.py collectstatic --no-input && + python manage.py makemigrations && + python manage.py migrate && + python manage.py compilemessages && + gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:9000" # pre-makemigrations on prod + # command: bash -c "tail -f > /dev/null" minio: image: minio/minio diff --git a/test_samples/test_15/result.json b/test_samples/test_15/result.json index 8e54bf5..49a832a 100644 --- a/test_samples/test_15/result.json +++ b/test_samples/test_15/result.json @@ -17,6 +17,10 @@ "value": [ "357822611219904" ] + }, + { + "label": "invoice_no", + "value": null } ], "doc_type": "sbt_document", diff --git a/test_samples/test_17/result.json b/test_samples/test_17/result.json index 97f584e..8749e3d 100644 --- a/test_samples/test_17/result.json +++ b/test_samples/test_17/result.json @@ -17,6 +17,10 @@ "value": [ "RFAW2022FED" ] + }, + { + "label": "invoice_no", + "value": null } ], "doc_type": "sbt_document", diff --git a/test_samples/test_21.json b/test_samples/test_21.json index 9c9caeb..9e37991 100644 --- a/test_samples/test_21.json +++ b/test_samples/test_21.json @@ -19,6 +19,10 @@ "value": [ "357822611219904" ] + }, + { + "label": "invoice_no", + "value": null } ], "doc_type": "sbt_document", diff --git a/test_samples/test_22.json b/test_samples/test_22.json index 599c50a..ed417b5 100644 --- a/test_samples/test_22.json +++ b/test_samples/test_22.json @@ -20,6 +20,10 @@ "357822611219904", "RFAW2022FED" ] + }, + { + "label": "invoice_no", + "value": null } ], "doc_type": "sbt_document", diff --git a/test_samples/test_23.json b/test_samples/test_23.json index 9735e3b..d7b1146 100644 --- a/test_samples/test_23.json +++ b/test_samples/test_23.json @@ -21,6 +21,10 @@ "RFAW2022FED", "5AWH14MT400396N" ] + }, + { + "label": "invoice_no", + "value": null } ], "doc_type": "sbt_document", diff --git a/test_samples/test_24.json b/test_samples/test_24.json index 84f155c..fc4ad9b 100644 --- a/test_samples/test_24.json +++ b/test_samples/test_24.json @@ -22,6 +22,10 @@ "5AWH14MT400396N", "0HU33NIW200044K" ] + }, + { + "label": "invoice_no", + "value": null } ], "doc_type": "sbt_document", diff --git a/test_samples/test_25.json b/test_samples/test_25.json index 92a2439..06b2e7a 100644 --- a/test_samples/test_25.json +++ b/test_samples/test_25.json @@ -23,6 +23,10 @@ "0HU33NIW200044K", "0GJG4DBW200318X" ] + }, + { + "label": "invoice_no", + "value": null } ], "doc_type": "sbt_document", diff --git a/tests/test_set_07_01_invoice_06_imei.py b/tests/test_set_07_01_invoice_06_imei.py index 27b906c..6642199 100644 --- a/tests/test_set_07_01_invoice_06_imei.py +++ b/tests/test_set_07_01_invoice_06_imei.py @@ -76,6 +76,10 @@ def test_1_invoice_5_imei(): "0HU33NIW200044K", "0GJG4DBW200318X" ] + }, + { + "label": "invoice_no", + "value": None } ], "doc_type": "sbt_document",