Skip to content

Commit

Permalink
Last minutes enhancements (#4885)
Browse files Browse the repository at this point in the history
* Remove tab, fix overwrite, transpose exports

* missed some

* eodhd transpose
  • Loading branch information
jmaslek authored Apr 24, 2023
1 parent f589a03 commit 8ce8380
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 28 deletions.
10 changes: 1 addition & 9 deletions openbb_terminal/featflags_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def print_help(self):
mt.add_info("_info_")
mt.add_raw("\n")
mt.add_setting("retryload", current_user.preferences.RETRY_WITH_LOAD)
mt.add_setting("tab", current_user.preferences.USE_TABULATE_DF)
mt.add_setting("interactive", current_user.preferences.USE_INTERACTIVE_DF)
mt.add_setting("cls", current_user.preferences.USE_CLEAR_AFTER_CMD)
mt.add_setting("promptkit", current_user.preferences.USE_PROMPT_TOOLKIT)
Expand All @@ -95,7 +94,7 @@ def print_help(self):
def call_overwrite(self, _):
"""Process overwrite command"""
set_and_save_preference(
"FILE_OVERWITE", not get_current_user().preferences.FILE_OVERWRITE
"FILE_OVERWRITE", not get_current_user().preferences.FILE_OVERWRITE
)

def call_version(self, _):
Expand All @@ -110,13 +109,6 @@ def call_retryload(self, _):
"RETRY_WITH_LOAD", not get_current_user().preferences.RETRY_WITH_LOAD
)

@log_start_end(log=logger)
def call_tab(self, _):
"""Process tab command"""
set_and_save_preference(
"USE_TABULATE_DF", not get_current_user().preferences.USE_TABULATE_DF
)

@log_start_end(log=logger)
def call_interactive(self, _):
"""Process interactive command"""
Expand Down
1 change: 0 additions & 1 deletion openbb_terminal/miscellaneous/i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ en:
sources/set: set default data source for a command
featflags/_info_: Feature flags through environment variables
featflags/retryload: retry misspelled commands with load first
featflags/tab: use tabulate to print dataframes
featflags/interactive: open dataframes in interactive window
featflags/cls: clear console after each command
featflags/color: use coloring features
Expand Down
8 changes: 4 additions & 4 deletions openbb_terminal/stocks/fundamental_analysis/av_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def display_key(symbol: str, export: str = "", sheet_name: Optional[str] = None)
export,
os.path.dirname(os.path.abspath(__file__)),
"key",
df_key,
df_key.transpose(),
sheet_name,
)

Expand Down Expand Up @@ -174,7 +174,7 @@ def display_income_statement(
export,
os.path.dirname(os.path.abspath(__file__)),
"income",
df_income,
df_income.transpose(),
sheet_name,
fig,
)
Expand Down Expand Up @@ -271,7 +271,7 @@ def display_balance_sheet(
export,
os.path.dirname(os.path.abspath(__file__)),
"balance",
df_balance,
df_balance.transpose(),
sheet_name,
fig,
)
Expand Down Expand Up @@ -366,7 +366,7 @@ def display_cash_flow(
export,
os.path.dirname(os.path.abspath(__file__)),
"cash",
df_cash,
df_cash.transpose(),
sheet_name,
fig,
)
Expand Down
2 changes: 1 addition & 1 deletion openbb_terminal/stocks/fundamental_analysis/eodhd_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def display_fundamentals(
export,
os.path.dirname(os.path.abspath(__file__)),
statement,
fundamentals,
fundamentals.transpose(),
sheet_name,
fig,
)
14 changes: 7 additions & 7 deletions openbb_terminal/stocks/fundamental_analysis/fmp_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def display_discounted_cash_flow(
export,
os.path.dirname(os.path.abspath(__file__)),
"dcf",
dcf,
dcf.transpose(),
sheet_name,
)

Expand Down Expand Up @@ -345,7 +345,7 @@ def display_income_statement(
export,
os.path.dirname(os.path.abspath(__file__)),
"income",
income,
income.transpose(),
sheet_name,
fig,
)
Expand Down Expand Up @@ -449,7 +449,7 @@ def display_balance_sheet(
export,
os.path.dirname(os.path.abspath(__file__)),
"balance",
balance,
balance.transpose(),
sheet_name,
fig,
)
Expand Down Expand Up @@ -553,7 +553,7 @@ def display_cash_flow(
export,
os.path.dirname(os.path.abspath(__file__)),
"cash",
cash,
cash.transpose(),
sheet_name,
fig,
)
Expand Down Expand Up @@ -602,7 +602,7 @@ def display_key_metrics(
export,
os.path.dirname(os.path.abspath(__file__)),
"metrics",
key_metrics,
key_metrics.transpose(),
sheet_name,
)
else:
Expand Down Expand Up @@ -650,7 +650,7 @@ def display_financial_ratios(
export,
os.path.dirname(os.path.abspath(__file__)),
"grratiosowth",
ratios,
ratios.transpose(),
sheet_name,
)
else:
Expand Down Expand Up @@ -697,7 +697,7 @@ def display_financial_statement_growth(
export,
os.path.dirname(os.path.abspath(__file__)),
"growth",
growth,
growth.transpose(),
sheet_name,
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def display_fundamentals(
export,
os.path.dirname(os.path.abspath(__file__)),
statement,
fundamentals,
fundamentals.transpose(),
sheet_name,
fig,
)
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def display_fundamentals(
export,
os.path.dirname(os.path.abspath(__file__)),
statement,
fundamentals,
fundamentals.transpose(),
sheet_name,
fig,
)
Expand Down
4 changes: 0 additions & 4 deletions tests/openbb_terminal/test_featflags_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ def test_print_help(controller):
controller.print_help()


def test_call_tab(controller):
controller.call_tab(None)


def test_call_cls(controller):
controller.call_cls(None)

Expand Down

0 comments on commit 8ce8380

Please sign in to comment.