lamindb_setup 1.12.0__tar.gz → 1.12.2__tar.gz
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-1.12.0 → lamindb_setup-1.12.2}/PKG-INFO +2 -3
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/__init__.py +7 -1
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_connect_instance.py +4 -4
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_settings_instance.py +13 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/pyproject.toml +1 -2
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/scripts/script-to-fail-managed-storage.py +4 -5
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_connect_instance.py +6 -4
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/.github/workflows/build.yml +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/.github/workflows/doc-changes.yml +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/.gitignore +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/.pre-commit-config.yaml +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/LICENSE +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/README.md +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/changelog.md +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/01-init-local-instance.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/02-connect-local-instance.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/03-add-managed-storage.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/04-test-bionty.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/05-init-hosted-instance.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/06-connect-hosted-instance.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/07-keep-artifacts-local.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/08-test-multi-session.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/09-test-migrate.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/test_notebooks.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-cache-management.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-cloud-sync.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-connect-anonymously.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-empty-init.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-import-schema.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-init-load-local-anonymously.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-insufficient-user-info.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-invalid-schema.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-sqlite-lock.ipynb +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test_notebooks2.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/index.md +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/notebooks.md +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/reference.md +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_cache.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_check.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_check_setup.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_delete.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_disconnect.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_django.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_entry_points.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_exportdb.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_importdb.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_init_instance.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_migrate.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_register_instance.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_schema.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_schema_metadata.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_set_managed_storage.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_setup_user.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/_silence_loggers.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/__init__.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_aws_options.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_aws_storage.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_deprecated.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_docs.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_hub_client.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_hub_core.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_hub_crud.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_hub_utils.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_private_django_api.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_settings.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_settings_load.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_settings_save.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_settings_storage.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_settings_store.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_settings_user.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/_setup_bionty_sources.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/cloud_sqlite_locker.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/django.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/exceptions.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/hashing.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/types.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/core/upath.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/errors.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/py.typed +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/lamindb_setup/types.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/noxfile.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/scripts/script-init-pass-user-no-writes.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_delete_instance.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_edge_request.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_fail_managed_storage.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_init_instance.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_init_pass_user_no_writes.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_login.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_set_storage.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-local/conftest.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-local/scripts/script-connect-fine-grained-access.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-local/test_all.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-local/test_update_schema_in_hub.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/conftest.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/test_aws_options_manager.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/test_django.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/test_global_settings.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/test_migrate.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/test_switch_and_fallback_env.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/test_upath.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/storage/test_entry_point.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/storage/test_hashing.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/storage/test_storage_access.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/storage/test_storage_basis.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/storage/test_storage_settings.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/storage/test_storage_stats.py +0 -0
- {lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/storage/test_to_url.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: lamindb_setup
|
|
3
|
-
Version: 1.12.
|
|
3
|
+
Version: 1.12.2
|
|
4
4
|
Summary: Setup & configure LaminDB.
|
|
5
5
|
Author-email: Lamin Labs <open-source@lamin.ai>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -20,8 +20,7 @@ Requires-Dist: storage3!=0.11.2; python_version < '3.11'
|
|
|
20
20
|
Requires-Dist: pyjwt<3.0.0
|
|
21
21
|
Requires-Dist: psutil
|
|
22
22
|
Requires-Dist: packaging
|
|
23
|
-
Requires-Dist:
|
|
24
|
-
Requires-Dist: aiobotocore[boto3]>=2.5.4,<3.0.0 ; extra == "aws"
|
|
23
|
+
Requires-Dist: aiobotocore[boto3]>=2.12.4,<3.0.0 ; extra == "aws"
|
|
25
24
|
Requires-Dist: s3fs>=2023.12.2,<=2025.7.0,!=2024.10.0 ; extra == "aws"
|
|
26
25
|
Requires-Dist: line_profiler ; extra == "dev"
|
|
27
26
|
Requires-Dist: psycopg2-binary ; extra == "dev"
|
|
@@ -35,9 +35,15 @@ Modules & settings:
|
|
|
35
35
|
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
|
-
__version__ = "1.12.
|
|
38
|
+
__version__ = "1.12.2" # denote a release candidate for 0.1.0 with 0.1rc1
|
|
39
39
|
|
|
40
40
|
import os
|
|
41
|
+
import warnings
|
|
42
|
+
|
|
43
|
+
# ignore for now, remove this after supabase upgrade in the deps
|
|
44
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning, module="supabase")
|
|
45
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning, module="supafunc")
|
|
46
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning, module="postgrest")
|
|
41
47
|
|
|
42
48
|
from packaging import version as packaging_version
|
|
43
49
|
|
|
@@ -162,10 +162,10 @@ def _connect_instance(
|
|
|
162
162
|
schema_id=None
|
|
163
163
|
if (schema_id := instance_result["schema_id"]) is None
|
|
164
164
|
else UUID(schema_id),
|
|
165
|
-
fine_grained_access=bool(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
fine_grained_access=bool(instance_result["fine_grained_access"]),
|
|
166
|
+
db_permissions=instance_result.get("db_permissions", None)
|
|
167
|
+
if not use_root_db_user
|
|
168
|
+
else "write",
|
|
169
169
|
)
|
|
170
170
|
else:
|
|
171
171
|
if hub_result != "anonymous-user":
|
|
@@ -354,6 +354,19 @@ class InstanceSettings:
|
|
|
354
354
|
return os.environ["LAMIN_API_URL"]
|
|
355
355
|
return self._api_url
|
|
356
356
|
|
|
357
|
+
@property
|
|
358
|
+
def ui_url(self) -> str | None:
|
|
359
|
+
"""URL for UI.
|
|
360
|
+
|
|
361
|
+
Use this URL for accessing the UI related to this instance.
|
|
362
|
+
"""
|
|
363
|
+
if self.api_url is None:
|
|
364
|
+
return None
|
|
365
|
+
if "lamin.ai" in self.api_url:
|
|
366
|
+
return "https://lamin.ai"
|
|
367
|
+
else:
|
|
368
|
+
return self.api_url.replace("/api", "")
|
|
369
|
+
|
|
357
370
|
@property
|
|
358
371
|
def available_spaces(self) -> dict | None:
|
|
359
372
|
"""Available spaces with roles for instances fine-grained permissions.
|
|
@@ -32,8 +32,7 @@ Home = "https://github.com/laminlabs/lamindb-setup"
|
|
|
32
32
|
|
|
33
33
|
[project.optional-dependencies]
|
|
34
34
|
aws = [
|
|
35
|
-
"
|
|
36
|
-
"aiobotocore[boto3]>=2.5.4,<3.0.0",
|
|
35
|
+
"aiobotocore[boto3]>=2.12.4,<3.0.0", # less problematic, supports urllib 2 via botocore bounds
|
|
37
36
|
# exclude 2024.10.0 due to https://github.com/fsspec/s3fs/pull/910
|
|
38
37
|
"s3fs>=2023.12.2,<=2025.7.0,!=2024.10.0"
|
|
39
38
|
]
|
|
@@ -10,14 +10,13 @@ from lamindb_setup.core._hub_client import connect_hub_with_auth
|
|
|
10
10
|
ln_setup.login("testuser1")
|
|
11
11
|
ln_setup.connect("laminlabs/lamin-site-assets")
|
|
12
12
|
|
|
13
|
+
from lamindb.errors import NoWriteAccess
|
|
14
|
+
|
|
13
15
|
test_root = Path("./test_script_ci_storage").resolve().as_posix()
|
|
14
16
|
|
|
15
|
-
with pytest.raises(
|
|
17
|
+
with pytest.raises(NoWriteAccess) as error:
|
|
16
18
|
set_managed_storage(test_root, host="test-host-1234")
|
|
17
|
-
|
|
18
|
-
assert error_str.endswith(
|
|
19
|
-
"ProgrammingError: permission denied for table lamindb_storage"
|
|
20
|
-
), error_str
|
|
19
|
+
assert "You're not allowed to write to the space 'all'" in str(error)
|
|
21
20
|
|
|
22
21
|
hub_client = connect_hub_with_auth()
|
|
23
22
|
|
|
@@ -131,12 +131,14 @@ def test_connect_with_db_parameter():
|
|
|
131
131
|
# test ignore loading from cache because hub result has jwt access
|
|
132
132
|
ln_setup.connect("laminlabs/lamindata", _test=True)
|
|
133
133
|
assert "jwt" in ln_setup.settings.instance.db
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
ln_setup.login("testuser2")
|
|
137
|
-
# receives public connection
|
|
134
|
+
# anon should get public
|
|
135
|
+
ln_setup.logout()
|
|
138
136
|
ln_setup.connect("laminlabs/lamindata", _test=True)
|
|
139
137
|
assert "public" in ln_setup.settings.instance.db
|
|
138
|
+
# it is an org member, receives jwt connection
|
|
139
|
+
ln_setup.login("testuser2")
|
|
140
|
+
ln_setup.connect("laminlabs/lamindata", _test=True)
|
|
141
|
+
assert "jwt" in ln_setup.settings.instance.db
|
|
140
142
|
# now pass the connection string
|
|
141
143
|
ln_setup.connect("laminlabs/lamindata", _db=db, _test=True)
|
|
142
144
|
assert "testdbuser" in ln_setup.settings.instance.db
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/02-connect-local-instance.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-cloud/06-connect-hosted-instance.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-init-load-local-anonymously.ipynb
RENAMED
|
File without changes
|
{lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/docs/hub-prod/test-insufficient-user-info.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-cloud/test_init_pass_user_no_writes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-1.12.0 → lamindb_setup-1.12.2}/tests/hub-prod/test_switch_and_fallback_env.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|