Skip to content

Commit

Permalink
eliminate mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncopd committed Jan 2, 2025
1 parent a4ea5be commit 9c505e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 33 deletions.
18 changes: 0 additions & 18 deletions lamindb/base/mocks.py

This file was deleted.

8 changes: 4 additions & 4 deletions lamindb/base/users.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import lamindb_setup as ln_setup
from lamindb_setup import settings
from lamindb_setup._init_instance import register_user

user_id_cache = {}


def current_user_id() -> int:
import lamindb_setup as ln_setup
from lamindb_setup import settings
from lamindb_setup._init_instance import register_user

from lamindb.models import User

def query_user_id():
Expand Down
17 changes: 6 additions & 11 deletions lamindb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
OneToOneField,
TextField,
)
from lamindb.base.ids import base62_8, base62_12, base62_20
from lamindb.base.types import (

from .base.ids import base62_8, base62_12, base62_20
from .base.types import (
ArtifactType,
FeatureDtype,
FieldAttr,
Expand All @@ -47,7 +48,7 @@
TransformType,
VisibilityChoice,
)
from lamindb.base.users import current_user_id
from .base.users import current_user_id

if TYPE_CHECKING:
from collections.abc import Iterable
Expand All @@ -64,14 +65,8 @@
from tiledbsoma import Experiment as SOMAExperiment
from upath import UPath

from lamindb.base.mocks import (
AnnDataAccessor,
BackedAccessor,
MappedCollection,
QuerySet,
RecordList,
)
from lamindb.core import LabelManager
from lamindb.core import LabelManager, MappedCollection, QuerySet, RecordList
from lamindb.core.storage import AnnDataAccessor, BackedAccessor


_TRACKING_READY: bool | None = None
Expand Down

0 comments on commit 9c505e6

Please sign in to comment.