Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set default verta workspace through environment variable #2351

Merged
merged 1 commit into from May 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/verta/verta/client.py
Expand Up @@ -120,6 +120,9 @@ def __init__(self, host=None, port=None, email=None, dev_key=None,
dev_key = os.environ['VERTA_DEV_KEY']
print("set developer key from environment")
dev_key = self._set_from_config_if_none(dev_key, "dev_key")
self._workspace = os.environ.get('VERTA_WORKSPACE')
if self._workspace is not None:
print("set workspace from environment")

if host is None:
raise ValueError("`host` must be provided")
Expand Down Expand Up @@ -184,7 +187,6 @@ def is_unauthorized(response): return response.status_code == 401
self._conf = _utils.Configuration(use_git, debug)

self._ctx = _Context(self._conn, self._conf)
self._workspace = None

@property
def proj(self):
Expand Down