Skip to content

Commit

Permalink
Revert "sdk generation tests, trailmap fixes"
Browse files Browse the repository at this point in the history
This reverts commit 2575784.
  • Loading branch information
tehcoderer committed Mar 18, 2023
1 parent 2575784 commit 5cb0ce0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
16 changes: 6 additions & 10 deletions generate_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def build(self) -> None:
subprocess.check_call(["black", "openbb_terminal"]) # nosec: B603, B607


def generate_sdk(sort: bool = False) -> bool:
def generate_sdk(sort: bool = False) -> None:
"""Generate the SDK.
Parameters
Expand All @@ -544,15 +544,11 @@ def generate_sdk(sort: bool = False) -> bool:
Whether to sort the CSVs, by default False
"""
trailmaps = get_trailmaps(sort)
try:
console.print("[yellow]Generating SDK...[/]")
BuildCategoryModelClasses(trailmaps).build()
console.print("[green]SDK Generated Successfully.[/]")
except Exception as e:
console.print(f"[red]Error generating SDK: {e}[/]")
return False

return True

console.print("[yellow]Generating SDK...[/]")
BuildCategoryModelClasses(trailmaps).build()
console.print("[green]SDK Generated Successfully.[/]")
return


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion openbb_terminal/core/sdk/sdk_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def get_sdk_imports_text() -> str:
cfg.start_plot_backend()
logger = logging.getLogger(__name__)
cfg.theme.applyMPLstyle()
theme.applyMPLstyle()
\r\r\r
"""
return "\r".join(sdk_imports.splitlines())
1 change: 1 addition & 0 deletions openbb_terminal/core/sdk/trail_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ keys.messari,keys_model.set_messari_key,
keys.mykeys,keys_model.get_keys,
keys.news,keys_model.set_news_key,
keys.oanda,keys_model.set_oanda_key,
keys.openbb,keys_model.set_openbb_personal_access_token,
keys.polygon,keys_model.set_polygon_key,
keys.quandl,keys_model.set_quandl_key,
keys.reddit,keys_model.set_reddit_key,
Expand Down
1 change: 0 additions & 1 deletion openbb_terminal/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
cfg.start_plot_backend()

logger = logging.getLogger(__name__)
cfg.theme.applyMPLstyle()


class OpenBBSDK:
Expand Down
6 changes: 0 additions & 6 deletions tests/test_generate_sdk.py

This file was deleted.

0 comments on commit 5cb0ce0

Please sign in to comment.