climate_ref.cli
#
Entrypoint for the CLI
CLIContext
#
Context object that can be passed to commands.
The database is created lazily on first access to avoid running migrations and creating backups for commands that don't need the database.
Source code in packages/climate-ref/src/climate_ref/cli/__init__.py
database
property
#
Get the database instance, creating it lazily if needed.
The database is created on first access, which triggers migrations. Backup creation is skipped for read-only commands to reduce overhead.
database_unmigrated
property
#
Get a database instance without running migrations.
Used by db subcommands that inspect or manage migration state directly.
close()
#
Close the database connection if it was opened.
LogLevel
#
build_app()
#
Build the CLI app
This registers all the commands and subcommands of the CLI app.
Some commands may not be available if certain dependencies are not installed,
for example the Celery CLI is only available if the climate-ref-celery package is installed.
Returns:
| Type | Description |
|---|---|
Typer
|
The CLI app |
Source code in packages/climate-ref/src/climate_ref/cli/__init__.py
main(ctx, configuration_directory=None, verbose=False, quiet=False, log_level=LogLevel.Info, version=None)
#
A CLI for the Assessment Fast Track Rapid Evaluation Framework
This CLI provides a number of commands for managing and executing diagnostics.
Source code in packages/climate-ref/src/climate_ref/cli/__init__.py
sub-packages#
| Sub-package | Description |
|---|---|
| _git_utils | Git utilities for CLI commands. |
| _utils | |
| config | View and update the REF configuration |
| datasets | View and ingest input datasets |
| db | Database management commands |
| executions | View execution groups and their results |
| providers | Manage the REF providers. |
| solve | |
| test_cases | Test data management commands for diagnostic development. |