lamindb_setup 0.71.1__tar.gz → 0.71.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-0.71.1 → lamindb_setup-0.71.2}/.github/workflows/build.yml +5 -3
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/PKG-INFO +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/changelog.md +3 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/__init__.py +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_connect_instance.py +4 -4
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_init_instance.py +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_hub_core.py +1 -1
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_settings_user.py +6 -2
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/upath.py +7 -6
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/.github/workflows/latest-changes.jinja2 +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/.github/workflows/latest-changes.yml +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/.gitignore +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/.pre-commit-config.yaml +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/LICENSE +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/README.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/01-init-local-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/02-connect-local-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/03-add-managed-storage.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/04-test-bionty.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/05-init-hosted-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/06-connect-hosted-instance.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/07-keep-artifacts-local.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/test-multi-session.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-cloud/test_notebooks.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-cache-management.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-cloud-sync.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-connect-anonymously.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-empty-init.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-import-schema.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-insufficient-user-info.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-invalid-schema.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test-sqlite-lock.ipynb +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/hub-prod/test_notebooks2.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/index.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/notebooks.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/docs/reference.md +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_cache.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_check.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_check_setup.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_close.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_delete.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_django.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_exportdb.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_importdb.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_migrate.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_register_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_schema.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_set_managed_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_setup_user.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/_silence_loggers.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/__init__.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_aws_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_deprecated.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_docs.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_hub_client.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_hub_crud.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_hub_utils.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_settings.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_settings_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_settings_load.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_settings_save.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_settings_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_settings_store.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/_setup_bionty_sources.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/cloud_sqlite_locker.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/django.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/exceptions.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/hashing.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/lamindb_setup/core/types.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/noxfile.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/pyproject.toml +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-cloud/test_connect_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-cloud/test_delete_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-cloud/test_init_instance.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-cloud/test_login.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-cloud/test_migrate.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-cloud/test_set_storage.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-local/conftest.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-local/test_all.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-prod/conftest.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-prod/test_auto_connect.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-prod/test_django.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-prod/test_switch_and_fallback_env.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/hub-prod/test_upath.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/storage/test_hashing.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/storage/test_storage_access.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/storage/test_storage_basis.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/tests/storage/test_storage_stats.py +0 -0
- {lamindb_setup-0.71.1 → lamindb_setup-0.71.2}/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
|
|
@@ -60,7 +61,7 @@ jobs:
|
|
|
60
61
|
repository: laminlabs/laminapp-ui
|
|
61
62
|
token: ${{ secrets.GH_TOKEN_DEPLOY_LAMINAPP }}
|
|
62
63
|
path: laminhub
|
|
63
|
-
ref:
|
|
64
|
+
ref: 11b0e5065d6f1a05484e1ef8ab8413f3c65bfa5a
|
|
64
65
|
- uses: actions/cache@v3
|
|
65
66
|
with:
|
|
66
67
|
path: ~/.cache/pre-commit
|
|
@@ -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:
|
|
@@ -128,7 +130,7 @@ jobs:
|
|
|
128
130
|
repository: laminlabs/laminapp-ui
|
|
129
131
|
token: ${{ secrets.GH_TOKEN_DEPLOY_LAMINAPP }}
|
|
130
132
|
path: laminhub
|
|
131
|
-
ref:
|
|
133
|
+
ref: 11b0e5065d6f1a05484e1ef8ab8413f3c65bfa5a
|
|
132
134
|
- name: Set env file for local test of edge functions
|
|
133
135
|
run: |
|
|
134
136
|
touch .env.local
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
<!-- prettier-ignore -->
|
|
4
4
|
Name | PR | Developer | Date | Version
|
|
5
5
|
--- | --- | --- | --- | ---
|
|
6
|
+
♻️ Actually use local db | [751](https://github.com/laminlabs/lamindb-setup/pull/751) | [falexwolf](https://github.com/falexwolf) | 2024-05-06 | 0.71.2
|
|
7
|
+
✏️ Restore view_tree py3.9 compatibility | [750](https://github.com/laminlabs/lamindb-setup/pull/750) | [sunnyosun](https://github.com/sunnyosun) | 2024-05-06 |
|
|
8
|
+
💚 Pin laminapp-ui | [749](https://github.com/laminlabs/lamindb-setup/pull/749) | [falexwolf](https://github.com/falexwolf) | 2024-05-06 |
|
|
6
9
|
♻️ 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
10
|
🐛 Fix test failures | [745](https://github.com/laminlabs/lamindb-setup/pull/745) | [Koncopd](https://github.com/Koncopd) | 2024-05-03 |
|
|
8
11
|
♻️ Persist keep-artifacts-local in settings.env | [743](https://github.com/laminlabs/lamindb-setup/pull/743) | [falexwolf](https://github.com/falexwolf) | 2024-05-03 |
|
|
@@ -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(
|
|
@@ -46,6 +46,10 @@ class UserSettings:
|
|
|
46
46
|
@property
|
|
47
47
|
def id(self):
|
|
48
48
|
"""Integer id valid in current intance."""
|
|
49
|
-
|
|
49
|
+
# do NOT use the function below because this
|
|
50
|
+
# doesn't error - it needs to be this way to have
|
|
51
|
+
# a user id available in migrations
|
|
52
|
+
# from lnschema_core.users import current_user_id
|
|
53
|
+
from lnschema_core.models import User
|
|
50
54
|
|
|
51
|
-
return
|
|
55
|
+
return User.objects.get(uid=self.uid).id
|
|
@@ -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:
|
|
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.2}/docs/hub-cloud/02-connect-local-instance.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lamindb_setup-0.71.1 → lamindb_setup-0.71.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
|
{lamindb_setup-0.71.1 → lamindb_setup-0.71.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
|
{lamindb_setup-0.71.1 → lamindb_setup-0.71.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
|