From 9146e43face192e409c752e763499f6a5250ea43 Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:14:58 +0100 Subject: [PATCH] :bug: fix circular imports error on install (#280) --- pyproject.toml | 4 ++-- tests/product/__init__.py | 3 --- .../eu/license_plate/test_license_plate_v1_regression.py | 2 +- .../test_bank_account_details_v1_regression.py | 4 +++- .../test_bank_account_details_v2_regression.py | 4 +++- .../product/fr/carte_grise/test_carte_grise_v1_regression.py | 2 +- .../fr/carte_vitale/test_carte_vitale_v1_regression.py | 2 +- tests/product/fr/id_card/test_id_card_v1_regression.py | 2 +- tests/product/fr/id_card/test_id_card_v2_regression.py | 2 +- tests/product/fr/petrol_receipt/__init__.py | 0 .../fr/petrol_receipt/test_petrol_receipt_v1_regression.py | 2 +- tests/product/us/bank_check/test_bank_check_v1_regression.py | 2 +- .../us/driver_license/test_driver_license_v1_regression.py | 2 +- tests/product/us/w9/test_w9_v1_regression.py | 2 +- 14 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 tests/product/fr/petrol_receipt/__init__.py diff --git a/pyproject.toml b/pyproject.toml index 3e1e4e89..69110129 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,8 +69,8 @@ build = [ mindee = "mindee.cli:main" -[tool.setuptools] -packages = ["mindee", ] +[tool.setuptools.packages] +find = {} [tool.setuptools.dynamic] version = {attr = "mindee.versions.__version__"} diff --git a/tests/product/__init__.py b/tests/product/__init__.py index 401548a0..3b1a5405 100644 --- a/tests/product/__init__.py +++ b/tests/product/__init__.py @@ -1,7 +1,4 @@ from pathlib import Path -from typing import Type - -from mindee.parsing.common.prediction import Prediction PRODUCT_DATA_DIR = Path("./tests/data/products/") diff --git a/tests/product/eu/license_plate/test_license_plate_v1_regression.py b/tests/product/eu/license_plate/test_license_plate_v1_regression.py index 9a810d1d..deacd9c0 100644 --- a/tests/product/eu/license_plate/test_license_plate_v1_regression.py +++ b/tests/product/eu/license_plate/test_license_plate_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.eu import LicensePlateV1 +from mindee.product.eu.license_plate.license_plate_v1 import LicensePlateV1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/fr/bank_account_details/test_bank_account_details_v1_regression.py b/tests/product/fr/bank_account_details/test_bank_account_details_v1_regression.py index 00b81112..8ab84133 100644 --- a/tests/product/fr/bank_account_details/test_bank_account_details_v1_regression.py +++ b/tests/product/fr/bank_account_details/test_bank_account_details_v1_regression.py @@ -1,7 +1,9 @@ import pytest from mindee.client import Client -from mindee.product.fr import BankAccountDetailsV1 +from mindee.product.fr.bank_account_details.bank_account_details_v1 import ( + BankAccountDetailsV1, +) from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/fr/bank_account_details/test_bank_account_details_v2_regression.py b/tests/product/fr/bank_account_details/test_bank_account_details_v2_regression.py index e44abf1c..4f0aee5a 100644 --- a/tests/product/fr/bank_account_details/test_bank_account_details_v2_regression.py +++ b/tests/product/fr/bank_account_details/test_bank_account_details_v2_regression.py @@ -1,7 +1,9 @@ import pytest from mindee.client import Client -from mindee.product.fr import BankAccountDetailsV2 +from mindee.product.fr.bank_account_details.bank_account_details_v2 import ( + BankAccountDetailsV2, +) from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/fr/carte_grise/test_carte_grise_v1_regression.py b/tests/product/fr/carte_grise/test_carte_grise_v1_regression.py index 119da03e..3cf794a0 100644 --- a/tests/product/fr/carte_grise/test_carte_grise_v1_regression.py +++ b/tests/product/fr/carte_grise/test_carte_grise_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.fr import CarteGriseV1 +from mindee.product.fr.carte_grise.carte_grise_v1 import CarteGriseV1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/fr/carte_vitale/test_carte_vitale_v1_regression.py b/tests/product/fr/carte_vitale/test_carte_vitale_v1_regression.py index 6aa2e5d4..8e9e3294 100644 --- a/tests/product/fr/carte_vitale/test_carte_vitale_v1_regression.py +++ b/tests/product/fr/carte_vitale/test_carte_vitale_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.fr import CarteVitaleV1 +from mindee.product.fr.carte_vitale.carte_vitale_v1 import CarteVitaleV1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/fr/id_card/test_id_card_v1_regression.py b/tests/product/fr/id_card/test_id_card_v1_regression.py index 0e37f728..ac33934c 100644 --- a/tests/product/fr/id_card/test_id_card_v1_regression.py +++ b/tests/product/fr/id_card/test_id_card_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.fr import IdCardV1 +from mindee.product.fr.id_card.id_card_v1 import IdCardV1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/fr/id_card/test_id_card_v2_regression.py b/tests/product/fr/id_card/test_id_card_v2_regression.py index 7ac2fee8..2c11ebaf 100644 --- a/tests/product/fr/id_card/test_id_card_v2_regression.py +++ b/tests/product/fr/id_card/test_id_card_v2_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.fr import IdCardV2 +from mindee.product.fr.id_card.id_card_v2 import IdCardV2 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/fr/petrol_receipt/__init__.py b/tests/product/fr/petrol_receipt/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/product/fr/petrol_receipt/test_petrol_receipt_v1_regression.py b/tests/product/fr/petrol_receipt/test_petrol_receipt_v1_regression.py index afda68e1..1cfdb2b4 100644 --- a/tests/product/fr/petrol_receipt/test_petrol_receipt_v1_regression.py +++ b/tests/product/fr/petrol_receipt/test_petrol_receipt_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.fr import PetrolReceiptV1 +from mindee.product.fr.petrol_receipt.petrol_receipt_v1 import PetrolReceiptV1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/us/bank_check/test_bank_check_v1_regression.py b/tests/product/us/bank_check/test_bank_check_v1_regression.py index d4321985..57b89d9b 100644 --- a/tests/product/us/bank_check/test_bank_check_v1_regression.py +++ b/tests/product/us/bank_check/test_bank_check_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.us import BankCheckV1 +from mindee.product.us.bank_check.bank_check_v1 import BankCheckV1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/us/driver_license/test_driver_license_v1_regression.py b/tests/product/us/driver_license/test_driver_license_v1_regression.py index c41a014b..43b1d0f4 100644 --- a/tests/product/us/driver_license/test_driver_license_v1_regression.py +++ b/tests/product/us/driver_license/test_driver_license_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.us import DriverLicenseV1 +from mindee.product.us.driver_license.driver_license_v1 import DriverLicenseV1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version diff --git a/tests/product/us/w9/test_w9_v1_regression.py b/tests/product/us/w9/test_w9_v1_regression.py index 38a635bf..bbed815c 100644 --- a/tests/product/us/w9/test_w9_v1_regression.py +++ b/tests/product/us/w9/test_w9_v1_regression.py @@ -1,7 +1,7 @@ import pytest from mindee.client import Client -from mindee.product.us import W9V1 +from mindee.product.us.w9.w9_v1 import W9V1 from tests.product import PRODUCT_DATA_DIR, get_id, get_version