Skip to content

Commit

Permalink
feat: extend cli create
Browse files Browse the repository at this point in the history
  • Loading branch information
almutlue committed Jan 22, 2024
1 parent d516aa5 commit 3799626
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
get_slot_range,
load_schema,
)
from .io import parse_instances
from .io import parse_instances, build_modo_from_file
from .storage import add_metadata_group, init_zarr


Expand Down Expand Up @@ -124,7 +124,8 @@ def create(
if from_file and meta:
raise ValueError("Only one of --from-file or --data can be used.")
elif from_file:
obj = parse_instances(from_file, target_class=model.MODO)
modo = build_modo_from_file(from_file)
return
elif meta:
obj = json_loader.loads(meta, target_class=model.MODO)
else:
Expand Down

0 comments on commit 3799626

Please sign in to comment.