Command Line¶
The cli
package contains the implementation for the command line interface.
We use click to build the command line. See https://click.palletsprojects.com/en/7.x/ for documentation.
The commands
module contains the root click group as well as functions
shared by commands.
Note
As most of these commands are extremely thin wrappers, we do not have any tests for them. This may change in the future if the CLI commands become more complex.
-
src.cli.commands.
commands
()¶ The root click group that all commands derive from. This is the group invoked in
__main__
.
-
src.cli.commands.
migrate
(func)¶ A decorator to run initial migrations before the command is run.
This function:
Runs database migrations.
Updates the configuration if it is outdated.
This must be applied before the click
command
decorator.- Return type
typing.Callable
A decorator to add some shared click options to every command. Currently, the
--log-level
option is implemented by this decorator.This must be applied before the click
command
decorator.- Return type
typing.Callable