lamindb_setup 0.73.1__py2.py3-none-any.whl → 0.73.2__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.73.1" # denote a release candidate for 0.1.0 with 0.1rc1
37
+ __version__ = "0.73.2" # 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
@@ -120,13 +120,25 @@ class InstanceSettings:
120
120
  if root_path.exists():
121
121
  marker_path = root_path / ".lamindb/_is_initialized"
122
122
  if marker_path.exists():
123
- uid = marker_path.read_text()
123
+ try:
124
+ uid = marker_path.read_text()
125
+ except PermissionError:
126
+ logger.warning(
127
+ f"ignoring the following location because no permission to read it: {marker_path}"
128
+ )
129
+ continue
124
130
  if uid == record.uid:
125
131
  found = True
126
132
  break
127
133
  elif uid == "":
128
- # legacy instance that was not yet marked properly
129
- mark_storage_root(record.root, record.uid)
134
+ try:
135
+ # legacy instance that was not yet marked properly
136
+ mark_storage_root(record.root, record.uid)
137
+ except PermissionError:
138
+ logger.warning(
139
+ f"ignoring the following location because no permission to write to it: {marker_path}"
140
+ )
141
+ continue
130
142
  else:
131
143
  continue
132
144
  else:
@@ -111,6 +111,7 @@ class Locker:
111
111
  if self._counter <= MAX_MSG_COUNTER:
112
112
  self._counter += 1
113
113
 
114
+ # Lamport's bakery algorithm
114
115
  def _lock_unsafe(self):
115
116
  if self._has_lock:
116
117
  return None
@@ -186,7 +187,7 @@ def get_locker(isettings) -> Locker:
186
187
  if (
187
188
  _locker is None
188
189
  or _locker.user != user_uid
189
- or _locker.root is not storage_root
190
+ or _locker.root != storage_root
190
191
  or _locker.instance_id != isettings._id
191
192
  ):
192
193
  _locker = Locker(user_uid, storage_root, isettings._id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamindb_setup
3
- Version: 0.73.1
3
+ Version: 0.73.2
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=XYsA4Sk8k2514_kS3XNzBJs1ZXhDkUcrd1rQTzwsan4,1542
1
+ lamindb_setup/__init__.py,sha256=HyUA-3vUuT5XnO6MHe78x0OQaPP0s4-jb6QuFXEuY3s,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
@@ -26,20 +26,20 @@ lamindb_setup/core/_hub_core.py,sha256=RGjTqf1owuWmkXAYy0EPaoHAaJ-0T0hAidkqa3cId
26
26
  lamindb_setup/core/_hub_crud.py,sha256=b1XF7AJpM9Q-ttm9nPG-r3OTRWHQaGzAGIyvmb83NTo,4859
27
27
  lamindb_setup/core/_hub_utils.py,sha256=b_M1LkdCjiMWm1EOlSb9GuPdLijwVgQDtATTpeZuXI0,1875
28
28
  lamindb_setup/core/_settings.py,sha256=jjZ_AxRXB3Y3UP6m04BAw_dhFbJbdg2-nZWmEv2LNZ8,3141
29
- lamindb_setup/core/_settings_instance.py,sha256=O9TtGijSJCXMREePegrxlQmHzKJFbgpC8yrlOe4BwJo,16920
29
+ lamindb_setup/core/_settings_instance.py,sha256=MJ1UArq49A168uGx9nOWDiXEKeSlDqtV-dqQf1kBcZw,17518
30
30
  lamindb_setup/core/_settings_load.py,sha256=NGgCDpN85j1EqoKlrYFIlZBMlBJm33gx2-wc96CP_ZQ,3922
31
31
  lamindb_setup/core/_settings_save.py,sha256=d1A-Ex-7H08mb8l7I0Oe0j0GilrfaDuprh_NMxhQAsQ,2704
32
32
  lamindb_setup/core/_settings_storage.py,sha256=k4XyJR6_KpUpQuBYZp4mEdABiT91gTTfbK7tAVwqZCA,13093
33
33
  lamindb_setup/core/_settings_store.py,sha256=dagS5c7wAMRnuZTRfCU4sKaIOyF_HwAP5Fnnn8vphno,2084
34
34
  lamindb_setup/core/_settings_user.py,sha256=P2lC4WDRAFfT-Xq3MlXJ-wMKIHCoGNhMTQfRGIAyUNQ,1344
35
35
  lamindb_setup/core/_setup_bionty_sources.py,sha256=h_pBANsSGK6ujAFsG21mtADHVJoMLKDR4eGgRP4Fgls,3072
36
- lamindb_setup/core/cloud_sqlite_locker.py,sha256=NIBNAGq7TTRrip9OzMdiQKj8QOuwhL9esyM0aehUqBA,6893
36
+ lamindb_setup/core/cloud_sqlite_locker.py,sha256=reu02M4aE2BT_A5AFqwhv48l91mOMyQ4zTd-hh-wtuU,6922
37
37
  lamindb_setup/core/django.py,sha256=QUQm3zt5QIiD8uv6o9vbSm_bshqiSWzKSkgD3z2eJCg,3542
38
38
  lamindb_setup/core/exceptions.py,sha256=eoI7AXgATgDVzgArtN7CUvpaMUC067vsBg5LHCsWzDM,305
39
39
  lamindb_setup/core/hashing.py,sha256=7r96h5JBzuwfOR_gNNqTyWNPKMuiOUfBYwn6sCbZkf8,2269
40
40
  lamindb_setup/core/types.py,sha256=bcYnZ0uM_2NXKJCl94Mmc-uYrQlRUUVKG3sK2N-F-N4,532
41
41
  lamindb_setup/core/upath.py,sha256=dwudkTVsXuyjS-2xR16WomcWtXJAEfRZ0ZzFq8_EDhE,27157
42
- lamindb_setup-0.73.1.dist-info/LICENSE,sha256=UOZ1F5fFDe3XXvG4oNnkL1-Ecun7zpHzRxjp-XsMeAo,11324
43
- lamindb_setup-0.73.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
44
- lamindb_setup-0.73.1.dist-info/METADATA,sha256=7iNq1IHqO4W4cHuOXPr_4wG7SxruZvn8MTBHZ_fRNM0,1620
45
- lamindb_setup-0.73.1.dist-info/RECORD,,
42
+ lamindb_setup-0.73.2.dist-info/LICENSE,sha256=UOZ1F5fFDe3XXvG4oNnkL1-Ecun7zpHzRxjp-XsMeAo,11324
43
+ lamindb_setup-0.73.2.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
44
+ lamindb_setup-0.73.2.dist-info/METADATA,sha256=t3AiEbJJFkA0l-DY3DIDoLQHjBW--ToZWYS8vYNxdDU,1620
45
+ lamindb_setup-0.73.2.dist-info/RECORD,,