From ba59b1618f6453542b648dfd5e896e3706cc24d9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 19 Aug 2024 17:50:34 +0200 Subject: [PATCH] docstring/spcd/init --- spcd/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spcd/__init__.py b/spcd/__init__.py index 0c43601..5028389 100644 --- a/spcd/__init__.py +++ b/spcd/__init__.py @@ -19,6 +19,7 @@ COMMANDS_PREFIX = "spcd-" def clone_project_branch() -> None: + """Clone project on triggering branch into the current workspace.""" if not projects.environment.get("GITLAB_CI"): step("Clone project branch") log.info(projects) @@ -41,6 +42,7 @@ def clone_project_branch() -> None: def install_commands(path: str) -> None: + """Make commands callable in the operating system.""" step("Install commands") user = Path("/usr/local/bin") for command in [ @@ -54,6 +56,7 @@ def install_commands(path: str) -> None: def install_python_packages() -> None: + """Upgrade pip then install extra Python packages.""" step("Install Python packages") log.info("pip") run("pip", "install", "--upgrade", "pip") @@ -74,6 +77,7 @@ def install_python_packages() -> None: def list_environment_variables() -> None: + """List accessible variables and their public contents.""" step("List environment variables") for variable, value in sorted(projects.environment.items()): if variable not in ["SPCD", "SPCD_SSH_KEY"]: @@ -100,6 +104,7 @@ def main(main: str) -> None: def set_ssh() -> None: + """Set things up to enable access to targets through SSH.""" step("Set SSH") # get variables ssh_hosts = projects.environment.get("SPCD_SSH_HOSTS")