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
#
available_subcommands()
cached
#
Get the top-level commands that can run in this environment.
A command with requires set is only available if that package is installed.
Source code in packages/climate-ref/src/climate_ref/cli/__init__.py
build_app()
#
Build the CLI app
The subcommands are registered lazily by the root group, see available_subcommands.
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=None, 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 |
|---|---|
| _config_access | Helpers for reading and updating dotted configuration keys. |
| _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 |
| diagnostics | View diagnostic metadata |
| doctor | Check a deployment for problems that a solve would otherwise hide. |
| executions | View execution groups and their results |
| providers | Manage the REF providers. |
| solve | |
| test_cases | Test management commands for diagnostic development. |