lamindb_setup 0.77.0__py2.py3-none-any.whl → 0.77.1__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 +5 -1
- lamindb_setup/_entry_points.py +22 -0
- {lamindb_setup-0.77.0.dist-info → lamindb_setup-0.77.1.dist-info}/METADATA +1 -1
- {lamindb_setup-0.77.0.dist-info → lamindb_setup-0.77.1.dist-info}/RECORD +6 -5
- {lamindb_setup-0.77.0.dist-info → lamindb_setup-0.77.1.dist-info}/LICENSE +0 -0
- {lamindb_setup-0.77.0.dist-info → lamindb_setup-0.77.1.dist-info}/WHEEL +0 -0
lamindb_setup/__init__.py
CHANGED
|
@@ -34,7 +34,7 @@ Modules & settings:
|
|
|
34
34
|
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
|
-
__version__ = "0.77.
|
|
37
|
+
__version__ = "0.77.1" # denote a release candidate for 0.1.0 with 0.1rc1
|
|
38
38
|
|
|
39
39
|
import os as _os
|
|
40
40
|
import sys as _sys
|
|
@@ -45,6 +45,7 @@ from ._close import close
|
|
|
45
45
|
from ._connect_instance import connect, load
|
|
46
46
|
from ._delete import delete
|
|
47
47
|
from ._django import django
|
|
48
|
+
from ._entry_points import call_registered_entry_points as _call_registered_entry_points
|
|
48
49
|
from ._init_instance import init
|
|
49
50
|
from ._migrate import migrate
|
|
50
51
|
from ._register_instance import register
|
|
@@ -68,4 +69,7 @@ if _os.name == "nt":
|
|
|
68
69
|
|
|
69
70
|
threading.excepthook = _except_hook
|
|
70
71
|
|
|
72
|
+
# provide a way for other packages to run custom code on import
|
|
73
|
+
_call_registered_entry_points("lamindb_setup.on_import")
|
|
74
|
+
|
|
71
75
|
settings.__doc__ = """Global :class:`~lamindb.setup.core.SetupSettings`."""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import warnings
|
|
3
|
+
from importlib.metadata import entry_points
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def call_registered_entry_points(group, **kwargs):
|
|
7
|
+
"""load and call entry points registered under group."""
|
|
8
|
+
if sys.version_info >= (3, 10):
|
|
9
|
+
eps = entry_points(group=group)
|
|
10
|
+
else:
|
|
11
|
+
eps = entry_points().get(group, [])
|
|
12
|
+
|
|
13
|
+
for ep in eps:
|
|
14
|
+
func = ep.load()
|
|
15
|
+
try:
|
|
16
|
+
func(**kwargs)
|
|
17
|
+
except BaseException as e:
|
|
18
|
+
warnings.warn(
|
|
19
|
+
f"Error loading entry point of group {group!r}: {ep} -> {e}",
|
|
20
|
+
RuntimeWarning,
|
|
21
|
+
stacklevel=2,
|
|
22
|
+
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
lamindb_setup/__init__.py,sha256=
|
|
1
|
+
lamindb_setup/__init__.py,sha256=S8zggJwTndSC_MojZpmVuvD4i8hp6CwnyjLNH8wU6d4,1726
|
|
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
|
|
@@ -6,6 +6,7 @@ lamindb_setup/_close.py,sha256=cXNwK7QTTyNFt2XTpLnO3KHljJ7ShOcISk95np_dltE,1239
|
|
|
6
6
|
lamindb_setup/_connect_instance.py,sha256=TaY317ufYYAVWoEAfeGI_P8IJDP4AYTcHxA4w0-CIqU,16386
|
|
7
7
|
lamindb_setup/_delete.py,sha256=Y8KSFYgY0UHAvjd7cCL6hZ_XiLeJwx50BguVATcj_Xo,5524
|
|
8
8
|
lamindb_setup/_django.py,sha256=EoyWvFzH0i9wxjy4JZhcoXCTckztP_Mrl6FbYQnMmLE,1534
|
|
9
|
+
lamindb_setup/_entry_points.py,sha256=Hs2oJQOCTaGUdWn-1mufM6qUZr9W_EJ_Oc3f0_Vc0Yw,616
|
|
9
10
|
lamindb_setup/_exportdb.py,sha256=43g77-tH-vAlTn8ig1mMD9-KXLKvxUeDLaq0gVu3l-c,2114
|
|
10
11
|
lamindb_setup/_importdb.py,sha256=yYYShzUajTsR-cTW4CZ-UNDWZY2uE5PAgNbp-wn8Ogc,1874
|
|
11
12
|
lamindb_setup/_init_instance.py,sha256=VxHgD2i0hrFm2f_WCX76YmS_Lsx2iufrMtfab82r8X0,12391
|
|
@@ -40,7 +41,7 @@ lamindb_setup/core/exceptions.py,sha256=eoI7AXgATgDVzgArtN7CUvpaMUC067vsBg5LHCsW
|
|
|
40
41
|
lamindb_setup/core/hashing.py,sha256=Y2cvEaqtm3KwpHqj5ZG2f_sLaXhsQT4oDrmJdHbOQeo,3116
|
|
41
42
|
lamindb_setup/core/types.py,sha256=bcYnZ0uM_2NXKJCl94Mmc-uYrQlRUUVKG3sK2N-F-N4,532
|
|
42
43
|
lamindb_setup/core/upath.py,sha256=EPLLm62q-Y3hZzd-286cynFMttXKDNXNOKL3_QGkeug,27215
|
|
43
|
-
lamindb_setup-0.77.
|
|
44
|
-
lamindb_setup-0.77.
|
|
45
|
-
lamindb_setup-0.77.
|
|
46
|
-
lamindb_setup-0.77.
|
|
44
|
+
lamindb_setup-0.77.1.dist-info/LICENSE,sha256=UOZ1F5fFDe3XXvG4oNnkL1-Ecun7zpHzRxjp-XsMeAo,11324
|
|
45
|
+
lamindb_setup-0.77.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
|
|
46
|
+
lamindb_setup-0.77.1.dist-info/METADATA,sha256=--qjx1aWeTkC0N4u10UC2JtnTvp_UMLPuXv2MO2icDQ,1667
|
|
47
|
+
lamindb_setup-0.77.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|