summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormontezdesousa <79287829+montezdesousa@users.noreply.github.com>2024-03-09 23:22:40 +0000
committerGitHub <noreply@github.com>2024-03-09 23:22:40 +0000
commitf328a45b9586243ddb4bff518e8f07b9d264a124 (patch)
treea87c85bca04ca0a3bff35c56b9774c1c39a1c851
parent8254bd5638aa293d1dafb5cfa1f1380d3efdec15 (diff)
[Feature] - refactor examples (#6154)
* remove auto examples and split python from api * add missing exampels * rebuild * query params focstring * black * add scoped examples * group model imports in the router * unblock api * fix * classify examples * fix package identation * black sig * fix indentation without linter * fix python examples * remove doc * pylint * again * add model validators * commodity, crypto, currency * filter examples * fix python examples * fix filter and build * undo toml change * add comment * oop * comment * typing * lint * Update router.py * Update econometrics_router.py * fix to_python * to_python * to_python * black * fix multiple line field descriptions * remove circular import * add missing import * pass indent as object attr * doc * doc * this looks better * forgot this * fix: new examples adapted * fix prev commit * avoid future problems * Update ownership_router.py * rebuild + remove todo * make description mandatory for python examples * simple indent * append_examples func works for both website and docstring * Add example unit tests * Edit example unit tests * fix validator * this works * fix to_python * fix mandatory docstrings * typing * shorter error msgs * economy router * fix more examples * more examples * more examples * more examples * field desc * minor fix * fix etf examples * handling types better * lint * rename method * rename var * docstring + move method * typing * prompt * rebuild * prompt fix in PythonEx * fix examples without model * example mock data * add get_field_type func to get field data type * panel data * mock data * fix * fix * docstring * ohlcv * pylint * quantitaive router * simplify mock data * fix remaining quantitative routers * a bit more flexibility for examples * lint * mock dat from sample * docstring * assertion * bugfix * minor fix * technical * fix integration tests * fix docstring * econometrics examples * econometrics examples * remove warning * add technical examples * fix bad examples * fix more examples * update test rules * remoce old pydantic referenc * fix bug in treasury prices * fix quantitative examples * discovery router * equity shorts * equity shorts * fix currency pairs * fix sec_router example * fix panel data to support all funcs * black * more examples fixes * simplify test * rebuild * test doc * add provider to some ex * ^ * last * add provider * rebuild * working examples * noqa * pylint * pylint * clean * minor fix * fix test * lint * ruff --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
-rw-r--r--openbb_platform/core/openbb_core/app/assets/parameter_pool.json41
-rw-r--r--openbb_platform/core/openbb_core/app/example_generator.py83
-rw-r--r--openbb_platform/core/openbb_core/app/model/example.py229
-rw-r--r--openbb_platform/core/openbb_core/app/model/metadata.py4
-rw-r--r--openbb_platform/core/openbb_core/app/router.py19
-rw-r--r--openbb_platform/core/openbb_core/app/static/package_builder.py451
-rw-r--r--openbb_platform/core/openbb_core/app/static/utils/decorators.py2
-rw-r--r--openbb_platform/core/openbb_core/provider/abstract/query_params.py11
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/equity_short_interest.py5
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/short_volume.py2
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/symbol_map.py17
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/trailing_dividend_yield.py4
-rw-r--r--openbb_platform/core/tests/app/static/test_example_generator.py59
-rw-r--r--openbb_platform/core/tests/app/static/test_package_builder.py11
-rw-r--r--openbb_platform/extensions/commodity/openbb_commodity/commodity_router.py19
-rw-r--r--openbb_platform/extensions/crypto/openbb_crypto/crypto_router.py6
-rw-r--r--openbb_platform/extensions/crypto/openbb_crypto/price/price_router.py32
-rw-r--r--openbb_platform/extensions/currency/openbb_currency/currency_router.py42
-rw-r--r--openbb_platform/extensions/currency/openbb_currency/price/price_router.py19
-rw-r--r--openbb_platform/extensions/derivatives/openbb_derivatives/futures/futures_router.py29
-rw-r--r--openbb_platform/extensions/derivatives/openbb_derivatives/options/options_router.py19
-rw-r--r--openbb_platform/extensions/econometrics/openbb_econometrics/econometrics_router.py205
-rw-r--r--openbb_platform/extensions/economy/openbb_economy/economy_router.py120
-rw-r--r--openbb_platform/extensions/economy/openbb_economy/gdp/gdp_router.py25
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/calendar/calendar_router.py51
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/compare/compare_router.py33
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/darkpool/darkpool_router.py8
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/discovery/discovery_router.py79
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/equity_router.py29
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/estimates/estimates_router.py26
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/fundamental/fundamental_router.py236
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/ownership/ownership_router.py49
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/price/price_router.py24
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/shorts/shorts_router.py10
-rw-r--r--openbb_platform/extensions/etf/openbb_etf/discovery/discovery_router.py10
-rw-r--r--openbb_platform/extensions/etf/openbb_etf/etf_router.py80
-rw-r--r--openbb_platform/extensions/fixedincome/openbb_fixedincome/corporate/corporate_router.py25
-rw-r--r--openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py5
-rw-r--r--openbb_platform/extensions/fixedincome/openbb_fixedincome/government/government_router.py30
-rw-r--r--openbb_platform/extensions/fixedincome/openbb_fixedincome/rate/rate_router.py40
-rw-r--r--openbb_platform/extensions/fixedincome/openbb_fixedincome/spreads/spreads_router.py13
-rw-r--r--openbb_platform/extensions/index/openbb_index/index_router.py32
-rw-r--r--openbb_platform/extensions/index/openbb_index/price/price_router.py10
-rw-r--r--openbb_platform/extensions/news/openbb_news/news_router.py76
-rw-r--r--openbb_platform/extensions/quantitative/openbb_quantitative/performance/performance_router.py72
-rw-r--r--openbb_platform/extensions/quantitative/openbb_quantitative/quantitative_router.py51
-rw-r--r--openbb_platform/extensions/quantitative/openbb_quantitative/rolling/rolling_router.py228
-rw-r--r--openbb_platform/extensions/quantitative/openbb_quantitative/stats/stats_router.py125
-rw-r--r--openbb_platform/extensions/regulators/openbb_regulators/cftc/cftc_router.py24
-rw-r--r--openbb_platform/extensions/regulators/openbb_regulators/sec/sec_router.py62
-rw-r--r--openbb_platform/extensions/technical/openbb_technical/helpers.py13
-rw-r--r--openbb_platform/extensions/technical/openbb_technical/technical_router.py319
-rw-r--r--openbb_platform/extensions/tests/test_routers.py12
-rw-r--r--openbb_platform/extensions/tests/utils/helpers.py226
-rw-r--r--openbb_platform/extensions/tests/utils/router_testers.py184
-rw-r--r--openbb_platform/openbb/package/crypto.py16
-rw-r--r--openbb_platform/openbb/package/crypto_price.py21
-rw-r--r--openbb_platform/openbb/package/currency.py40
-rw-r--r--openbb_platform/openbb/package/currency_price.py17
-rw-r--r--openbb_platform/openbb/package/derivatives_options.py34
-rw-r--r--openbb_platform/openbb/package/economy.py177
-rw-r--r--openbb_platform/openbb/package/economy_gdp.py42
-rw-r--r--openbb_platform/openbb/package/equity.py58
-rw-r--r--openbb_platform/openbb/package/equity_calendar.py62
-rw-r--r--openbb_platform/openbb/package/equity_compare.py13
-rw-r--r--openbb_platform/openbb/package/equity_discovery.py141
-rw-r--r--openbb_platform/openbb/package/equity_estimates.py56
-rw-r--r--openbb_platform/openbb/package/equity_fundamental.py349
-rw-r--r--openbb_platform/openbb/package/equity_ownership.py76
-rw-r--r--openbb_platform/openbb/package/equity_price.py57
-rw-r--r--openbb_platform/openbb/package/equity_shorts.py13
-rw-r--r--openbb_platform/openbb/package/etf.py162
-rw-r--r--openbb_platform/openbb/package/fixedincome.py14
-rw-r--r--openbb_platform/openbb/package/fixedincome_corporate.py81
-rw-r--r--openbb_platform/openbb/package/fixedincome_government.py27
-rw-r--r--openbb_platform/openbb/package/fixedincome_rate.py113
-rw-r--r--openbb_platform/openbb/package/fixedincome_spreads.py42
-rw-r--r--openbb_platform/openbb/package/index.py110
-rw-r--r--openbb_platform/openbb/package/news.py40
-rw-r--r--openbb_platform/openbb/package/regulators_sec.py114
-rw-r--r--openbb_platform/providers/finra/openbb_finra/models/equity_short_interest.py18
-rw-r--r--openbb_platform/providers/government_us/openbb_government_us/models/treasury_prices.py28
-rw-r--r--openbb_platform/providers/polygon/openbb_polygon/models/currency_pairs.py4
-rw-r--r--openbb_platform/providers/sec/openbb_sec/models/symbol_map.py12
-rw-r--r--website/generate_excel_markdown.py3
85 files changed, 3813 insertions, 1763 deletions
diff --git a/openbb_platform/core/openbb_core/app/assets/parameter_pool.json b/openbb_platform/core/openbb_core/app/assets/parameter_pool.json
deleted file mode 100644
index 41b8af1d0f8..00000000000
--- a/openbb_platform/core/openbb_core/app/assets/parameter_pool.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "crypto": {
- "symbol": "BTCUSD"
- },
- "currency": {
- "symbol": "EURUSD"
- },
- "derivatives": {
- "symbol": "AAPL"