diff --git a/redis_developer/model/cli/migrate.py b/redis_developer/model/cli/migrate.py index 6795f6b..bf3a6e3 100644 --- a/redis_developer/model/cli/migrate.py +++ b/redis_developer/model/cli/migrate.py @@ -1,5 +1,5 @@ import click -from redis_developer.om.migrations.migrator import Migrator +from redis_developer.model.migrations.migrator import Migrator @click.command() diff --git a/redis_developer/model/migrations/migrator.py b/redis_developer/model/migrations/migrator.py index eca98b1..527d3c3 100644 --- a/redis_developer/model/migrations/migrator.py +++ b/redis_developer/model/migrations/migrator.py @@ -7,7 +7,7 @@ from typing import Optional from redis import ResponseError from redis_developer.connections import get_redis_connection -from redis_developer.om.model import model_registry +from redis_developer.model.model import model_registry redis = get_redis_connection() log = logging.getLogger(__name__) diff --git a/redis_developer/model/models.py b/redis_developer/model/models.py index 87d35eb..02a9c01 100644 --- a/redis_developer/model/models.py +++ b/redis_developer/model/models.py @@ -1,7 +1,7 @@ import abc from typing import Optional -from redis_developer.om.model import JsonModel, HashModel +from redis_developer.model.model import JsonModel, HashModel class BaseJsonModel(JsonModel, abc.ABC): diff --git a/redis_developer/model/query_resolver.py b/redis_developer/model/query_resolver.py index e7cce7e..ae9ee1c 100644 --- a/redis_developer/model/query_resolver.py +++ b/redis_developer/model/query_resolver.py @@ -1,7 +1,7 @@ from collections import Sequence from typing import Any, Dict, Mapping, Union, List -from redis_developer.om.model import Expression +from redis_developer.model.model import Expression class LogicalOperatorForListOfExpressions(Expression): diff --git a/tests/conftest.py b/tests/conftest.py index 3224ba7..0b1b365 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import pytest from redis import Redis from redis_developer.connections import get_redis_connection -from redis_developer.orm.migrations.migrator import Migrator +from redis_developer.model.migrations.migrator import Migrator @pytest.fixture(scope="module", autouse=True) diff --git a/tests/test_hash_model.py b/tests/test_hash_model.py index 49a13eb..05386b5 100644 --- a/tests/test_hash_model.py +++ b/tests/test_hash_model.py @@ -8,11 +8,11 @@ import pytest import redis from pydantic import ValidationError -from redis_developer.orm import ( +from redis_developer.model import ( HashModel, Field, ) -from redis_developer.orm.model import RedisModelError, QueryNotSupportedError, NotFoundError +from redis_developer.model.model import RedisModelError, QueryNotSupportedError, NotFoundError r = redis.Redis() today = datetime.date.today() diff --git a/tests/test_json_model.py b/tests/test_json_model.py index 548f545..8576e87 100644 --- a/tests/test_json_model.py +++ b/tests/test_json_model.py @@ -8,12 +8,13 @@ import pytest import redis from pydantic import ValidationError -from redis_developer.orm import ( +from redis_developer.model import ( + EmbeddedJsonModel, JsonModel, Field, ) -from redis_developer.orm.migrations.migrator import Migrator -from redis_developer.orm.model import QueryNotSupportedError, NotFoundError, RedisModelError +from redis_developer.model.migrations.migrator import Migrator +from redis_developer.model.model import QueryNotSupportedError, NotFoundError, RedisModelError r = redis.Redis() today = datetime.date.today() @@ -24,11 +25,6 @@ class BaseJsonModel(JsonModel, abc.ABC): global_key_prefix = "redis-developer" -class EmbeddedJsonModel(BaseJsonModel, abc.ABC): - class Meta: - embedded = True - - class Note(EmbeddedJsonModel): # TODO: This was going to be a full-text search example, but # we can't index embedded documents for full-text search in