From 595aa11a9202b8d88155727cab4e867a54bcf411 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 20 Feb 2024 12:36:32 +0000 Subject: [PATCH 1/3] create openbb assets folder --- .../openbb_core/app/static/package_builder.py | 42 ++++++++++-------- .../tests/app/static/test_package_builder.py | 44 ++++++++++--------- .../{package => assets}/extension_map.json | 0 .../{package => assets}/module_map.json | 0 4 files changed, 46 insertions(+), 40 deletions(-) rename openbb_platform/openbb/{package => assets}/extension_map.json (100%) rename openbb_platform/openbb/{package => assets}/module_map.json (100%) diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py index 52a16185467b..3caa6d319747 100644 --- a/openbb_platform/core/openbb_core/app/static/package_builder.py +++ b/openbb_platform/core/openbb_core/app/static/package_builder.py @@ -79,7 +79,9 @@ def __init__( def auto_build(self) -> None: """Trigger build if there are differences between built and installed extensions.""" if Env().AUTO_BUILD: - add, remove = PackageBuilder._diff(self.directory / "package") + add, remove = PackageBuilder._diff( + self.directory / "assets" / "extension_map.json" + ) if add: a = ", ".join(add) print(f"Extensions to add: {a}") # noqa: T201 @@ -98,7 +100,7 @@ def build( ) -> None: """Build the extensions for the Platform.""" self.console.log("\nBuilding extensions package...\n") - self._clean_package(modules) + self._clean(modules) ext_map = self._get_extension_map() self._save_extension_map(ext_map) self._save_module_map() @@ -107,8 +109,9 @@ def build( if self.lint: self._run_linters() - def _clean_package(self, modules: Optional[Union[str, List[str]]] = None) -> None: - """Delete the package folder or modules before building.""" + def _clean(self, modules: Optional[Union[str, List[str]]] = None) -> None: + """Delete the assets and package folder or modules before building.""" + shutil.rmtree(self.directory / "assets", ignore_errors=True) if modules: for module in modules: module_path = self.directory / "package" / f"{module}.py" @@ -141,7 +144,7 @@ def _save_extension_map(self, ext_map: Dict[str, List[str]]) -> None: """Save the map of extensions available at build time.""" code = dumps(obj=dict(sorted(ext_map.items())), indent=4) self.console.log("Writing extension map...") - self._write(code=code, name="extension_map", extension="json") + self._write(code=code, name="extension_map", extension="json", folder="assets") def _save_module_map(self): """Save the module map.""" @@ -152,7 +155,7 @@ def _save_module_map(self): } code = dumps(obj=dict(sorted(module_map.items())), indent=4) self.console.log("\nWriting module map...") - self._write(code=code, name="module_map", extension="json") + self._write(code=code, name="module_map", extension="json", folder="assets") def _save_modules( self, @@ -197,9 +200,11 @@ def _run_linters(self): linters.ruff() linters.black() - def _write(self, code: str, name: str, extension="py") -> None: + def _write( + self, code: str, name: str, extension: str = "py", folder: str = "package" + ) -> None: """Write the module to the package.""" - package_folder = self.directory / "package" + package_folder = self.directory / folder package_path = package_folder / f"{name}.{extension}" package_folder.mkdir(exist_ok=True) @@ -209,25 +214,24 @@ def _write(self, code: str, name: str, extension="py") -> None: file.write(code.replace("typing.", "")) @staticmethod - def _read_extension_map(package: Path) -> dict: - """Get extension map from package folder.""" - ext_map_file = Path(package, "extension_map.json") + def _read(path: Path) -> dict: + """Get content from folder.""" try: - with open(ext_map_file) as fp: - ext_map = load(fp) + with open(Path(path)) as fp: + content = load(fp) except Exception: - ext_map = {} + content = {} - return ext_map + return content @staticmethod - def _diff(package: Path) -> Tuple[Set[str], Set[str]]: + def _diff(path: Path) -> Tuple[Set[str], Set[str]]: """Check differences between built and installed extensions. Parameters ---------- - package: Path - The path to the package + path: Path + The path to the folder where the extension map is stored. Returns ------- @@ -235,7 +239,7 @@ def _diff(package: Path) -> Tuple[Set[str], Set[str]]: First element: set of installed extensions that are not in the package. Second element: set of extensions in the package that are not installed. """ - ext_map = PackageBuilder._read_extension_map(package) + ext_map = PackageBuilder._read(path) add: Set[str] = set() remove: Set[str] = set() diff --git a/openbb_platform/core/tests/app/static/test_package_builder.py b/openbb_platform/core/tests/app/static/test_package_builder.py index 44e7ab698d5b..9057c932bcc8 100644 --- a/openbb_platform/core/tests/app/static/test_package_builder.py +++ b/openbb_platform/core/tests/app/static/test_package_builder.py @@ -26,14 +26,14 @@ @pytest.fixture(scope="module") -def tmp_package_dir(tmp_path_factory): - return tmp_path_factory.mktemp("package") +def tmp_openbb_dir(tmp_path_factory): + return tmp_path_factory.mktemp("openbb") @pytest.fixture(scope="module") -def package_builder(tmp_package_dir): +def package_builder(tmp_openbb_dir): """Return package builder.""" - return PackageBuilder(tmp_package_dir) + return PackageBuilder(tmp_openbb_dir) def test_package_builder_init(package_builder): @@ -544,14 +544,16 @@ def some_func(): assert "Returns" in doc -def test_read_extension_map(package_builder, tmp_package_dir): +def test_read_extension_map(package_builder, tmp_openbb_dir): """Test read extension map.""" PATH = "openbb_core.app.static.package_builder." open_mock = mock_open() with patch(PATH + "open", open_mock), patch(PATH + "load") as mock_load: - package_builder._read_extension_map(tmp_package_dir) - open_mock.assert_called_once_with(Path(tmp_package_dir, "extension_map.json")) + package_builder._read(Path(tmp_openbb_dir / "assets" / "extension_map.json")) + open_mock.assert_called_once_with( + Path(tmp_openbb_dir / "assets" / "extension_map.json") + ) mock_load.assert_called_once() @@ -606,7 +608,7 @@ def test_read_extension_map(package_builder, tmp_package_dir): ) def test_package_diff( package_builder, - tmp_package_dir, + tmp_openbb_dir, ext_built, ext_installed, ext_inst_version, @@ -619,21 +621,19 @@ def mock_entry_points(group): return ext_installed.select(**{"group": group}) PATH = "openbb_core.app.static.package_builder." - with patch.object( - PackageBuilder, "_read_extension_map" - ) as mock_read_extension_map, patch( + with patch.object(PackageBuilder, "_read") as mock_read, patch( PATH + "entry_points", mock_entry_points - ), patch.object( - EntryPoint, "dist", new_callable=PropertyMock - ) as mock_obj: + ), patch.object(EntryPoint, "dist", new_callable=PropertyMock) as mock_obj: class MockPathDistribution: version = ext_inst_version mock_obj.return_value = MockPathDistribution() - mock_read_extension_map.return_value = ext_built + mock_read.return_value = ext_built - add, remove = package_builder._diff(tmp_package_dir) + add, remove = package_builder._diff( + Path(tmp_openbb_dir, "assets", "extension_map.json") + ) # We add whatever is not built, but is installed assert add == expected_add @@ -651,20 +651,22 @@ class MockPathDistribution: ({"this"}, {"that"}, False), ], ) -def test_auto_build(package_builder, tmp_package_dir, add, remove, openbb_auto_build): +def test_auto_build(package_builder, tmp_openbb_dir, add, remove, openbb_auto_build): """Test auto build.""" - with patch.object(PackageBuilder, "_diff") as mock_package_diff, patch.object( + with patch.object(PackageBuilder, "_diff") as mock_assets_diff, patch.object( PackageBuilder, "build" ) as mock_build, patch.object(Env, "AUTO_BUILD", openbb_auto_build): - mock_package_diff.return_value = add, remove + mock_assets_diff.return_value = add, remove package_builder.auto_build() if openbb_auto_build: - mock_package_diff.assert_called_once_with(Path(tmp_package_dir, "package")) + mock_assets_diff.assert_called_once_with( + Path(tmp_openbb_dir, "assets", "extension_map.json") + ) if add or remove: mock_build.assert_called_once() else: - mock_package_diff.assert_not_called() + mock_assets_diff.assert_not_called() mock_build.assert_not_called() diff --git a/openbb_platform/openbb/package/extension_map.json b/openbb_platform/openbb/assets/extension_map.json similarity index 100% rename from openbb_platform/openbb/package/extension_map.json rename to openbb_platform/openbb/assets/extension_map.json diff --git a/openbb_platform/openbb/package/module_map.json b/openbb_platform/openbb/assets/module_map.json similarity index 100% rename from openbb_platform/openbb/package/module_map.json rename to openbb_platform/openbb/assets/module_map.json From 3cdae9f70e07399265e5f952fd46a2b9214b6879 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 20 Feb 2024 12:43:45 +0000 Subject: [PATCH 2/3] fix unittest --- openbb_platform/tests/test_extension_map.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/tests/test_extension_map.py b/openbb_platform/tests/test_extension_map.py index 0c881bfd3f12..2bf082e891dd 100644 --- a/openbb_platform/tests/test_extension_map.py +++ b/openbb_platform/tests/test_extension_map.py @@ -37,7 +37,7 @@ def test_extension_map(): """Ensure only required extensions are built and versions respect pyproject.toml""" this_dir = Path(__file__).parent ext_map = load_ext_map( - Path(this_dir, "..", "openbb", "package", "extension_map.json") + Path(this_dir, "..", "openbb", "assets", "extension_map.json") ) req_ext = load_req_ext(Path(this_dir, "..", "pyproject.toml")) From 6ab43cb939ee03b951b57209c96bf6359256cff4 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Wed, 21 Feb 2024 12:27:23 +0000 Subject: [PATCH 3/3] rebuild --- openbb_platform/openbb/assets/module_map.json | 1 - openbb_platform/openbb/package/equity.py | 8 +++-- .../openbb/package/equity_discovery.py | 12 +++---- .../openbb/package/equity_fundamental.py | 28 +++++++++++----- .../openbb/package/equity_ownership.py | 2 +- .../openbb/package/equity_price.py | 10 ++++-- openbb_platform/openbb/package/etf.py | 33 ++++++++++++++----- .../openbb/package/fixedincome_government.py | 26 ++++++++------- openbb_platform/openbb/package/index.py | 11 +++---- openbb_platform/openbb/package/news.py | 2 +- .../openbb/package/regulators_sec.py | 8 +++-- 11 files changed, 88 insertions(+), 53 deletions(-) diff --git a/openbb_platform/openbb/assets/module_map.json b/openbb_platform/openbb/assets/module_map.json index 1188f16fbaba..6b9c08e31993 100644 --- a/openbb_platform/openbb/assets/module_map.json +++ b/openbb_platform/openbb/assets/module_map.json @@ -136,7 +136,6 @@ "index_market": "/index/market", "index_price": "/index/price", "index_price_historical": "/index/price/historical", - "index_sectors": "/index/sectors", "news": "/news", "news_company": "/news/company", "news_world": "/news/world", diff --git a/openbb_platform/openbb/package/equity.py b/openbb_platform/openbb/package/equity.py index b6bde8a85628..3b3e52a05e5f 100644 --- a/openbb_platform/openbb/package/equity.py +++ b/openbb_platform/openbb/package/equity.py @@ -227,7 +227,7 @@ def profile( symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter( - description="Symbol to get data for. Multiple items allowed: intrinio, yfinance." + description="Symbol to get data for. Multiple items allowed: fmp, intrinio, yfinance." ), ], provider: Optional[Literal["fmp", "intrinio", "yfinance"]] = None, @@ -238,7 +238,7 @@ def profile( Parameters ---------- symbol : Union[str, List[str]] - Symbol to get data for. Multiple items allowed: intrinio, yfinance. + Symbol to get data for. Multiple items allowed: fmp, intrinio, yfinance. provider : Optional[Literal['fmp', 'intrinio', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is @@ -403,7 +403,9 @@ def profile( }, extra_params=kwargs, extra_info={ - "symbol": {"multiple_items_allowed": ["intrinio", "yfinance"]} + "symbol": { + "multiple_items_allowed": ["fmp", "intrinio", "yfinance"] + } }, ) ) diff --git a/openbb_platform/openbb/package/equity_discovery.py b/openbb_platform/openbb/package/equity_discovery.py index 6b272d10c0b8..2e1524397347 100644 --- a/openbb_platform/openbb/package/equity_discovery.py +++ b/openbb_platform/openbb/package/equity_discovery.py @@ -77,7 +77,7 @@ def active( Percent change. volume : float The trading volume. - market_cap : Optional[str] + market_cap : Optional[float] Market Cap displayed in billions. (provider: yfinance) avg_volume_3_months : Optional[float] Average volume over the last 3 months in millions. (provider: yfinance) @@ -158,7 +158,7 @@ def aggressive_small_caps( Percent change. volume : float The trading volume. - market_cap : Optional[str] + market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] Average volume over the last 3 months in millions. (provider: yfinance) @@ -341,7 +341,7 @@ def gainers( Percent change. volume : float The trading volume. - market_cap : Optional[str] + market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] Average volume over the last 3 months in millions. (provider: yfinance) @@ -422,7 +422,7 @@ def growth_tech( Percent change. volume : float The trading volume. - market_cap : Optional[str] + market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] Average volume over the last 3 months in millions. (provider: yfinance) @@ -503,7 +503,7 @@ def losers( Percent change. volume : float The trading volume. - market_cap : Optional[str] + market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] Average volume over the last 3 months in millions. (provider: yfinance) @@ -584,7 +584,7 @@ def undervalued_growth( Percent change. volume : float The trading volume. - market_cap : Optional[str] + market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] Average volume over the last 3 months in millions. (provider: yfinance) diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py index 008cda94948a..8e3b669d4ea8 100644 --- a/openbb_platform/openbb/package/equity_fundamental.py +++ b/openbb_platform/openbb/package/equity_fundamental.py @@ -1270,7 +1270,10 @@ def filings( def historical_attributes( self, symbol: Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") + Union[str, List[str]], + OpenBBCustomParameter( + description="Symbol to get data for. Multiple items allowed: intrinio." + ), ], tag: Annotated[ Union[str, List[str]], @@ -1313,8 +1316,8 @@ def historical_attributes( Parameters ---------- - symbol : str - Symbol to get data for. + symbol : Union[str, List[str]] + Symbol to get data for. Multiple items allowed: intrinio. tag : Union[str, List[str]] Intrinio data tag ID or code. Multiple items allowed: intrinio. start_date : Union[datetime.date, None, str] @@ -1386,7 +1389,10 @@ def historical_attributes( "sort": sort, }, extra_params=kwargs, - extra_info={"tag": {"multiple_items_allowed": ["intrinio"]}}, + extra_info={ + "symbol": {"multiple_items_allowed": ["intrinio"]}, + "tag": {"multiple_items_allowed": ["intrinio"]}, + }, ) ) @@ -2033,7 +2039,10 @@ def income_growth( def latest_attributes( self, symbol: Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") + Union[str, List[str]], + OpenBBCustomParameter( + description="Symbol to get data for. Multiple items allowed: intrinio." + ), ], tag: Annotated[ Union[str, List[str]], @@ -2048,8 +2057,8 @@ def latest_attributes( Parameters ---------- - symbol : str - Symbol to get data for. + symbol : Union[str, List[str]] + Symbol to get data for. Multiple items allowed: intrinio. tag : Union[str, List[str]] Intrinio data tag ID or code. Multiple items allowed: intrinio. provider : Optional[Literal['intrinio']] @@ -2101,7 +2110,10 @@ def latest_attributes( "tag": tag, }, extra_params=kwargs, - extra_info={"tag": {"multiple_items_allowed": ["intrinio"]}}, + extra_info={ + "symbol": {"multiple_items_allowed": ["intrinio"]}, + "tag": {"multiple_items_allowed": ["intrinio"]}, + }, ) ) diff --git a/openbb_platform/openbb/package/equity_ownership.py b/openbb_platform/openbb/package/equity_ownership.py index ca38f7f23112..bec7986b08c3 100644 --- a/openbb_platform/openbb/package/equity_ownership.py +++ b/openbb_platform/openbb/package/equity_ownership.py @@ -74,7 +74,7 @@ def insider_trading( InsiderTrading -------------- - symbol : str + symbol : Optional[str] Symbol representing the entity requested in the data. company_cik : Optional[Union[int, str]] CIK number of the company. diff --git a/openbb_platform/openbb/package/equity_price.py b/openbb_platform/openbb/package/equity_price.py index bb1f681acd7a..712204e4dbf9 100644 --- a/openbb_platform/openbb/package/equity_price.py +++ b/openbb_platform/openbb/package/equity_price.py @@ -335,7 +335,10 @@ def nbbo( def performance( self, symbol: Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") + Union[str, List[str]], + OpenBBCustomParameter( + description="Symbol to get data for. Multiple items allowed: fmp." + ), ], provider: Optional[Literal["fmp"]] = None, **kwargs @@ -344,8 +347,8 @@ def performance( Parameters ---------- - symbol : str - Symbol to get data for. + symbol : Union[str, List[str]] + Symbol to get data for. Multiple items allowed: fmp. provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is @@ -418,6 +421,7 @@ def performance( "symbol": symbol, }, extra_params=kwargs, + extra_info={"symbol": {"multiple_items_allowed": ["fmp"]}}, ) ) diff --git a/openbb_platform/openbb/package/etf.py b/openbb_platform/openbb/package/etf.py index e076e815c9c1..f50f4f2376b5 100644 --- a/openbb_platform/openbb/package/etf.py +++ b/openbb_platform/openbb/package/etf.py @@ -32,7 +32,10 @@ def __repr__(self) -> str: def countries( self, symbol: Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for. (ETF)") + Union[str, List[str]], + OpenBBCustomParameter( + description="Symbol to get data for. (ETF) Multiple items allowed: fmp." + ), ], provider: Optional[Literal["fmp"]] = None, **kwargs @@ -41,8 +44,8 @@ def countries( Parameters ---------- - symbol : str - Symbol to get data for. (ETF) + symbol : Union[str, List[str]] + Symbol to get data for. (ETF) Multiple items allowed: fmp. provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is @@ -87,6 +90,7 @@ def countries( "symbol": symbol, }, extra_params=kwargs, + extra_info={"symbol": {"multiple_items_allowed": ["fmp"]}}, ) ) @@ -237,6 +241,9 @@ def historical( ------- >>> from openbb import obb >>> obb.etf.historical(symbol="SPY") + >>> obb.etf.historical("SPY", provider="yfinance") + >>> #### This function accepts multiple tickers. #### + >>> obb.etf.historical("SPY,IWM,QQQ,DJIA", provider="yfinance") """ # noqa: E501 return self._run( @@ -558,7 +565,10 @@ def holdings_date( def holdings_performance( self, symbol: Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") + Union[str, List[str]], + OpenBBCustomParameter( + description="Symbol to get data for. Multiple items allowed: fmp." + ), ], provider: Optional[Literal["fmp"]] = None, **kwargs @@ -567,8 +577,8 @@ def holdings_performance( Parameters ---------- - symbol : str - Symbol to get data for. + symbol : Union[str, List[str]] + Symbol to get data for. Multiple items allowed: fmp. provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is @@ -641,6 +651,7 @@ def holdings_performance( "symbol": symbol, }, extra_params=kwargs, + extra_info={"symbol": {"multiple_items_allowed": ["fmp"]}}, ) ) @@ -808,7 +819,10 @@ def info( def price_performance( self, symbol: Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") + Union[str, List[str]], + OpenBBCustomParameter( + description="Symbol to get data for. Multiple items allowed: fmp." + ), ], provider: Optional[Literal["fmp"]] = None, **kwargs @@ -817,8 +831,8 @@ def price_performance( Parameters ---------- - symbol : str - Symbol to get data for. + symbol : Union[str, List[str]] + Symbol to get data for. Multiple items allowed: fmp. provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is @@ -891,6 +905,7 @@ def price_performance( "symbol": symbol, }, extra_params=kwargs, + extra_info={"symbol": {"multiple_items_allowed": ["fmp"]}}, ) ) diff --git a/openbb_platform/openbb/package/fixedincome_government.py b/openbb_platform/openbb/package/fixedincome_government.py index ed4cc770d9c8..205cb3e4308b 100644 --- a/openbb_platform/openbb/package/fixedincome_government.py +++ b/openbb_platform/openbb/package/fixedincome_government.py @@ -69,30 +69,32 @@ def treasury_rates( ------------- date : date The date of the data. + week_4 : Optional[float] + 4 week Treasury bills rate (secondary market). month_1 : Optional[float] - 1 month treasury rate. + 1 month Treasury rate. month_2 : Optional[float] - 2 month treasury rate. + 2 month Treasury rate. month_3 : Optional[float] - 3 month treasury rate. + 3 month Treasury rate. month_6 : Optional[float] - 6 month treasury rate. + 6 month Treasury rate. year_1 : Optional[float] - 1 year treasury rate. + 1 year Treasury rate. year_2 : Optional[float] - 2 year treasury rate. + 2 year Treasury rate. year_3 : Optional[float] - 3 year treasury rate. + 3 year Treasury rate. year_5 : Optional[float] - 5 year treasury rate. + 5 year Treasury rate. year_7 : Optional[float] - 7 year treasury rate. + 7 year Treasury rate. year_10 : Optional[float] - 10 year treasury rate. + 10 year Treasury rate. year_20 : Optional[float] - 20 year treasury rate. + 20 year Treasury rate. year_30 : Optional[float] - 30 year treasury rate. + 30 year Treasury rate. Example ------- diff --git a/openbb_platform/openbb/package/index.py b/openbb_platform/openbb/package/index.py index c88ed601abf6..bb8554eed048 100644 --- a/openbb_platform/openbb/package/index.py +++ b/openbb_platform/openbb/package/index.py @@ -90,9 +90,8 @@ def available( @validate def constituents( self, - index: Annotated[ - str, - OpenBBCustomParameter(description="Index to fetch the constituents of."), + symbol: Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") ], provider: Optional[Literal["fmp"]] = None, **kwargs @@ -101,8 +100,8 @@ def constituents( Parameters ---------- - index : str - Index to fetch the constituents of. + symbol : str + Symbol to get data for. provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is @@ -160,7 +159,7 @@ def constituents( ) }, standard_params={ - "index": index, + "symbol": symbol, }, extra_params=kwargs, ) diff --git a/openbb_platform/openbb/package/news.py b/openbb_platform/openbb/package/news.py index bcbfb6f18854..e3d19482cea8 100644 --- a/openbb_platform/openbb/package/news.py +++ b/openbb_platform/openbb/package/news.py @@ -133,7 +133,7 @@ def company( Author of the article. (provider: benzinga, polygon) teaser : Optional[str] Teaser of the news. (provider: benzinga) - images : Optional[Union[List[Dict[str, str]], List[str], str]] + images : Optional[Union[List[Dict[str, str]], str, List[str]]] URL to the images of the news. (provider: benzinga, fmp) channels : Optional[str] Channels associated with the news. (provider: benzinga) diff --git a/openbb_platform/openbb/package/regulators_sec.py b/openbb_platform/openbb/package/regulators_sec.py index 9238d28bd7de..012bb4803b7b 100644 --- a/openbb_platform/openbb/package/regulators_sec.py +++ b/openbb_platform/openbb/package/regulators_sec.py @@ -29,7 +29,7 @@ def cik_map( symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter( - description="Symbol to get data for. Multiple items allowed: intrinio, yfinance." + description="Symbol to get data for. Multiple items allowed: fmp, intrinio, yfinance." ), ], provider: Optional[Literal["sec"]] = None, @@ -40,7 +40,7 @@ def cik_map( Parameters ---------- symbol : Union[str, List[str]] - Symbol to get data for. Multiple items allowed: intrinio, yfinance. + Symbol to get data for. Multiple items allowed: fmp, intrinio, yfinance. provider : Optional[Literal['sec']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'sec' if there is @@ -87,7 +87,9 @@ def cik_map( }, extra_params=kwargs, extra_info={ - "symbol": {"multiple_items_allowed": ["intrinio", "yfinance"]} + "symbol": { + "multiple_items_allowed": ["fmp", "intrinio", "yfinance"] + } }, ) )