lamin_cli 1.5.3__py2.py3-none-any.whl → 1.5.5__py2.py3-none-any.whl

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.
lamin_cli/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Lamin CLI."""
2
2
 
3
- __version__ = "1.5.3"
3
+ __version__ = "1.5.5"
lamin_cli/__main__.py CHANGED
@@ -289,24 +289,32 @@ def info(schema: bool):
289
289
  @main.command()
290
290
  @click.argument("entity", type=str)
291
291
  @click.option("--name", type=str, default=None)
292
+ @click.option("--uid", type=str, default=None)
292
293
  @click.option("--slug", type=str, default=None)
293
294
  @click.option("--force", is_flag=True, default=False, help="Do not ask for confirmation (only relevant for instance).")
294
295
  # fmt: on
295
- def delete(entity: str, name: str | None = None, slug: str | None = None, force: bool = False):
296
+ def delete(entity: str, name: str | None = None, uid: str | None = None, slug: str | None = None, force: bool = False):
296
297
  """Delete an entity.
297
298
 
298
- Currently supported: `branch` and `instance`.
299
+ Currently supported: `branch`, `artifact`, and `instance`.
299
300
 
300
301
  ```
301
302
  lamin delete instance --slug account/name
302
303
  lamin delete branch --name my_branch
303
304
  ```
304
305
  """
305
- from lamindb import Branch
306
306
  from lamindb_setup._delete import delete
307
307
 
308
308
  if entity == "branch":
309
+ assert name is not None, "You have to pass a name for deleting a branch."
310
+ from lamindb import Branch
311
+
309
312
  Branch.get(name=name).delete()
313
+ elif entity == "artifact":
314
+ assert uid is not None, "You have to pass a uid for deleting an artifact."
315
+ from lamindb import Artifact
316
+
317
+ Artifact.get(uid).delete()
310
318
  elif entity == "instance":
311
319
  return delete(slug, force=force)
312
320
  else: # backwars compatibility
lamin_cli/_save.py CHANGED
@@ -145,7 +145,7 @@ def save_from_path_cli(
145
145
  artifact.save()
146
146
  logger.important(f"saved: {artifact}")
147
147
  logger.important(f"storage path: {artifact.path}")
148
- if ln_setup.settings.storage.type == "s3":
148
+ if artifact.storage.type == "s3":
149
149
  logger.important(f"storage url: {artifact.path.to_url()}")
150
150
  if project is not None:
151
151
  artifact.projects.add(project_record)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lamin_cli
3
- Version: 1.5.3
3
+ Version: 1.5.5
4
4
  Summary: Lamin CLI.
5
5
  Author-email: Lamin Labs <open-source@lamin.ai>
6
6
  Description-Content-Type: text/markdown
@@ -1,14 +1,14 @@
1
- lamin_cli/__init__.py,sha256=LBeGwsZuICY7sdEYZSugLgtHOU3Wh7heajX7B22wO3I,40
2
- lamin_cli/__main__.py,sha256=1hYODyzurDvq198STsIZ2slp_t_xq_c7QS0oyts33PA,15528
1
+ lamin_cli/__init__.py,sha256=TjqhH_7HYqV7eEmqmrHxIzQ-nXehrr75pFeHCnGQCxY,40
2
+ lamin_cli/__main__.py,sha256=BO_vUmKhOF3WHBXze70rmHt-obCsgRhNYtT_-rGuH4Y,15886
3
3
  lamin_cli/_cache.py,sha256=oplwE8AcS_9PYptQUZxff2qTIdNFS81clGPkJNWk098,800
4
4
  lamin_cli/_load.py,sha256=QqiFxGYmvFz2RjhvwKO5r1fmPWMZ5Ai4y1pJytdYKak,8301
5
5
  lamin_cli/_migration.py,sha256=xQi6mwnpBzY5wcv1-TJhveD7a3XJIlpiYx6Z3AJ1NF0,1063
6
- lamin_cli/_save.py,sha256=W4sNGXGFWy9ilFozVYbmxROCD8kkD0jDBB51cTLgZWA,10769
6
+ lamin_cli/_save.py,sha256=AdghV9arOEANqkT-5hrhBEanoVrOlQKhejlzPJLoUes,10760
7
7
  lamin_cli/_settings.py,sha256=O2tecCf5EIZu98ima4DTJujo4KuywckOLgw8c-Ke3dY,1142
8
8
  lamin_cli/compute/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  lamin_cli/compute/modal.py,sha256=QnR7GyyvWWWkLnou95HxS9xxSQfw1k-SiefM_qRVnU0,6010
10
- lamin_cli-1.5.3.dist-info/entry_points.txt,sha256=Qms85i9cZPlu-U7RnVZhFsF7vJ9gaLZUFkCjcGcXTpg,49
11
- lamin_cli-1.5.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
- lamin_cli-1.5.3.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
13
- lamin_cli-1.5.3.dist-info/METADATA,sha256=nKdmSG7KwhZG3c1l_G8FkROI9xFdy_zdwmg6leWo7_Q,337
14
- lamin_cli-1.5.3.dist-info/RECORD,,
10
+ lamin_cli-1.5.5.dist-info/entry_points.txt,sha256=Qms85i9cZPlu-U7RnVZhFsF7vJ9gaLZUFkCjcGcXTpg,49
11
+ lamin_cli-1.5.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
+ lamin_cli-1.5.5.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
13
+ lamin_cli-1.5.5.dist-info/METADATA,sha256=3CxozXOIRc1FFUzD1letgB9-nXa92fbLN5qmnpEg0n4,337
14
+ lamin_cli-1.5.5.dist-info/RECORD,,