Last minutes enhancements (#4885)

* Remove tab, fix overwrite, transpose exports

* missed some

* eodhd transpose
This commit is contained in:
James Maslek
2023-04-24 19:04:21 -04:00
committed by GitHub
parent f589a037dc
commit 8ce8380ef3
8 changed files with 15 additions and 28 deletions

View File

@@ -77,7 +77,6 @@ class FeatureFlagsController(BaseController):
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)
@@ -95,7 +94,7 @@ class FeatureFlagsController(BaseController):
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, _):
@@ -110,13 +109,6 @@ class FeatureFlagsController(BaseController):
"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"""

View File

@@ -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

View File

@@ -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,
)
@@ -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,
)
@@ -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,
)
@@ -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,
)

View File

@@ -141,7 +141,7 @@ def display_fundamentals(
export,
os.path.dirname(os.path.abspath(__file__)),
statement,
fundamentals,
fundamentals.transpose(),
sheet_name,
fig,
)

View File

@@ -241,7 +241,7 @@ def display_discounted_cash_flow(
export,
os.path.dirname(os.path.abspath(__file__)),
"dcf",
dcf,
dcf.transpose(),
sheet_name,
)
@@ -345,7 +345,7 @@ def display_income_statement(
export,
os.path.dirname(os.path.abspath(__file__)),
"income",
income,
income.transpose(),
sheet_name,
fig,
)
@@ -449,7 +449,7 @@ def display_balance_sheet(
export,
os.path.dirname(os.path.abspath(__file__)),
"balance",
balance,
balance.transpose(),
sheet_name,
fig,
)
@@ -553,7 +553,7 @@ def display_cash_flow(
export,
os.path.dirname(os.path.abspath(__file__)),
"cash",
cash,
cash.transpose(),
sheet_name,
fig,
)
@@ -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:
@@ -650,7 +650,7 @@ def display_financial_ratios(
export,
os.path.dirname(os.path.abspath(__file__)),
"grratiosowth",
ratios,
ratios.transpose(),
sheet_name,
)
else:
@@ -697,7 +697,7 @@ def display_financial_statement_growth(
export,
os.path.dirname(os.path.abspath(__file__)),
"growth",
growth,
growth.transpose(),
sheet_name,
)
else:

View File

@@ -131,7 +131,7 @@ def display_fundamentals(
export,
os.path.dirname(os.path.abspath(__file__)),
statement,
fundamentals,
fundamentals.transpose(),
sheet_name,
fig,
)

View File

@@ -459,7 +459,7 @@ def display_fundamentals(
export,
os.path.dirname(os.path.abspath(__file__)),
statement,
fundamentals,
fundamentals.transpose(),
sheet_name,
fig,
)

View File

@@ -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)