simplify the app using typer

This commit is contained in:
Matteo Rosati
2026-04-22 22:14:26 +02:00
parent 2dfaa68466
commit b52952a2eb
17 changed files with 334 additions and 505 deletions
+3 -4
View File
@@ -1,10 +1,9 @@
from __future__ import annotations
from chromy.command_inputs import AddDataInput
from chromy.utilities import ingest_file
def handle_add_data(command: AddDataInput) -> int:
records_added = ingest_file(command.collection, command.file)
print(f"Added {records_added} records to collection '{command.collection}'.")
def handle_add_data(collection: str, file: str) -> int:
records_added = ingest_file(collection, file)
print(f"Added {records_added} records to collection '{collection}'.")
return 0