mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-06 09:22:26 +00:00
revert changes to files
This commit is contained in:
@@ -21,15 +21,8 @@ from openbb_terminal.rich_config import console
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
BASE_DIR = (
|
||||
pathlib.Path(__file__).parent.parent.parent.parent.parent
|
||||
/ "openbb_terminal"
|
||||
/ "economy"
|
||||
/ "datasets"
|
||||
)
|
||||
|
||||
harmonized_cpi_path = BASE_DIR / "harmonized_cpi.csv"
|
||||
cpi_path = BASE_DIR / "cpi.csv"
|
||||
harmonized_cpi_path = pathlib.Path(__file__).parent / "datasets" / "harmonized_cpi.csv"
|
||||
cpi_path = pathlib.Path(__file__).parent / "datasets" / "cpi.csv"
|
||||
|
||||
CPI_COUNTRIES = [
|
||||
"australia",
|
||||
|
||||
1
openbb_terminal/miscellaneous/i18n/en.yml
vendored
1
openbb_terminal/miscellaneous/i18n/en.yml
vendored
@@ -111,7 +111,6 @@ en:
|
||||
economy: global macroeconomic data, e.g. futures, yield, treasury
|
||||
forex: foreign exchanges, quotes, forward rates for currency pairs and oanda integration
|
||||
funds: mutual funds search, overview, holdings and sector weights
|
||||
poc_plat_equity: poc for platform's equity router
|
||||
futures: commodities, bonds, index, bitcoin and forex
|
||||
futures/search: search for a future based on category or exchange
|
||||
futures/historical: get historical timeseries
|
||||
|
||||
@@ -9,9 +9,7 @@ from datetime import datetime, timedelta
|
||||
from typing import List, Optional
|
||||
|
||||
import financedatabase as fd
|
||||
from openbb import obb
|
||||
|
||||
from argparse_translator.argparse_class_processor import ArgparseClassProcessor
|
||||
from openbb_terminal import config_terminal
|
||||
from openbb_terminal.common import (
|
||||
feedparser_view,
|
||||
@@ -39,9 +37,6 @@ from openbb_terminal.terminal_helper import suppress_stdout
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
equity_price_translations = ArgparseClassProcessor(target_class=obb.equity.price)
|
||||
|
||||
|
||||
class StocksController(StockBaseController):
|
||||
"""Stocks Controller class."""
|
||||
|
||||
@@ -156,32 +151,6 @@ class StocksController(StockBaseController):
|
||||
with suppress_stdout():
|
||||
self.call_load(other_args)
|
||||
|
||||
def call_load(self, other_args: List[str]):
|
||||
"""Process load command."""
|
||||
translator = equity_price_translations.get_translator(
|
||||
command="equity_price_historical"
|
||||
)
|
||||
parser = translator.parser
|
||||
|
||||
if ns_parser := self.parse_known_args_and_warn(parser, other_args):
|
||||
try:
|
||||
obbject = translator.execute_func(parsed_args=ns_parser)
|
||||
self.ticker = ns_parser.symbol
|
||||
self.stock = obbject.to_dataframe()
|
||||
|
||||
# TODO : temporary workaround
|
||||
# core gives all columns lower case and terminal expects 1st letter upper case
|
||||
# upper case first letter of all columns
|
||||
self.stock.columns = [
|
||||
x[0].upper() + x[1:] for x in self.stock.columns.tolist()
|
||||
]
|
||||
if hasattr(ns_parser, "chart") and ns_parser.chart:
|
||||
obbject.show()
|
||||
|
||||
except Exception as e:
|
||||
console.print(f"[red]{e}[/]\n")
|
||||
return
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def call_search(self, other_args: List[str]):
|
||||
"""Process search command."""
|
||||
|
||||
Reference in New Issue
Block a user