Skip to content

Commit

Permalink
Add missing help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JimMadge committed Nov 3, 2023
1 parent ac99832 commit 878573c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions data_safe_haven/commands/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

@context_command_group.command()
def show() -> None:
"""Show information about the selected context."""
settings = ContextSettings.from_file()

current_context_key = settings.selected
Expand All @@ -28,6 +29,7 @@ def show() -> None:

@context_command_group.command()
def available() -> None:
"""Show the available contexts."""
settings = ContextSettings.from_file()

current_context_key = settings.selected
Expand All @@ -43,6 +45,7 @@ def available() -> None:
def switch(
name: Annotated[str, typer.Argument(help="Name of the context to switch to.")]
) -> None:
"""Switch the context."""
settings = ContextSettings.from_file()
settings.selected = name
settings.write()
Expand Down Expand Up @@ -77,6 +80,7 @@ def add(
),
],
) -> None:
"""Add a new context."""
if default_config_file_path().exists():
settings = ContextSettings.from_file()
settings.add(
Expand Down Expand Up @@ -147,14 +151,15 @@ def update(
def remove(
key: Annotated[str, typer.Argument(help="Name of the context to add.")],
) -> None:
"""Remove the selected context."""
settings = ContextSettings.from_file()
settings.remove(key)
settings.write()


@context_command_group.command()
def create() -> None:
"""Create Data Safe Haven context infrastructure"""
"""Create Data Safe Haven context infrastructure."""
config = Config()
context = Context(config)
context.create()
Expand All @@ -163,7 +168,7 @@ def create() -> None:

@context_command_group.command()
def teardown() -> None:
"""Tear down Data Safe Haven context infrastructure"""
"""Tear down Data Safe Haven context infrastructure."""
config = Config()
context = Context(config)
context.teardown()

0 comments on commit 878573c

Please sign in to comment.