lamindb_setup 1.8.0__py3-none-any.whl → 1.8.1__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
@@ -35,7 +35,7 @@ Modules & settings:
35
35
 
36
36
  """
37
37
 
38
- __version__ = "1.8.0" # denote a release candidate for 0.1.0 with 0.1rc1
38
+ __version__ = "1.8.1" # denote a release candidate for 0.1.0 with 0.1rc1
39
39
 
40
40
  import os
41
41
 
@@ -32,7 +32,7 @@ if TYPE_CHECKING:
32
32
 
33
33
  from ._settings_user import UserSettings
34
34
 
35
- LOCAL_STORAGE_MESSAGE = "No storage location found in current environment: create one via, e.g., ln.Storage(root='/dir/our_shared_dir', host='our-server-123).save()"
35
+ LOCAL_STORAGE_MESSAGE = "No storage location found in current environment: create one via, e.g., ln.Storage(root='/dir/our_shared_dir', host='our-server-123').save()"
36
36
 
37
37
 
38
38
  def sanitize_git_repo_url(repo_url: str) -> str:
@@ -264,17 +264,21 @@ class InstanceSettings:
264
264
  )
265
265
  local_root = UPath(local_root)
266
266
  assert isinstance(local_root, LocalPathClasses)
267
- self._local_storage, _ = init_storage(
267
+ tentative_storage, hub_status = init_storage(
268
268
  local_root,
269
269
  instance_id=self._id,
270
270
  instance_slug=self.slug,
271
271
  register_hub=True,
272
272
  region=host,
273
273
  ) # type: ignore
274
- register_storage_in_instance(self._local_storage) # type: ignore
275
- logger.important(
276
- f"defaulting to local storage: {self._local_storage.root} on host {host}"
277
- )
274
+ if hub_status in ["hub-record-created", "hub-record-retrieved"]:
275
+ register_storage_in_instance(tentative_storage) # type: ignore
276
+ self._local_storage = tentative_storage
277
+ logger.important(
278
+ f"defaulting to local storage: {self._local_storage.root} on host {host}"
279
+ )
280
+ else:
281
+ logger.warning(f"could not set this local storage location: {local_root}")
278
282
 
279
283
  @property
280
284
  @deprecated("local_storage")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lamindb_setup
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: Setup & configure LaminDB.
5
5
  Author-email: Lamin Labs <open-source@lamin.ai>
6
6
  Requires-Python: >=3.10
@@ -1,4 +1,4 @@
1
- lamindb_setup/__init__.py,sha256=t86vewd7XZhz-qY1WJCxdsaTAqsjwQXiMF7Y6L2odJQ,2782
1
+ lamindb_setup/__init__.py,sha256=AxSsbRTefAmDAw_GNRIXygb7gedXU5pMXoRM2oXmvqY,2782
2
2
  lamindb_setup/_cache.py,sha256=5o749NuW6zi6uP4rmBtwxg7ifWpAHXVngzC0tEgXLgo,2776
3
3
  lamindb_setup/_check.py,sha256=28PcG8Kp6OpjSLSi1r2boL2Ryeh6xkaCL87HFbjs6GA,129
4
4
  lamindb_setup/_check_setup.py,sha256=bXuqx2HEc178RM7gbKZQ65PEVJFu6uSOKiHAs_xz6GI,5575
@@ -31,7 +31,7 @@ lamindb_setup/core/_hub_crud.py,sha256=Jz0d8wFKM1Pv9B9byyUJPlCIMkIzk56Jd-c3Awpm9
31
31
  lamindb_setup/core/_hub_utils.py,sha256=6dyDGyzYFgVfR_lE3VN3CP1jGp98gxPtr-T91PAP05U,2687
32
32
  lamindb_setup/core/_private_django_api.py,sha256=By63l3vIEtK1pq246FhHq3tslxsaTJGKm5VakYluWp4,2656
33
33
  lamindb_setup/core/_settings.py,sha256=0la2eYAHcdMYophheGsgQaD2nJGQrPuX4jMV5GKDiC0,12946
34
- lamindb_setup/core/_settings_instance.py,sha256=iG4Me-9e9Z4yj3EG3YB3OtkiZ-j-u8R1WPXIeQhMNmw,20484
34
+ lamindb_setup/core/_settings_instance.py,sha256=ML5NUZzmDGPhEJdgK-gzQ4f9zwb0NeeXe13sgQrP-1A,20732
35
35
  lamindb_setup/core/_settings_load.py,sha256=JWd0_hBy04xjKo-tH4y8C9RkaywjrmoT0PsKzVme0n4,5176
36
36
  lamindb_setup/core/_settings_save.py,sha256=XZx-vow7BT6y3JpRBB2UOJp2vwc7jOGea4wSgOPqjPU,3262
37
37
  lamindb_setup/core/_settings_storage.py,sha256=wVwDDD51UsJz5gS6juERbWHCdyucP0R2DLaUGhnLUpQ,17079
@@ -44,7 +44,7 @@ lamindb_setup/core/exceptions.py,sha256=qjMzqy_uzPA7mCOdnoWnS_fdA6OWbdZGftz-YYpl
44
44
  lamindb_setup/core/hashing.py,sha256=Y8Uc5uSGTfU6L2R_gb5w8DdHhGRog7RnkK-e9FEMjPY,3680
45
45
  lamindb_setup/core/types.py,sha256=T7NwspfRHgIIpYsXDcApks8jkOlGeGRW-YbVLB7jNIo,67
46
46
  lamindb_setup/core/upath.py,sha256=UDPcZaNp3WtZSYrX8hGQ1lq214dBn079bz0FPWFjIbA,34449
47
- lamindb_setup-1.8.0.dist-info/LICENSE,sha256=UOZ1F5fFDe3XXvG4oNnkL1-Ecun7zpHzRxjp-XsMeAo,11324
48
- lamindb_setup-1.8.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
49
- lamindb_setup-1.8.0.dist-info/METADATA,sha256=oxlCgEfbGqZ8zUi2aKMyQdCZoVTkngUl1SKM-Dc1mdU,1797
50
- lamindb_setup-1.8.0.dist-info/RECORD,,
47
+ lamindb_setup-1.8.1.dist-info/LICENSE,sha256=UOZ1F5fFDe3XXvG4oNnkL1-Ecun7zpHzRxjp-XsMeAo,11324
48
+ lamindb_setup-1.8.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
49
+ lamindb_setup-1.8.1.dist-info/METADATA,sha256=jV9tU71hkGNvtGWxfr_jcw9JgOnWgHkJWlolAHORMO4,1797
50
+ lamindb_setup-1.8.1.dist-info/RECORD,,