-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
This tool should accept a single argument, a workspace ID or name.
If the argument is numeric (str.isdigit()), assume it is a workspace ID. Otherwise, assume it is a workspace name (or substring), and search for the (lowercased) name in the available workspaces.
Use user_config.update_workspace() to set the workspace.
https://github.com/latchbio/latch/blob/e0e83673bb418f03d6e221acb4ae7ae829d8f8e9/src/latch_cli/services/workspace.py#L42
Use latch.utils.get_workspaces() to get the available workspaces. (It returns a mapping of workspace IDs to workspace names)
https://github.com/latchbio/latch/blob/e0e83673bb418f03d6e221acb4ae7ae829d8f8e9/src/latch_cli/services/register/register.py#L385
If the provided argument is not an exact match for a workspace ID or a fuzzy match for a workspace name, raise an error.