diff options
author | montezdesousa <79287829+montezdesousa@users.noreply.github.com> | 2024-02-15 12:19:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-15 12:19:18 +0000 |
commit | 7deb4e69f646e9212e65eceec9762d9b964516c3 (patch) | |
tree | ff8613f4ab90acfbc8a0d24d2858a3097a095c9f | |
parent | f288c411f4f4ec6d7170c480656dee8df1a99fb0 (diff) |
[Feature] - Comma separated string and list inputs (#6062)
* feat: balancesheet
* feat: income statement
* fix: cash flow statement
* feat: financial ratios
* feat: reported financials
* feat: revenue business line
* feat: revenue per geography
* fix: warnings
* Update balance_sheet.py
* fix: remove warning imports
* feat: balance sheet growth
* feat: calendar ipo
* feat: cashflow growth
* feat: __validators__
* fix: typing
* fix: validator msg
* feat: trailing dividend_yield
* feat: short volume
* feat: share statistics
* feat: price target + consensus
* fix: update validator
* feat: historical dividends
* feat: key executives
* fix: getattr directly
* fix: type hint validator
* fix: add default to getattr
* typo
* feat: otc
* feat: options chains
* fix: remove list validators
* feat: add validator dict to fetchers
* lint
* update standard models
* lint
* feat: rename validator
* fix: ownership
* feat: query params description
* fix: balance yfinance
* key execs, income statement
* remove change
* fix: revenue geographic
* fix: disable pylint
* fix: unusual + balance
* unit test validator
* minor fix
* explicit validators
* update test
* feat: multiple items allowed
* rebuild
* move check_single_value
* crypto historical
* order providers
* fix typing
* rename extra dict
* marking multiple items allowed
* Revert "marking multiple items allowed"
This reverts commit 7da04817e18b2c9e373ffde9134f3949d11f58dd.
* error msg
* fix: default provider runtime vs configuration
* minor fix
* docstring
* revert default changes
* get provider before executing cmd
* fix container bug
* clean filter
* add comment
* prevent bad defaults
* update docstring
* typing
* fix
* black
* fix docstring generation
* [Feature] - Mark multiple item fetchers (#6074)
* feat: price target
* bezinga company news
* equity quote
* marking multiple items allowed
* more multiple items
* black
* rebuild
* another batch
* rebuild
* another
* cpi
* move prop
* rebuild
---------
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
* rename var
* update msg
* rename func
* fix test
* mypy
* ruff
---------
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
83 files changed, 1158 insertions, 359 deletions
diff --git a/openbb_platform/core/openbb_core/app/provider_interface.py b/openbb_platform/core/openbb_core/app/provider_interface.py index 0e37ea7fa73..9755ccdb77c 100644 --- a/openbb_platform/core/openbb_core/app/provider_interface.py +++ b/openbb_platform/core/openbb_core/app/provider_interface.py @@ -217,13 +217,24 @@ class ProviderInterface(metaclass=SingletonMeta): # field.outer_type_ don't work for Optional nested types type_ = field.annotation + additional_description = "" + if (extra := field.json_schema_extra) and ( + multiple := extra.get("multiple_items_allowed") + ): + if provider_name: + additional_description += " Multiple items allowed." + else: + additional_description += ( + " Multiple items allowed: " + ", ".join(multiple) + "." + ) + provider_field = ( f"(provider: {provider_name})" if provider_name != "openbb" else "" ) description = ( - f"{field.description} {provider_field}" + f"{field.description}{additional_description} {provider_field}" if provider_name and field.description - else f"{field.description}" + else f"{field.description}{additional_description}" ) if field.is_required(): diff --git a/openbb_platform/core/openbb_core/app/static/container.py b/openbb_platform/core/openbb_core/app/static/container.py index 0f0e483678d..333f3913712 100644 --- a/openbb_platform/core/openbb_core/app/static/container.py +++ b/openbb_platform/core/openbb_core/app/static/container.py @@ -1,8 +1,9 @@ """Container class.""" -from typing import Any +from typing import Any, Optional, Tuple from openbb_core.app.command_runner import CommandRunner +from openbb_core.app.model.abstract.er |