lamindb_setup 0.71.1__tar.gz → 0.71.3__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-0.71.1 → lamindb_setup-0.71.3}/.github/workflows/build.yml +3 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/PKG-INFO +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/changelog.md +5 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/03-add-managed-storage.ipynb +4 -6
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/__init__.py +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_connect_instance.py +4 -4
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_init_instance.py +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_hub_core.py +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/django.py +4 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/upath.py +7 -6
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-cloud/test_connect_instance.py +8 -11
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-local/conftest.py +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-local/test_all.py +3 -3
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/.github/workflows/latest-changes.jinja2 +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/.github/workflows/latest-changes.yml +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/.gitignore +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/.pre-commit-config.yaml +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/LICENSE +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/README.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/01-init-local-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/02-connect-local-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/04-test-bionty.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/05-init-hosted-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/06-connect-hosted-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/07-keep-artifacts-local.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/test-multi-session.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/test_notebooks.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-cache-management.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-cloud-sync.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-connect-anonymously.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-empty-init.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-import-schema.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-insufficient-user-info.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-invalid-schema.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test-sqlite-lock.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-prod/test_notebooks2.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/index.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/notebooks.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/reference.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_cache.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_check.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_check_setup.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_close.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_delete.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_django.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_exportdb.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_importdb.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_migrate.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_register_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_schema.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_set_managed_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_setup_user.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/_silence_loggers.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/__init__.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_aws_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_deprecated.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_docs.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_hub_client.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_hub_crud.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_hub_utils.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_settings.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_settings_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_settings_load.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_settings_save.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_settings_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_settings_store.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_settings_user.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/_setup_bionty_sources.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/cloud_sqlite_locker.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/exceptions.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/hashing.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/lamindb_setup/core/types.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/noxfile.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/pyproject.toml +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-cloud/test_delete_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-cloud/test_init_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-cloud/test_login.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-cloud/test_migrate.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-cloud/test_set_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-prod/conftest.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-prod/test_auto_connect.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-prod/test_django.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-prod/test_switch_and_fallback_env.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/hub-prod/test_upath.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/storage/test_hashing.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/storage/test_storage_access.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/storage/test_storage_basis.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/storage/test_storage_stats.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/tests/storage/test_to_url.py +0 -0
|
@@ -12,6 +12,7 @@ jobs:
|
|
|
12
12
|
# tests only on production hub
|
|
13
13
|
hub-prod:
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 10
|
|
15
16
|
steps:
|
|
16
17
|
- uses: actions/checkout@v3
|
|
17
18
|
- uses: actions/setup-python@v4
|
|
@@ -91,6 +92,7 @@ jobs:
|
|
|
91
92
|
# test user access to storage
|
|
92
93
|
storage:
|
|
93
94
|
runs-on: ubuntu-latest
|
|
95
|
+
timeout-minutes: 10
|
|
94
96
|
steps:
|
|
95
97
|
- uses: actions/checkout@v4
|
|
96
98
|
- uses: actions/setup-python@v4
|
|
@@ -114,7 +116,7 @@ jobs:
|
|
|
114
116
|
# test low-level hub functionality
|
|
115
117
|
hub-local:
|
|
116
118
|
runs-on: ubuntu-latest
|
|
117
|
-
timeout-minutes:
|
|
119
|
+
timeout-minutes: 10
|
|
118
120
|
steps:
|
|
119
121
|
- uses: aws-actions/configure-aws-credentials@v2
|
|
120
122
|
with:
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
<!-- prettier-ignore -->
|
|
4
4
|
Name | PR | Developer | Date | Version
|
|
5
5
|
--- | --- | --- | --- | ---
|
|
6
|
+
♻️ Better treatment of current_user_id | [754](https://github.com/laminlabs/lamindb-setup/pull/754) | [falexwolf](https://github.com/falexwolf) | 2024-05-06 | 0.72.2
|
|
7
|
+
💚 Fix tests | [753](https://github.com/laminlabs/lamindb-setup/pull/753) | [fredericenard](https://github.com/fredericenard) | 2024-05-06 |
|
|
8
|
+
♻️ Actually use local db | [751](https://github.com/laminlabs/lamindb-setup/pull/751) | [falexwolf](https://github.com/falexwolf) | 2024-05-06 | 0.71.2
|
|
9
|
+
✏️ Restore view_tree py3.9 compatibility | [750](https://github.com/laminlabs/lamindb-setup/pull/750) | [sunnyosun](https://github.com/sunnyosun) | 2024-05-06 |
|
|
10
|
+
💚 Pin laminapp-ui | [749](https://github.com/laminlabs/lamindb-setup/pull/749) | [falexwolf](https://github.com/falexwolf) | 2024-05-06 |
|
|
6
11
|
♻️ Extend valid suffixes to composite suffixes | [746](https://github.com/laminlabs/lamindb-setup/pull/746) | [falexwolf](https://github.com/falexwolf) | 2024-05-03 | 0.71.1
|
|
7
12
|
🐛 Fix test failures | [745](https://github.com/laminlabs/lamindb-setup/pull/745) | [Koncopd](https://github.com/Koncopd) | 2024-05-03 |
|
|
8
13
|
♻️ Persist keep-artifacts-local in settings.env | [743](https://github.com/laminlabs/lamindb-setup/pull/743) | [falexwolf](https://github.com/falexwolf) | 2024-05-03 |
|
|
@@ -302,16 +302,14 @@
|
|
|
302
302
|
"metadata": {},
|
|
303
303
|
"outputs": [],
|
|
304
304
|
"source": [
|
|
305
|
-
"from laminhub_rest.core.collaborator
|
|
305
|
+
"from laminhub_rest.core.instance.collaborator import InstanceCollaboratorHandler\n",
|
|
306
306
|
"from lamindb_setup.core._hub_client import connect_hub_with_auth\n",
|
|
307
307
|
"\n",
|
|
308
308
|
"admin_hub = connect_hub_with_auth()\n",
|
|
309
|
-
"
|
|
309
|
+
"InstanceCollaboratorHandler(admin_hub).add_by_slug(\n",
|
|
310
|
+
" \"testuser1/test-add-managed-storage\",\n",
|
|
310
311
|
" \"testuser2\",\n",
|
|
311
|
-
" \"
|
|
312
|
-
" \"test-add-managed-storage\",\n",
|
|
313
|
-
" \"write\",\n",
|
|
314
|
-
" admin_hub,\n",
|
|
312
|
+
" \"write\"\n",
|
|
315
313
|
")\n",
|
|
316
314
|
"admin_hub.auth.close()"
|
|
317
315
|
]
|
|
@@ -107,7 +107,7 @@ def connect(
|
|
|
107
107
|
*,
|
|
108
108
|
db: str | None = None,
|
|
109
109
|
storage: UPathStr | None = None,
|
|
110
|
-
|
|
110
|
+
_raise_not_found_error: bool = True,
|
|
111
111
|
_test: bool = False,
|
|
112
112
|
) -> str | tuple | None:
|
|
113
113
|
"""Connect to instance.
|
|
@@ -181,12 +181,12 @@ def connect(
|
|
|
181
181
|
if settings_file.exists():
|
|
182
182
|
isettings = load_instance_settings(settings_file)
|
|
183
183
|
if isettings.is_remote:
|
|
184
|
-
if
|
|
184
|
+
if _raise_not_found_error:
|
|
185
185
|
raise InstanceNotFoundError(message)
|
|
186
186
|
return "instance-not-found"
|
|
187
187
|
|
|
188
188
|
else:
|
|
189
|
-
if
|
|
189
|
+
if _raise_not_found_error:
|
|
190
190
|
raise InstanceNotFoundError(message)
|
|
191
191
|
return "instance-not-found"
|
|
192
192
|
|
|
@@ -209,7 +209,7 @@ def connect(
|
|
|
209
209
|
f" {isettings._sqlite_file_local}\nTo push the file to the cloud,"
|
|
210
210
|
" call: lamin close"
|
|
211
211
|
)
|
|
212
|
-
elif
|
|
212
|
+
elif _raise_not_found_error:
|
|
213
213
|
raise SystemExit(msg)
|
|
214
214
|
else:
|
|
215
215
|
logger.warning(
|
|
@@ -184,7 +184,7 @@ def validate_init_args(
|
|
|
184
184
|
name_str = infer_instance_name(storage=storage, name=name, db=db)
|
|
185
185
|
# test whether instance exists by trying to load it
|
|
186
186
|
instance_slug = f"{settings.user.handle}/{name_str}"
|
|
187
|
-
response = connect(instance_slug,
|
|
187
|
+
response = connect(instance_slug, db=db, _raise_not_found_error=False, _test=_test)
|
|
188
188
|
instance_state: Literal[
|
|
189
189
|
"connected",
|
|
190
190
|
"instance-corrupted-or-deleted",
|
|
@@ -290,7 +290,7 @@ def _init_instance(isettings: InstanceSettings, client: Client) -> None:
|
|
|
290
290
|
client.table("storage").update(
|
|
291
291
|
{"instance_id": isettings._id.hex, "is_default": True}
|
|
292
292
|
).eq("id", isettings.storage._uuid.hex).execute() # type: ignore
|
|
293
|
-
logger.
|
|
293
|
+
logger.important(f"go to: https://lamin.ai/{isettings.owner}/{isettings.name}")
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
def connect_instance(
|
|
@@ -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
|
|
@@ -471,7 +471,8 @@ def compute_file_tree(
|
|
|
471
471
|
contents = [d for d in contents if d.is_dir()]
|
|
472
472
|
pointers = [tee] * (len(contents) - 1) + [last]
|
|
473
473
|
n_files_per_dir_and_type = defaultdict(lambda: 0) # type: ignore
|
|
474
|
-
|
|
474
|
+
# TODO: pass strict=False to zip with python > 3.9
|
|
475
|
+
for pointer, child_path in zip(pointers, contents): # type: ignore
|
|
475
476
|
if child_path.is_dir():
|
|
476
477
|
if include_dirs and child_path not in include_dirs:
|
|
477
478
|
continue
|
|
@@ -504,8 +505,8 @@ def compute_file_tree(
|
|
|
504
505
|
display_suffixes = ", ".join([f"{suffix!r}" for suffix in suffixes])
|
|
505
506
|
suffix_message = f" with suffixes {display_suffixes}" if n_objects > 0 else ""
|
|
506
507
|
message = (
|
|
507
|
-
f"{
|
|
508
|
-
f" {n_objects} files{suffix_message})
|
|
508
|
+
f"{n_directories} sub-{directory_info} &"
|
|
509
|
+
f" {n_objects} files{suffix_message}\n{path.resolve()}{folder_tree}"
|
|
509
510
|
)
|
|
510
511
|
return message, n_objects
|
|
511
512
|
|
|
@@ -810,12 +811,12 @@ def check_storage_is_empty(
|
|
|
810
811
|
if raise_error
|
|
811
812
|
else "consider deleting them"
|
|
812
813
|
)
|
|
813
|
-
hint = "'
|
|
814
|
+
hint = "'_is_initialized'"
|
|
814
815
|
if n_offset_objects == 2:
|
|
815
|
-
hint += "& SQLite file"
|
|
816
|
+
hint += " & SQLite file"
|
|
816
817
|
hint += " ignored"
|
|
817
818
|
message = (
|
|
818
|
-
f"Storage {directory_string} contains {n_objects} objects "
|
|
819
|
+
f"Storage {directory_string} contains {n_objects - n_offset_objects} objects "
|
|
819
820
|
f"({hint}) - {ask_for_deletion}\n{objects}"
|
|
820
821
|
)
|
|
821
822
|
if n_diff > 0:
|
|
@@ -7,8 +7,7 @@ import pytest
|
|
|
7
7
|
from lamindb_setup._connect_instance import InstanceNotFoundError
|
|
8
8
|
from lamindb_setup.core._hub_client import connect_hub_with_auth
|
|
9
9
|
from lamindb_setup.core._hub_crud import update_instance
|
|
10
|
-
from laminhub_rest.core.collaborator
|
|
11
|
-
from laminhub_rest.core.collaborator._delete_collaborator import delete_collaborator
|
|
10
|
+
from laminhub_rest.core.instance.collaborator import InstanceCollaboratorHandler
|
|
12
11
|
from postgrest.exceptions import APIError
|
|
13
12
|
|
|
14
13
|
# @pytest.fixture
|
|
@@ -24,15 +23,16 @@ def test_connect_after_revoked_access():
|
|
|
24
23
|
if os.getenv("LAMIN_ENV") == "prod":
|
|
25
24
|
ln_setup.login("testuser1@lamin.ai")
|
|
26
25
|
admin_hub = connect_hub_with_auth()
|
|
26
|
+
collaborator_handler = InstanceCollaboratorHandler(admin_hub)
|
|
27
27
|
try:
|
|
28
28
|
# if a previous test run failed, this will
|
|
29
29
|
# error with a violation of a unique constraint
|
|
30
|
-
|
|
30
|
+
collaborator_handler.add_by_slug(
|
|
31
|
+
"laminlabs/static-test-instance-private-sqlite",
|
|
31
32
|
"testuser2",
|
|
32
|
-
"laminlabs",
|
|
33
|
-
"static-test-instance-private-sqlite",
|
|
34
33
|
"write",
|
|
35
|
-
|
|
34
|
+
"default",
|
|
35
|
+
skip_insert_user_table=True,
|
|
36
36
|
)
|
|
37
37
|
except APIError:
|
|
38
38
|
pass
|
|
@@ -44,11 +44,8 @@ def test_connect_after_revoked_access():
|
|
|
44
44
|
ln_setup.settings.instance.storage.root_as_str
|
|
45
45
|
== "s3://lamindb-setup-private-bucket"
|
|
46
46
|
)
|
|
47
|
-
|
|
48
|
-
"laminlabs",
|
|
49
|
-
"static-test-instance-private-sqlite",
|
|
50
|
-
ln_setup.settings.user._uuid,
|
|
51
|
-
admin_hub,
|
|
47
|
+
collaborator_handler.delete_by_slug(
|
|
48
|
+
"laminlabs/static-test-instance-private-sqlite", "testuser2"
|
|
52
49
|
)
|
|
53
50
|
# make the instance private
|
|
54
51
|
with pytest.raises(InstanceNotFoundError):
|
|
@@ -34,7 +34,7 @@ from lamindb_setup.core._settings_save import save_user_settings
|
|
|
34
34
|
from lamindb_setup.core._settings_storage import base62
|
|
35
35
|
from lamindb_setup.core._settings_storage import init_storage as init_storage_base
|
|
36
36
|
from lamindb_setup.core._settings_user import UserSettings
|
|
37
|
-
from laminhub_rest.core.collaborator
|
|
37
|
+
from laminhub_rest.core.instance.collaborator import InstanceCollaboratorHandler
|
|
38
38
|
from postgrest.exceptions import APIError
|
|
39
39
|
|
|
40
40
|
|
|
@@ -196,11 +196,11 @@ def test_db_user(
|
|
|
196
196
|
)
|
|
197
197
|
assert db_collaborator is None
|
|
198
198
|
# now add testreader1 as a collaborator
|
|
199
|
-
|
|
199
|
+
InstanceCollaboratorHandler(admin_client).add(
|
|
200
200
|
account_id=reader_settings._uuid,
|
|
201
201
|
instance_id=instance_id,
|
|
202
202
|
role="read",
|
|
203
|
-
|
|
203
|
+
skip_insert_user_table=True,
|
|
204
204
|
)
|
|
205
205
|
# check that this was successful and can be read by the reader
|
|
206
206
|
db_collaborator = select_collaborator(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/docs/hub-cloud/02-connect-local-instance.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/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
|
{lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/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
|
{lamindb_setup-0.71.1 → lamindb_setup-0.71.3}/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
|