chore: add migrate cli command

This commit is contained in:
Benjamin Labrecque
2026-07-14 10:09:19 +02:00
parent 13abb68f96
commit bedf91d849
3 changed files with 129 additions and 13 deletions
+25
View File
@@ -39,6 +39,31 @@ def add(
service_creator.add_service(name=name)
# TODO: remove
@service.command(no_args_is_help=True)
def migrate(
name: str = typer.Option(..., "--name", "-n"),
user: str = typer.Option(..., "--user", "-u"),
ioc_description: str = typer.Option(
..., "--ioc-description", "-d", help="See <repo-root>/docs/ioc/ioc_overview.md for examples"
),
ui_filename: str = typer.Option(
...,
"--ui-filename",
"-f",
help="The <ui-filename> in 'A_BD_<ui-filename>.ui'; See <repo-root>/qt/A_BD_ServiceManager.ui for examples",
),
):
init_logging()
service_creator = ServiceCreator(
user=user, # TODO: read from 'whoami'?
ioc_description=ioc_description,
ui_name="",
ui_filename=ui_filename, # TODO: make this standard?
)
service_creator.add_service(name=name)
@service.command(no_args_is_help=True)
def list():
registry = ServiceRegistry.read_from_config()