lamindb_setup 0.71.2__py2.py3-none-any.whl → 0.71.3__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lamindb_setup/__init__.py CHANGED
@@ -34,7 +34,7 @@ Modules & settings:
34
34
 
35
35
  """
36
36
 
37
- __version__ = "0.71.2" # denote a release candidate for 0.1.0 with 0.1rc1
37
+ __version__ = "0.71.3" # denote a release candidate for 0.1.0 with 0.1rc1
38
38
 
39
39
  import sys
40
40
  from os import name as _os_name
@@ -46,10 +46,6 @@ class UserSettings:
46
46
  @property
47
47
  def id(self):
48
48
  """Integer id valid in current intance."""
49
- # do NOT use the function below because this
50
- # doesn't error - it needs to be this way to have
51
- # a user id available in migrations
52
- # from lnschema_core.users import current_user_id
53
- from lnschema_core.models import User
49
+ from lnschema_core.users import current_user_id
54
50
 
55
- return User.objects.get(uid=self.uid).id
51
+ return current_user_id()
@@ -4,7 +4,6 @@ from __future__ import annotations
4
4
  import builtins
5
5
  import os
6
6
  from pathlib import Path
7
- import shutil
8
7
  import time
9
8
  from lamin_utils import logger
10
9
  from ._settings_store import current_instance_settings_file
@@ -12,6 +11,7 @@ from ._settings_instance import InstanceSettings
12
11
 
13
12
  IS_RUN_FROM_IPYTHON = getattr(builtins, "__IPYTHON__", False)
14
13
  IS_SETUP = False
14
+ IS_MIGRATING = False
15
15
  CONN_MAX_AGE = 299
16
16
 
17
17
 
@@ -101,7 +101,10 @@ def setup_django(
101
101
  call_command("migrate", verbosity=2)
102
102
  isettings._update_cloud_sqlite_file(unlock_cloud_sqlite=False)
103
103
  elif init:
104
+ global IS_MIGRATING
105
+ IS_MIGRATING = True
104
106
  call_command("migrate", verbosity=0)
107
+ IS_MIGRATING = False
105
108
 
106
109
  global IS_SETUP
107
110
  IS_SETUP = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamindb_setup
3
- Version: 0.71.2
3
+ Version: 0.71.3
4
4
  Summary: Setup & configure LaminDB.
5
5
  Author-email: Lamin Labs <laminlabs@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -1,4 +1,4 @@
1
- lamindb_setup/__init__.py,sha256=Z6OThfuMvv_NukKBoTOjxZV5sex6PgniejgS9LiuODs,1542
1
+ lamindb_setup/__init__.py,sha256=4OkxL3f7ZblC9iBXMfusjWga8XsOaieSAMix4ZDG8LE,1542
2
2
  lamindb_setup/_cache.py,sha256=wA7mbysANwe8hPNbjDo9bOmXJ0xIyaS5iyxIpxSWji4,846
3
3
  lamindb_setup/_check.py,sha256=28PcG8Kp6OpjSLSi1r2boL2Ryeh6xkaCL87HFbjs6GA,129
4
4
  lamindb_setup/_check_setup.py,sha256=cNEL9Q4yPpmEkGKHH8JgullWl1VUZwALJ4RHn9wZypY,2613
@@ -29,15 +29,15 @@ lamindb_setup/core/_settings_load.py,sha256=NGgCDpN85j1EqoKlrYFIlZBMlBJm33gx2-wc
29
29
  lamindb_setup/core/_settings_save.py,sha256=d1A-Ex-7H08mb8l7I0Oe0j0GilrfaDuprh_NMxhQAsQ,2704
30
30
  lamindb_setup/core/_settings_storage.py,sha256=VgsqdIImQRfOZ6FGNY6DLVohaSxerj_F-sWtjD9hzcs,12382
31
31
  lamindb_setup/core/_settings_store.py,sha256=dagS5c7wAMRnuZTRfCU4sKaIOyF_HwAP5Fnnn8vphno,2084
32
- lamindb_setup/core/_settings_user.py,sha256=IOOd3E3YN5xPEYy7fkWQDB6X06OcY4FkBqWT-XGxrjM,1563
32
+ lamindb_setup/core/_settings_user.py,sha256=P2lC4WDRAFfT-Xq3MlXJ-wMKIHCoGNhMTQfRGIAyUNQ,1344
33
33
  lamindb_setup/core/_setup_bionty_sources.py,sha256=OgPpZxN2_Wffy-ogEBz_97c_k8d2bD-DDVt89-u9GLY,3002
34
34
  lamindb_setup/core/cloud_sqlite_locker.py,sha256=NIBNAGq7TTRrip9OzMdiQKj8QOuwhL9esyM0aehUqBA,6893
35
- lamindb_setup/core/django.py,sha256=m0AKg2lJ1EYCtEtZ8frFFJbAR9qX0gnFcgqp7aeC2k0,3450
35
+ lamindb_setup/core/django.py,sha256=QUQm3zt5QIiD8uv6o9vbSm_bshqiSWzKSkgD3z2eJCg,3542
36
36
  lamindb_setup/core/exceptions.py,sha256=eoI7AXgATgDVzgArtN7CUvpaMUC067vsBg5LHCsWzDM,305
37
37
  lamindb_setup/core/hashing.py,sha256=mv9UCvAsSrdHYQAv3Kz7UOvjd5tIjvDTIYv_ettBuVY,2218
38
38
  lamindb_setup/core/types.py,sha256=bcYnZ0uM_2NXKJCl94Mmc-uYrQlRUUVKG3sK2N-F-N4,532
39
39
  lamindb_setup/core/upath.py,sha256=mou3NdF-tRTLW3E4eNDRFdCZrFZUyt-NPOVyC-DLe24,28342
40
- lamindb_setup-0.71.2.dist-info/LICENSE,sha256=UOZ1F5fFDe3XXvG4oNnkL1-Ecun7zpHzRxjp-XsMeAo,11324
41
- lamindb_setup-0.71.2.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
42
- lamindb_setup-0.71.2.dist-info/METADATA,sha256=E6rBt9sU5aiigEo_sDZXTUPZdlwUwLfo4oGup46A2CQ,1620
43
- lamindb_setup-0.71.2.dist-info/RECORD,,
40
+ lamindb_setup-0.71.3.dist-info/LICENSE,sha256=UOZ1F5fFDe3XXvG4oNnkL1-Ecun7zpHzRxjp-XsMeAo,11324
41
+ lamindb_setup-0.71.3.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
42
+ lamindb_setup-0.71.3.dist-info/METADATA,sha256=fAgts1w5BrUmsVUYnGoAmYdT7oljBvhdLmg_1fMicoo,1620
43
+ lamindb_setup-0.71.3.dist-info/RECORD,,