lamindb_setup 1.1.1__tar.gz → 1.2.0__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.1.1 → lamindb_setup-1.2.0}/.pre-commit-config.yaml +2 -2
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/PKG-INFO +1 -1
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/__init__.py +1 -1
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_schema_metadata.py +13 -2
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_aws_options.py +7 -1
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/upath.py +6 -1
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/noxfile.py +1 -1
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_edge_request.py +1 -1
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-local/test_update_schema_in_hub.py +17 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-prod/test_upath.py +9 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/.github/workflows/build.yml +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/.github/workflows/doc-changes.yml +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/.gitignore +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/LICENSE +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/README.md +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/changelog.md +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/01-init-local-instance.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/02-connect-local-instance.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/03-add-managed-storage.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/04-test-bionty.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/05-init-hosted-instance.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/06-connect-hosted-instance.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/07-keep-artifacts-local.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/08-test-multi-session.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-cloud/test_notebooks.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-cache-management.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-cloud-sync.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-connect-anonymously.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-empty-init.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-import-schema.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-init-load-local-anonymously.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-insufficient-user-info.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-invalid-schema.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-sqlite-lock.ipynb +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test_notebooks2.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/index.md +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/notebooks.md +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/docs/reference.md +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_cache.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_check.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_check_setup.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_close.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_connect_instance.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_delete.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_django.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_entry_points.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_exportdb.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_importdb.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_init_instance.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_migrate.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_register_instance.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_schema.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_set_managed_storage.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_setup_user.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/_silence_loggers.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/__init__.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_aws_storage.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_deprecated.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_docs.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_hub_client.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_hub_core.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_hub_crud.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_hub_utils.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_private_django_api.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_settings.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_settings_instance.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_settings_load.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_settings_save.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_settings_storage.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_settings_store.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_settings_user.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/_setup_bionty_sources.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/cloud_sqlite_locker.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/django.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/exceptions.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/hashing.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/lamindb_setup/core/types.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/pyproject.toml +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/scripts/script-init-pass-user-no-writes.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/scripts/script-to-fail-managed-storage.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_connect_instance.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_delete_instance.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_fail_managed_storage.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_init_instance.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_init_pass_user_no_writes.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_login.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_migrate.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-cloud/test_set_storage.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-local/conftest.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-local/test_all.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-prod/conftest.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-prod/test_aws_options_manager.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-prod/test_django.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-prod/test_global_settings.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/hub-prod/test_switch_and_fallback_env.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/storage/test_entry_point.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/storage/test_hashing.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/storage/test_storage_access.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/storage/test_storage_basis.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/storage/test_storage_settings.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/storage/test_storage_stats.py +0 -0
- {lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/tests/storage/test_to_url.py +0 -0
|
@@ -148,6 +148,8 @@ class FieldMetadata(BaseModel):
|
|
|
148
148
|
model_name: str
|
|
149
149
|
schema_name: str
|
|
150
150
|
is_link_table: bool
|
|
151
|
+
is_primary_key: bool
|
|
152
|
+
is_editable: bool
|
|
151
153
|
relation_type: RelationType | None = None
|
|
152
154
|
related_field_name: str | None = None
|
|
153
155
|
related_model_name: str | None = None
|
|
@@ -156,6 +158,8 @@ class FieldMetadata(BaseModel):
|
|
|
156
158
|
|
|
157
159
|
class _ModelHandler:
|
|
158
160
|
def __init__(self, model, module_name: str, included_modules: list[str]) -> None:
|
|
161
|
+
from lamindb.models import LinkORM
|
|
162
|
+
|
|
159
163
|
self.model = model
|
|
160
164
|
self.class_name = model.__name__
|
|
161
165
|
self.module_name = module_name
|
|
@@ -163,12 +167,14 @@ class _ModelHandler:
|
|
|
163
167
|
self.table_name = model._meta.db_table
|
|
164
168
|
self.included_modules = included_modules
|
|
165
169
|
self.fields = self._get_fields_metadata(self.model)
|
|
170
|
+
self.is_link_table = issubclass(model, LinkORM)
|
|
166
171
|
|
|
167
172
|
def to_dict(self, include_django_objects: bool = True):
|
|
168
173
|
_dict = {
|
|
169
174
|
"fields": self.fields.copy(),
|
|
170
175
|
"class_name": self.class_name,
|
|
171
176
|
"table_name": self.table_name,
|
|
177
|
+
"is_link_table": self.is_link_table,
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
for field_name in self.fields.keys():
|
|
@@ -242,13 +248,16 @@ class _ModelHandler:
|
|
|
242
248
|
related_model_name = None
|
|
243
249
|
related_schema_name = None
|
|
244
250
|
related_field_name = None
|
|
245
|
-
|
|
251
|
+
is_editable = field.editable
|
|
246
252
|
else:
|
|
247
253
|
related_model_name = field.related_model._meta.model_name
|
|
248
254
|
related_schema_name = field.related_model.__get_module_name__()
|
|
249
255
|
schema_name = field.model.__get_module_name__()
|
|
250
256
|
related_field_name = field.remote_field.name
|
|
251
|
-
|
|
257
|
+
is_editable = False
|
|
258
|
+
|
|
259
|
+
field_name = field.name
|
|
260
|
+
is_primary_key = getattr(field, "primary_key", False)
|
|
252
261
|
|
|
253
262
|
if relation_type in ["one-to-many"]:
|
|
254
263
|
# For a one-to-many relation, the field belong
|
|
@@ -278,6 +287,8 @@ class _ModelHandler:
|
|
|
278
287
|
field_name=field_name,
|
|
279
288
|
type=internal_type,
|
|
280
289
|
is_link_table=issubclass(field.model, LinkORM),
|
|
290
|
+
is_primary_key=is_primary_key,
|
|
291
|
+
is_editable=is_editable,
|
|
281
292
|
column_name=column,
|
|
282
293
|
relation_type=relation_type,
|
|
283
294
|
related_schema_name=related_schema_name
|
|
@@ -125,7 +125,13 @@ class AWSOptionsManager:
|
|
|
125
125
|
|
|
126
126
|
def enrich_path(self, path: UPath, access_token: str | None = None) -> UPath:
|
|
127
127
|
# ignore paths with non-lamin-managed endpoints
|
|
128
|
-
if
|
|
128
|
+
if (
|
|
129
|
+
endpoint_url := path.storage_options.get("endpoint_url", None)
|
|
130
|
+
) not in LAMIN_ENDPOINTS:
|
|
131
|
+
if "r2.cloudflarestorage.com" in endpoint_url:
|
|
132
|
+
# fixed_upload_size should always be True for R2
|
|
133
|
+
# this option is needed for correct uploads to R2
|
|
134
|
+
path = UPath(path, fixed_upload_size=True)
|
|
129
135
|
return path
|
|
130
136
|
# trailing slash is needed to avoid returning incorrect results
|
|
131
137
|
# with .startswith
|
|
@@ -517,7 +517,7 @@ def modified(self) -> datetime | None:
|
|
|
517
517
|
|
|
518
518
|
|
|
519
519
|
def compute_file_tree(
|
|
520
|
-
path:
|
|
520
|
+
path: UPath,
|
|
521
521
|
*,
|
|
522
522
|
level: int = -1,
|
|
523
523
|
only_dirs: bool = False,
|
|
@@ -526,6 +526,11 @@ def compute_file_tree(
|
|
|
526
526
|
include_paths: set[Any] | None = None,
|
|
527
527
|
skip_suffixes: list[str] | None = None,
|
|
528
528
|
) -> tuple[str, int]:
|
|
529
|
+
# .exists() helps to separate files from folders for gcsfs
|
|
530
|
+
# otherwise sometimes it has is_dir() True and is_file() True
|
|
531
|
+
if path.protocol == "gs" and not path.exists():
|
|
532
|
+
raise FileNotFoundError
|
|
533
|
+
|
|
529
534
|
space = " "
|
|
530
535
|
branch = "│ "
|
|
531
536
|
tee = "├── "
|
|
@@ -44,7 +44,7 @@ uv pip install --system git+https://github.com/laminlabs/bionty
|
|
|
44
44
|
# cmds += "uv pip install --system -e ./django\n"
|
|
45
45
|
cmds = ""
|
|
46
46
|
cmds += modules_deps.strip()
|
|
47
|
-
cmds += """\nuv pip install --system huggingface_hub"""
|
|
47
|
+
cmds += """\nuv pip install --system gcsfs huggingface_hub"""
|
|
48
48
|
elif group == "hub-local":
|
|
49
49
|
cmds = modules_deps.strip()
|
|
50
50
|
# current package
|
|
@@ -42,7 +42,7 @@ def test_edge_request():
|
|
|
42
42
|
assert instance["lnid"] == hash_and_encode_as_b62(UUID(instance["id"]).hex)[:12]
|
|
43
43
|
assert instance["owner"] == "laminlabs"
|
|
44
44
|
assert instance["name"] == "lamindata"
|
|
45
|
-
assert instance["api_url"] == "https://us-east-1.
|
|
45
|
+
assert instance["api_url"] == "https://aws.us-east-1.lamin.ai/api"
|
|
46
46
|
assert instance["schema_str"].startswith("bionty,wetlab")
|
|
47
47
|
assert "schema_id" in instance
|
|
48
48
|
# check that schema_id is well-formed UUID
|
|
@@ -41,6 +41,9 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
41
41
|
assert "bionty" in schema["schema_json"]
|
|
42
42
|
assert "wetlab" in schema["schema_json"]
|
|
43
43
|
|
|
44
|
+
assert not schema["schema_json"]["core"]["artifact"]["is_link_table"]
|
|
45
|
+
assert schema["schema_json"]["core"]["artifactulabel"]["is_link_table"]
|
|
46
|
+
|
|
44
47
|
assert schema["schema_json"]["core"]["artifact"]["fields"]["id"] == {
|
|
45
48
|
"type": "AutoField",
|
|
46
49
|
"column_name": "id",
|
|
@@ -49,6 +52,8 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
49
52
|
"model_name": "artifact",
|
|
50
53
|
"schema_name": "core",
|
|
51
54
|
"is_link_table": False,
|
|
55
|
+
"is_primary_key": True,
|
|
56
|
+
"is_editable": True, # Primary key are read-only even if is_editable is True
|
|
52
57
|
"relation_type": None,
|
|
53
58
|
"related_field_name": None,
|
|
54
59
|
"related_model_name": None,
|
|
@@ -63,6 +68,8 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
63
68
|
"model_name": "artifact",
|
|
64
69
|
"schema_name": "core",
|
|
65
70
|
"is_link_table": False,
|
|
71
|
+
"is_primary_key": False,
|
|
72
|
+
"is_editable": False,
|
|
66
73
|
"relation_type": None,
|
|
67
74
|
"related_field_name": None,
|
|
68
75
|
"related_model_name": None,
|
|
@@ -81,6 +88,8 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
81
88
|
"model_name": "artifact",
|
|
82
89
|
"schema_name": "core",
|
|
83
90
|
"is_link_table": False,
|
|
91
|
+
"is_primary_key": False,
|
|
92
|
+
"is_editable": False,
|
|
84
93
|
"relation_type": "many-to-one",
|
|
85
94
|
"related_field_name": "created_artifacts",
|
|
86
95
|
"related_model_name": "user",
|
|
@@ -99,6 +108,8 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
99
108
|
"model_name": "gene",
|
|
100
109
|
"schema_name": "bionty",
|
|
101
110
|
"is_link_table": False,
|
|
111
|
+
"is_primary_key": False,
|
|
112
|
+
"is_editable": False,
|
|
102
113
|
"relation_type": "many-to-many",
|
|
103
114
|
"related_field_name": "genes",
|
|
104
115
|
"related_model_name": "pathway",
|
|
@@ -117,6 +128,8 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
117
128
|
"model_name": "well",
|
|
118
129
|
"schema_name": "wetlab",
|
|
119
130
|
"is_link_table": False,
|
|
131
|
+
"is_primary_key": False,
|
|
132
|
+
"is_editable": False,
|
|
120
133
|
"relation_type": "many-to-many",
|
|
121
134
|
"related_field_name": "wells",
|
|
122
135
|
"related_model_name": "artifact",
|
|
@@ -135,6 +148,8 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
135
148
|
"model_name": "transform",
|
|
136
149
|
"schema_name": "core",
|
|
137
150
|
"is_link_table": False,
|
|
151
|
+
"is_primary_key": False,
|
|
152
|
+
"is_editable": False,
|
|
138
153
|
"relation_type": "many-to-many",
|
|
139
154
|
"related_field_name": "successors",
|
|
140
155
|
"related_model_name": "transform",
|
|
@@ -153,6 +168,8 @@ def test_update_schema_in_hub(setup_instance):
|
|
|
153
168
|
"model_name": "transform",
|
|
154
169
|
"schema_name": "core",
|
|
155
170
|
"is_link_table": False,
|
|
171
|
+
"is_primary_key": False,
|
|
172
|
+
"is_editable": False,
|
|
156
173
|
"relation_type": "many-to-many",
|
|
157
174
|
"related_field_name": "predecessors",
|
|
158
175
|
"related_model_name": "transform",
|
|
@@ -6,6 +6,11 @@ import pytest
|
|
|
6
6
|
from lamindb_setup.core.upath import ProgressCallback, UPath, create_path
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
def test_view_tree():
|
|
10
|
+
with pytest.raises(FileNotFoundError):
|
|
11
|
+
UPath("gs://no-such-bucket-surely-145/folder").view_tree()
|
|
12
|
+
|
|
13
|
+
|
|
9
14
|
def test_trailing_slash():
|
|
10
15
|
assert UPath("s3://bucket/key/").path[-1] != "/"
|
|
11
16
|
assert (UPath("s3://bucket/") / "key/").path[-1] != "/"
|
|
@@ -51,6 +56,10 @@ def test_create_path():
|
|
|
51
56
|
upath = create_path("http://some_url.com/")
|
|
52
57
|
assert upath.storage_options["use_listings_cache"]
|
|
53
58
|
assert "timeout" in upath.storage_options["client_kwargs"]
|
|
59
|
+
# test R2
|
|
60
|
+
upath = create_path("s3://bucket/key?endpoint_url=https://r2.cloudflarestorage.com")
|
|
61
|
+
assert upath.as_posix() == "s3://bucket/key"
|
|
62
|
+
assert upath.storage_options["fixed_upload_size"]
|
|
54
63
|
|
|
55
64
|
|
|
56
65
|
def test_progress_callback_size():
|
|
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.1.1 → lamindb_setup-1.2.0}/docs/hub-prod/test-init-load-local-anonymously.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
|
{lamindb_setup-1.1.1 → lamindb_setup-1.2.0}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|