Skip to content

Commit

Permalink
missing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zainhoda committed Jul 19, 2023
1 parent 6c83b13 commit c24961f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/vanna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def add_user_to_dataset(dataset: str, email: str, is_admin: bool) -> bool:
Args:
dataset (str): The name of the dataset to add the user to.
email (str): The email address of the user to add.
is_admin (bool): Whether or not the user should be an admin.
Returns:
bool: True if the user was added successfully, False otherwise.
Expand Down Expand Up @@ -258,14 +259,14 @@ def _set_org(org: str) -> None:
d = __unauthenticated_rpc_call(method="check_org_exists", params=[Organization(name=org, user=None, connection=None)])

if 'result' not in d:
raise Exception("Failed to check if organization exists")
raise Exception("Failed to check if dataset exists")

status = Status(**d['result'])

if status.success:
raise Exception(f"An organization with the name {org} already exists")

create = input(f"Would you like to create organization '{org}'? (y/n): ")
create = input(f"Would you like to create dataset '{org}'? (y/n): ")

if create.lower() == 'y':
db_type = input("What type of database would you like to use? (Snowflake, BigQuery, Postgres, etc.): ")
Expand All @@ -274,7 +275,7 @@ def _set_org(org: str) -> None:
__org = org
else:
__org = None
raise Exception("Failed to create organization")
raise Exception("Failed to create dataset")
else:
__org = org

Expand Down

0 comments on commit c24961f

Please sign in to comment.