diff --git a/services/api-server/src/simcore_service_api_server/api/routes/credits.py b/services/api-server/src/simcore_service_api_server/api/routes/credits.py index 5c6fa0e9e68..1f89440ab2a 100644 --- a/services/api-server/src/simcore_service_api_server/api/routes/credits.py +++ b/services/api-server/src/simcore_service_api_server/api/routes/credits.py @@ -2,7 +2,7 @@ from fastapi import APIRouter, Depends, status -from ...models.schemas.backwards_compatibility import GetCreditPrice +from ...models.schemas.model_adapter import GetCreditPrice from ..dependencies.webserver import AuthSession, get_webserver_session from ._constants import FMSG_CHANGELOG_NEW_IN_VERSION diff --git a/services/api-server/src/simcore_service_api_server/api/routes/solvers.py b/services/api-server/src/simcore_service_api_server/api/routes/solvers.py index b4917d2f665..bb7b0b9d414 100644 --- a/services/api-server/src/simcore_service_api_server/api/routes/solvers.py +++ b/services/api-server/src/simcore_service_api_server/api/routes/solvers.py @@ -10,8 +10,8 @@ from ...exceptions.service_errors_utils import DEFAULT_BACKEND_SERVICE_STATUS_CODES from ...models.basic_types import VersionStr from ...models.pagination import OnePage, Page, PaginationParams -from ...models.schemas.backwards_compatibility import ServicePricingPlanGet from ...models.schemas.errors import ErrorGet +from ...models.schemas.model_adapter import ServicePricingPlanGet from ...models.schemas.solvers import Solver, SolverKeyId, SolverPort from ...services.catalog import CatalogApi from ..dependencies.application import get_reverse_url_mapper diff --git a/services/api-server/src/simcore_service_api_server/api/routes/solvers_jobs_getters.py b/services/api-server/src/simcore_service_api_server/api/routes/solvers_jobs_getters.py index adbbdfced03..5902998ada0 100644 --- a/services/api-server/src/simcore_service_api_server/api/routes/solvers_jobs_getters.py +++ b/services/api-server/src/simcore_service_api_server/api/routes/solvers_jobs_getters.py @@ -23,10 +23,6 @@ from ...exceptions.service_errors_utils import DEFAULT_BACKEND_SERVICE_STATUS_CODES from ...models.basic_types import LogStreamingResponse, VersionStr from ...models.pagination import Page, PaginationParams -from ...models.schemas.backwards_compatibility import ( - PricingUnitGet, - WalletGetWithAvailableCredits, -) from ...models.schemas.errors import ErrorGet from ...models.schemas.files import File from ...models.schemas.jobs import ( @@ -37,6 +33,10 @@ JobMetadata, JobOutputs, ) +from ...models.schemas.model_adapter import ( + PricingUnitGet, + WalletGetWithAvailableCredits, +) from ...models.schemas.solvers import SolverKeyId from ...services.catalog import CatalogApi from ...services.director_v2 import DirectorV2Api diff --git a/services/api-server/src/simcore_service_api_server/api/routes/wallets.py b/services/api-server/src/simcore_service_api_server/api/routes/wallets.py index 59397d89d35..b10f8d4382f 100644 --- a/services/api-server/src/simcore_service_api_server/api/routes/wallets.py +++ b/services/api-server/src/simcore_service_api_server/api/routes/wallets.py @@ -4,8 +4,8 @@ from fastapi import APIRouter, Depends, status from ...exceptions.service_errors_utils import DEFAULT_BACKEND_SERVICE_STATUS_CODES -from ...models.schemas.backwards_compatibility import WalletGetWithAvailableCredits from ...models.schemas.errors import ErrorGet +from ...models.schemas.model_adapter import WalletGetWithAvailableCredits from ..dependencies.webserver import AuthSession, get_webserver_session from ._constants import FMSG_CHANGELOG_NEW_IN_VERSION diff --git a/services/api-server/src/simcore_service_api_server/models/schemas/backwards_compatibility.py b/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py similarity index 100% rename from services/api-server/src/simcore_service_api_server/models/schemas/backwards_compatibility.py rename to services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py diff --git a/services/api-server/src/simcore_service_api_server/services/webserver.py b/services/api-server/src/simcore_service_api_server/services/webserver.py index 1b67c4a43ee..1f5c6289708 100644 --- a/services/api-server/src/simcore_service_api_server/services/webserver.py +++ b/services/api-server/src/simcore_service_api_server/services/webserver.py @@ -57,9 +57,7 @@ SolverOutputNotFoundError, WalletNotFoundError, ) -from simcore_service_api_server.models.schemas.backwards_compatibility import ( - GetCreditPrice, -) +from simcore_service_api_server.models.schemas.model_adapter import GetCreditPrice from tenacity import TryAgain from tenacity.asyncio import AsyncRetrying from tenacity.before_sleep import before_sleep_log @@ -74,11 +72,8 @@ ) from ..models.basic_types import VersionStr from ..models.pagination import MAXIMUM_NUMBER_OF_ITEMS_PER_PAGE -from ..models.schemas.backwards_compatibility import ( - PricingUnitGet, - WalletGetWithAvailableCredits, -) from ..models.schemas.jobs import MetaValueType +from ..models.schemas.model_adapter import PricingUnitGet, WalletGetWithAvailableCredits from ..models.schemas.profiles import Profile, ProfileUpdate from ..models.schemas.solvers import SolverKeyId from ..models.schemas.studies import StudyPort diff --git a/services/api-server/tests/unit/_with_db/test_product.py b/services/api-server/tests/unit/_with_db/test_product.py index 1b089e3ff6b..60df845989a 100644 --- a/services/api-server/tests/unit/_with_db/test_product.py +++ b/services/api-server/tests/unit/_with_db/test_product.py @@ -19,7 +19,7 @@ from models_library.wallets import WalletStatus from pydantic import PositiveInt from simcore_service_api_server._meta import API_VTAG -from simcore_service_api_server.models.schemas.backwards_compatibility import ( +from simcore_service_api_server.models.schemas.model_adapter import ( WalletGetWithAvailableCredits, ) diff --git a/services/api-server/tests/unit/test_api_solver_jobs.py b/services/api-server/tests/unit/test_api_solver_jobs.py index 0640c355a24..c1c2fe3334c 100644 --- a/services/api-server/tests/unit/test_api_solver_jobs.py +++ b/services/api-server/tests/unit/test_api_solver_jobs.py @@ -22,11 +22,11 @@ SideEffectCallback, ) from simcore_service_api_server._meta import API_VTAG -from simcore_service_api_server.models.schemas.backwards_compatibility import ( +from simcore_service_api_server.models.schemas.jobs import Job, JobStatus +from simcore_service_api_server.models.schemas.model_adapter import ( PricingUnitGet, WalletGetWithAvailableCredits, ) -from simcore_service_api_server.models.schemas.jobs import Job, JobStatus from simcore_service_api_server.models.schemas.solvers import Solver from simcore_service_api_server.services.director_v2 import ComputationTaskGet diff --git a/services/api-server/tests/unit/test_api_wallets.py b/services/api-server/tests/unit/test_api_wallets.py index f5bc27ed428..9ef1592fdf3 100644 --- a/services/api-server/tests/unit/test_api_wallets.py +++ b/services/api-server/tests/unit/test_api_wallets.py @@ -15,7 +15,7 @@ HttpApiCallCaptureModel, ) from simcore_service_api_server._meta import API_VTAG -from simcore_service_api_server.models.schemas.backwards_compatibility import ( +from simcore_service_api_server.models.schemas.model_adapter import ( WalletGetWithAvailableCredits, )