lamindb_setup 1.8.3__tar.gz → 1.9.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.
Files changed (106) hide show
  1. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/PKG-INFO +1 -1
  2. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/__init__.py +1 -1
  3. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_migrate.py +9 -2
  4. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_aws_options.py +17 -5
  5. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_hub_client.py +5 -0
  6. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_hub_core.py +2 -0
  7. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_settings.py +19 -6
  8. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_settings_instance.py +2 -1
  9. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/django.py +6 -1
  10. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/upath.py +6 -2
  11. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-local/scripts/script-connect-fine-grained-access.py +9 -0
  12. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-local/test_all.py +1 -1
  13. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/.github/workflows/build.yml +0 -0
  14. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/.github/workflows/doc-changes.yml +0 -0
  15. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/.gitignore +0 -0
  16. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/.pre-commit-config.yaml +0 -0
  17. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/LICENSE +0 -0
  18. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/README.md +0 -0
  19. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/changelog.md +0 -0
  20. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/01-init-local-instance.ipynb +0 -0
  21. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/02-connect-local-instance.ipynb +0 -0
  22. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/03-add-managed-storage.ipynb +0 -0
  23. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/04-test-bionty.ipynb +0 -0
  24. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/05-init-hosted-instance.ipynb +0 -0
  25. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/06-connect-hosted-instance.ipynb +0 -0
  26. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/07-keep-artifacts-local.ipynb +0 -0
  27. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/08-test-multi-session.ipynb +0 -0
  28. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-cloud/test_notebooks.py +0 -0
  29. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-cache-management.ipynb +0 -0
  30. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-cloud-sync.ipynb +0 -0
  31. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-connect-anonymously.ipynb +0 -0
  32. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-empty-init.ipynb +0 -0
  33. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-import-schema.ipynb +0 -0
  34. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-init-load-local-anonymously.ipynb +0 -0
  35. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-insufficient-user-info.ipynb +0 -0
  36. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-invalid-schema.ipynb +0 -0
  37. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test-sqlite-lock.ipynb +0 -0
  38. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/hub-prod/test_notebooks2.py +0 -0
  39. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/index.md +0 -0
  40. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/notebooks.md +0 -0
  41. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/docs/reference.md +0 -0
  42. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_cache.py +0 -0
  43. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_check.py +0 -0
  44. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_check_setup.py +0 -0
  45. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_connect_instance.py +0 -0
  46. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_delete.py +0 -0
  47. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_disconnect.py +0 -0
  48. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_django.py +0 -0
  49. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_entry_points.py +0 -0
  50. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_exportdb.py +0 -0
  51. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_importdb.py +0 -0
  52. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_init_instance.py +0 -0
  53. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_register_instance.py +0 -0
  54. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_schema.py +0 -0
  55. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_schema_metadata.py +0 -0
  56. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_set_managed_storage.py +0 -0
  57. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_setup_user.py +0 -0
  58. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/_silence_loggers.py +0 -0
  59. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/__init__.py +0 -0
  60. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_aws_storage.py +0 -0
  61. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_deprecated.py +0 -0
  62. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_docs.py +0 -0
  63. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_hub_crud.py +0 -0
  64. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_hub_utils.py +0 -0
  65. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_private_django_api.py +0 -0
  66. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_settings_load.py +0 -0
  67. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_settings_save.py +0 -0
  68. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_settings_storage.py +0 -0
  69. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_settings_store.py +0 -0
  70. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_settings_user.py +0 -0
  71. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/_setup_bionty_sources.py +0 -0
  72. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/cloud_sqlite_locker.py +0 -0
  73. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/exceptions.py +0 -0
  74. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/hashing.py +0 -0
  75. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/core/types.py +0 -0
  76. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/errors.py +0 -0
  77. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/py.typed +0 -0
  78. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/lamindb_setup/types.py +0 -0
  79. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/noxfile.py +0 -0
  80. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/pyproject.toml +0 -0
  81. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/scripts/script-init-pass-user-no-writes.py +0 -0
  82. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/scripts/script-to-fail-managed-storage.py +0 -0
  83. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_connect_instance.py +0 -0
  84. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_delete_instance.py +0 -0
  85. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_edge_request.py +0 -0
  86. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_fail_managed_storage.py +0 -0
  87. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_init_instance.py +0 -0
  88. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_init_pass_user_no_writes.py +0 -0
  89. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_login.py +0 -0
  90. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_migrate.py +0 -0
  91. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-cloud/test_set_storage.py +0 -0
  92. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-local/conftest.py +0 -0
  93. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-local/test_update_schema_in_hub.py +0 -0
  94. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-prod/conftest.py +0 -0
  95. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-prod/test_aws_options_manager.py +0 -0
  96. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-prod/test_django.py +0 -0
  97. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-prod/test_global_settings.py +0 -0
  98. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-prod/test_switch_and_fallback_env.py +0 -0
  99. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/hub-prod/test_upath.py +0 -0
  100. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/storage/test_entry_point.py +0 -0
  101. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/storage/test_hashing.py +0 -0
  102. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/storage/test_storage_access.py +0 -0
  103. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/storage/test_storage_basis.py +0 -0
  104. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/storage/test_storage_settings.py +0 -0
  105. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/tests/storage/test_storage_stats.py +0 -0
  106. {lamindb_setup-1.8.3 → lamindb_setup-1.9.0}/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.8.3
3
+ Version: 1.9.0
4
4
  Summary: Setup & configure LaminDB.
5
5
  Author-email: Lamin Labs <open-source@lamin.ai>
6
6
  Requires-Python: >=3.10
@@ -35,7 +35,7 @@ Modules & settings:
35
35
 
36
36
  """
37
37
 
38
- __version__ = "1.8.3" # denote a release candidate for 0.1.0 with 0.1rc1
38
+ __version__ = "1.9.0" # denote a release candidate for 0.1.0 with 0.1rc1
39
39
 
40
40
  import os
41
41
 
@@ -86,7 +86,7 @@ class migrate:
86
86
 
87
87
  @classmethod
88
88
  @disable_auto_connect
89
- def deploy(cls) -> None:
89
+ def deploy(cls, package_name: str | None = None, number: int | None = None) -> None:
90
90
  """Deploy a migration."""
91
91
  from ._schema_metadata import update_schema_in_hub
92
92
 
@@ -116,7 +116,14 @@ class migrate:
116
116
  import lamindb
117
117
 
118
118
  # this sets up django and deploys the migrations
119
- setup_django(settings.instance, deploy_migrations=True)
119
+ if package_name is not None and number is not None:
120
+ setup_django(
121
+ settings.instance,
122
+ deploy_migrations=True,
123
+ appname_number=(package_name, number),
124
+ )
125
+ else:
126
+ setup_django(settings.instance, deploy_migrations=True)
120
127
  # this populates the hub
121
128
  if settings.instance.is_on_hub:
122
129
  logger.important(f"updating lamindb version in hub: {lamindb.__version__}")
@@ -22,7 +22,7 @@ else:
22
22
  HOSTED_BUCKETS = ("s3://lamin-hosted-test",) # type: ignore
23
23
 
24
24
 
25
- def _keep_trailing_slash(path_str: str):
25
+ def _keep_trailing_slash(path_str: str) -> str:
26
26
  return path_str if path_str[-1] == "/" else path_str + "/"
27
27
 
28
28
 
@@ -54,6 +54,7 @@ class AWSOptionsManager:
54
54
 
55
55
  def __init__(self):
56
56
  self._credentials_cache = {}
57
+ self._parameters_cache = {} # this is not refreshed
57
58
 
58
59
  from s3fs import S3FileSystem
59
60
 
@@ -106,7 +107,9 @@ class AWSOptionsManager:
106
107
  def _get_cached_credentials(self, root: str) -> dict:
107
108
  return self._credentials_cache[root]["credentials"]
108
109
 
109
- def _path_inject_options(self, path: UPath, credentials: dict) -> UPath:
110
+ def _path_inject_options(
111
+ self, path: UPath, credentials: dict, extra_parameters: dict | None = None
112
+ ) -> UPath:
110
113
  if credentials == {}:
111
114
  # credentials were specified manually for the path
112
115
  if "anon" in path.storage_options:
@@ -137,6 +140,9 @@ class AWSOptionsManager:
137
140
  "version_aware", False
138
141
  )
139
142
 
143
+ if extra_parameters:
144
+ connection_options.update(extra_parameters)
145
+
140
146
  return UPath(path, **connection_options)
141
147
 
142
148
  def enrich_path(self, path: UPath, access_token: str | None = None) -> UPath:
@@ -158,7 +164,7 @@ class AWSOptionsManager:
158
164
  if root is not None:
159
165
  set_cache = False
160
166
  credentials = self._get_cached_credentials(root)
161
-
167
+ extra_parameters = self._parameters_cache.get(root)
162
168
  if access_token is not None:
163
169
  set_cache = True
164
170
  elif credentials != {}:
@@ -177,8 +183,10 @@ class AWSOptionsManager:
177
183
  is_managed = accessibility.get("is_managed", False)
178
184
  if is_managed:
179
185
  credentials = storage_root_info["credentials"]
186
+ extra_parameters = accessibility["extra_parameters"]
180
187
  else:
181
188
  credentials = {}
189
+ extra_parameters = None
182
190
 
183
191
  if access_token is None:
184
192
  if "storage_root" in accessibility:
@@ -194,9 +202,13 @@ class AWSOptionsManager:
194
202
  # write the bucket for everything else
195
203
  root = path.drive
196
204
  root = "s3://" + root
197
- self._set_cached_credentials(_keep_trailing_slash(root), credentials)
198
205
 
199
- return self._path_inject_options(path, credentials)
206
+ root = _keep_trailing_slash(root)
207
+ assert isinstance(root, str)
208
+ self._set_cached_credentials(root, credentials)
209
+ self._parameters_cache[root] = extra_parameters
210
+
211
+ return self._path_inject_options(path, credentials, extra_parameters)
200
212
 
201
213
 
202
214
  _aws_options_manager: AWSOptionsManager | None = None
@@ -124,6 +124,11 @@ def get_access_token(
124
124
  }
125
125
  )
126
126
  return auth_response.session.access_token
127
+ except Exception as e:
128
+ # we need to log the problem here because the exception is usually caught outside
129
+ # in call_with_fallback_auth
130
+ logger.warning(f"failed to update your lamindb access token: {e}")
131
+ raise e
127
132
  finally:
128
133
  hub.auth.sign_out(options={"scope": "local"})
129
134
 
@@ -487,6 +487,8 @@ def _access_aws(*, storage_root: str, client: Client) -> dict[str, dict]:
487
487
  accessibility = storage_root_info["accessibility"]
488
488
  accessibility["storage_root"] = loaded_accessibility["storageRoot"]
489
489
  accessibility["is_managed"] = loaded_accessibility["isManaged"]
490
+ accessibility["extra_parameters"] = loaded_accessibility.get("extraParameters")
491
+
490
492
  return storage_root_info
491
493
 
492
494
 
@@ -60,6 +60,9 @@ class SetupSettings:
60
60
 
61
61
  _cache_dir: Path | None = None
62
62
 
63
+ _branch = None # do not have types here
64
+ _space = None # do not have types here
65
+
63
66
  @property
64
67
  def _instance_settings_path(self) -> Path:
65
68
  return current_instance_settings_file()
@@ -112,12 +115,16 @@ class SetupSettings:
112
115
  return idlike, name
113
116
 
114
117
  @property
118
+ # TODO: refactor so that it returns a BranchMock object
119
+ # and we never need a DB request
115
120
  def branch(self) -> Branch:
116
121
  """Default branch."""
117
- from lamindb import Branch
122
+ if self._branch is None:
123
+ from lamindb import Branch
118
124
 
119
- idlike, _ = self._read_branch_idlike_name()
120
- return Branch.get(idlike)
125
+ idlike, _ = self._read_branch_idlike_name()
126
+ self._branch = Branch.get(idlike)
127
+ return self._branch
121
128
 
122
129
  @branch.setter
123
130
  def branch(self, value: str | Branch) -> None:
@@ -136,6 +143,7 @@ class SetupSettings:
136
143
  # we are sure that the current instance is setup because
137
144
  # it will error on lamindb import otherwise
138
145
  self._branch_path.write_text(f"{branch_record.uid}\n{branch_record.name}")
146
+ self._branch = branch_record
139
147
 
140
148
  @property
141
149
  def _space_path(self) -> Path:
@@ -156,12 +164,16 @@ class SetupSettings:
156
164
  return idlike, name
157
165
 
158
166
  @property
167
+ # TODO: refactor so that it returns a BranchMock object
168
+ # and we never need a DB request
159
169
  def space(self) -> Space:
160
170
  """Default space."""
161
- from lamindb import Space
171
+ if self._space is None:
172
+ from lamindb import Space
162
173
 
163
- idlike, _ = self._read_space_idlike_name()
164
- return Space.get(idlike)
174
+ idlike, _ = self._read_space_idlike_name()
175
+ self._space = Space.get(idlike)
176
+ return self._space
165
177
 
166
178
  @space.setter
167
179
  def space(self, value: str | Space) -> None:
@@ -180,6 +192,7 @@ class SetupSettings:
180
192
  # we are sure that the current instance is setup because
181
193
  # it will error on lamindb import otherwise
182
194
  self._space_path.write_text(f"{space_record.uid}\n{space_record.name}")
195
+ self._space = space_record
183
196
 
184
197
  @property
185
198
  def is_connected(self) -> bool:
@@ -186,9 +186,10 @@ class InstanceSettings:
186
186
  )
187
187
  legacy_filepath.rename(marker_path)
188
188
  else:
189
- raise ValueError(
189
+ logger.warning(
190
190
  f"local storage location '{root_path}' is corrupted, cannot find marker file with storage uid"
191
191
  )
192
+ continue
192
193
  try:
193
194
  uid = marker_path.read_text().splitlines()[0]
194
195
  except PermissionError:
@@ -148,6 +148,7 @@ def setup_django(
148
148
  configure_only: bool = False,
149
149
  init: bool = False,
150
150
  view_schema: bool = False,
151
+ appname_number: tuple[str, int] | None = None,
151
152
  ):
152
153
  if IS_RUN_FROM_IPYTHON:
153
154
  os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"
@@ -235,7 +236,11 @@ def setup_django(
235
236
  return None
236
237
 
237
238
  if deploy_migrations:
238
- call_command("migrate", verbosity=2)
239
+ if appname_number is None:
240
+ call_command("migrate", verbosity=2)
241
+ else:
242
+ app_name, app_number = appname_number
243
+ call_command("migrate", app_name, app_number, verbosity=2)
239
244
  isettings._update_cloud_sqlite_file(unlock_cloud_sqlite=False)
240
245
  elif init:
241
246
  global IS_MIGRATING
@@ -393,8 +393,10 @@ def synchronize_to(
393
393
  """Sync to a local destination path."""
394
394
  destination = destination.resolve()
395
395
  protocol = origin.protocol
396
+ stat_kwargs = {"expand_info": True} if protocol == "hf" else {}
397
+ origin_str = str(origin)
396
398
  try:
397
- cloud_info = origin.stat().as_info()
399
+ cloud_info = origin.fs.stat(origin_str, **stat_kwargs)
398
400
  exists = True
399
401
  is_dir = cloud_info["type"] == "directory"
400
402
  except FileNotFoundError:
@@ -441,7 +443,9 @@ def synchronize_to(
441
443
  if is_dir:
442
444
  cloud_stats = {
443
445
  file: get_modified(stat)
444
- for file, stat in origin.fs.find(origin.as_posix(), detail=True).items()
446
+ for file, stat in origin.fs.find(
447
+ origin_str, detail=True, **stat_kwargs
448
+ ).items()
445
449
  }
446
450
  for cloud_path in cloud_stats:
447
451
  file_key = PurePosixPath(cloud_path).relative_to(origin.path).as_posix()
@@ -13,6 +13,15 @@ ln_setup.connect("instance_test__access_v2")
13
13
 
14
14
  isettings = ln_setup.settings.instance
15
15
 
16
+ # check extra parameters for s3 managed buckets
17
+ # this is populated by create_instance imported from laminhub
18
+ assert (
19
+ isettings.storage.root.storage_options["s3_additional_kwargs"][
20
+ "ServerSideEncryption"
21
+ ]
22
+ == "AES256"
23
+ )
24
+
16
25
  assert isettings._fine_grained_access
17
26
  assert isettings._db_permissions == "jwt"
18
27
  assert isettings._api_url is not None
@@ -182,7 +182,7 @@ def create_myinstance(create_testadmin1_session): # -> Dict
182
182
  def create_instance_fine_grained_access(create_testadmin1_session):
183
183
  client, _ = create_testadmin1_session
184
184
 
185
- instance = create_instance("instance_test", client=client)
185
+ instance = create_instance("instance_test", client=client, connect=False)
186
186
 
187
187
  yield instance
188
188
 
File without changes
File without changes
File without changes
File without changes