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

[GoEx] Added additional support for GoEx DBs and APIs. #698

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ dist
.editorconfig
.DS_Store
**/*.pyc
goex/goex-env/
goex/exec_engine/checkpoints/
goex/exec_engine/credentials/*
!goex/exec_engine/credentials/credentials_utils.py
!goex/exec_engine/credentials/supported.txt
goex/docker/*/requirements.txt
goex/docker/misc/images.json
goex-env/*

################## Berkley Function Call Leaderboard ##########################

Expand Down
5 changes: 3 additions & 2 deletions goex/authorizations/scripts/spotify_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import wsgiref.simple_server
import wsgiref.util
from urllib.parse import quote, urlparse, parse_qs
from .consts import AUTH_URL, CERT_FILE_PATH, KEY_FILE_PATH

from consts import AUTH_URL, CERT_FILE_PATH, KEY_FILE_PATH
print(CERT_FILE_PATH)
SPOTIFY_FOLDER_PATH = os.path.join(os.path.dirname(Path(os.path.realpath(__file__)).parent.parent), 'exec_engine/credentials/spotify')
TOKEN_FILE = os.path.join(SPOTIFY_FOLDER_PATH, 'token.pickle')

Expand All @@ -23,6 +23,7 @@ def main():
creds = pickle.load(token)
# If there are no (valid) credentials available, let the user log in
creds = run_spotify_flow()
print(creds)
# Save the credentials for the next run
if not os.path.isdir(SPOTIFY_FOLDER_PATH):
os.mkdir(SPOTIFY_FOLDER_PATH)
Expand Down
4 changes: 3 additions & 1 deletion goex/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from main import ExecutionEngine, PythonAPIExecutor

from exec_engine.utils import SQL_Type, Filesystem_Type
from exec_engine.db_manager import MySQLManager, SQLiteManager
from exec_engine.db_manager import MySQLManager, SQLiteManager, PostgreSQLManager
from dotenv import load_dotenv
import questionary

Expand Down Expand Up @@ -213,6 +213,8 @@ def db_callback(prompt, generate_mode):
db_manager = MySQLManager(config, docker_sandbox=engine.docker_sandbox)
elif db_type == 'sqlite':
db_manager = SQLiteManager(config, docker_sandbox=engine.docker_sandbox)
elif db_type == 'postgresql':
db_manager = PostgreSQLManager(config, docker_sandbox=engine.docker_sandbox)
except Exception as e:
print(f"Error during {db_type} Manager Init: {e}")
return
Expand Down
Loading