Install LearnHouse: schema, default elements, organization, and admin user. Typer entry point — uses asyncio.run because no loop is running yet. Programmatic async callers (FastAPI lifespan, etc.) should await `_install_async` directly to keep the SQLAlchemy greenlet context.
(
short: Annotated[bool, typer.Option(help="Install with predefined values")] = False
)
| 44 | |
| 45 | @cli.command() |
| 46 | def install( |
| 47 | short: Annotated[bool, typer.Option(help="Install with predefined values")] = False |
| 48 | ): |
| 49 | """Install LearnHouse: schema, default elements, organization, and admin user. |
| 50 | |
| 51 | Typer entry point — uses asyncio.run because no loop is running yet. |
| 52 | Programmatic async callers (FastAPI lifespan, etc.) should await |
| 53 | `_install_async` directly to keep the SQLAlchemy greenlet context. |
| 54 | """ |
| 55 | asyncio.run(_install_async(short)) |
| 56 | |
| 57 | |
| 58 | async def _install_async(short: bool) -> None: |
nothing calls this directly
no test coverage detected