Commit Graph

6072 Commits

Author SHA1 Message Date
hjoaquim
cab76e83cd Merge branch 'feature/openbb-sdk-v4' into feature/argparse_translator 2023-08-09 12:19:03 +01:00
Henrique Joaquim
86f951f1b1 Argparse custom params (#5303)
* Argparse custom params POC

* small improvements to the package builder

* generation of static assets

* minor adjustments

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2023-08-09 10:51:08 +01:00
hjoaquim
6a3946cc5e Merge branch 'feature/openbb-sdk-v4' into feature/argparse_translator 2023-08-09 08:39:21 +01:00
Henrique Joaquim
9348f098a5 [SDK v4] General improvements related with the charting extension (#5283)
* introducing fig on the chart model

* charting manager to expect fig and content. also, adding a 1st example of its usage for stocks/load route

* leveraging fig.show on command output

* introducing the render_chart function

* using render_chart() on the command output

* drop to_plotly_json function

* a way of removing fields from the api only

* remove references to to_plotly_json

* fix charting_router to use new convention on returning fig and content

* adjustments on the builder script

* ruff and black

* typo

* stocks_news chart implementation

* repr on chart model

* adding table style config

* removing to_plotly_json from the charting manager

* typo and a little change on the way to_table behaves so we can leverage inheritance

* introducing OpenBBFigureTable as a workarround to have tables on the sdk

* renaming to to_chart

* multiples implementation

* black
2023-08-08 15:18:57 +01:00
Pratyush Shukla
aa21a87193 static files 2023-08-08 19:04:57 +05:30
Pratyush Shukla
0d95889150 changed condition to reflect standard_models 2023-08-08 18:45:27 +05:30
Pratyush Shukla
b9242894d5 renamed models to standard_models 2023-08-08 18:42:23 +05:30
Igor Radovanovic
af04b4ca88 Merge branch 'develop' into feature/openbb-sdk-v4 2023-08-08 13:55:00 +02:00
Igor Radovanovic
28946b85c9 Refactor Fetcher, fix descriptions, fix bugs, cleanup... | co-author: the-praxs 2023-08-08 00:22:03 +02:00
Igor Radovanovic
2e21a360ed Merge pull request #5244 from OpenBB-finance/feature/unit-tests
Setup unit tests folder structure and framework
2023-08-07 22:04:57 +02:00
Igor Radovanovic
6c702a3ed0 Fix some failing tests 2023-08-07 21:56:27 +02:00
Igor Radovanovic
ffc33acdf3 Merge, fix errors, and conflicts 2023-08-07 21:33:26 +02:00
teh_coderer
47c9086e80 fix: #5263 #5264 (#5290) 2023-08-07 17:25:57 +00:00
Colin Delahunty
19e6b61953 Fixed the get routines to meet the new backend standard (#5271)
* Added fixes

* Fixed test

* Unhid try except

* Fixed everything else

* Fixed typing

* Fixed pylint

* Fixed tests

* Fixed

---------

Co-authored-by: Andrew <andrew.kenreich@gmail.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-08-07 13:16:39 +00:00
James Maslek
279850822d fix databento (#5287) 2023-08-07 13:10:21 +00:00
Theodore Aptekarev
c8c7d836ea Merge branch 'develop' into feature/openbb-sdk-v4 2023-08-05 15:09:10 +03:00
Pratyush Shukla
564d08edd8 add --india flag to stocks/load (#5281)
* add `--india` flag to `stocks/load`

Add ticker, set `india` and voila!

* updated "help"

* added check for `.ns`, `.NS` in ticker

* consolidated conditions into 1 line
2023-08-04 17:55:47 +00:00
montezdesousa
1165e57b40 make some provider args optional 2023-08-04 10:56:20 +01:00
montezdesousa
afbd4a69aa rename some fetcher vars 2023-08-04 10:45:28 +01:00
montezdesousa
8f0b748270 move helpers and descriptions to util.py directory 2023-08-04 10:37:54 +01:00
James Maslek
41e800ad6a Custom request for all providers (#5280)
* breakpoint 1

* breakpoint pt 1

* Finish fred request

* Add **kwargs to all fmp funcs

* Moved all fmp funcs to custom request

* benzinga requests

* add polygon requests

* remove comment

* move make_request to helpers

---------

Co-authored-by: montezdesousa <montezdesousa@gmail.com>
2023-08-04 10:06:15 +01:00
Henrique Joaquim
dbc6751843 Merge branch 'develop' into feature/openbb-sdk-v4 2023-08-04 07:37:11 +01:00
James Maslek
ce5b93ae4e Custom args to package builder (#5282) 2023-08-04 00:59:51 +01:00
montezdesousa
ed07f6ad4c 200 breaks polygon 2023-08-04 00:46:12 +01:00
Danglewood
f1eee44cab Feature/options_views: Add a Variety of Views/Charts to Extend the OptionsChains Class (#5222)
* add options_chains_view

* vsurf charts

* skew for strike vs contract

* doc string

* add chart_volatility

* linting

* codespell

* mypy

* types

* tmx mypy

* update test file

* add synthetic long/short to strategies

* updates test_options_chains_model.py

* updates some docstrings

* update documentation

* actually commit the documentation page

* update documentation screenshots

* try catch for 403 error

* add tests for options_chains_view

* int64

* SPX error handling

* add cboe options dashboard for terminal

* codespell

* enable mouse scroll wheel zoom for charts

* declare key values for all widgets

* add some more streamlit charts and tables

* fix test_yfinance_view.py

* conflict resolution

* test

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-08-03 20:58:47 +00:00
Danglewood
d575c5d52a Fwd P/E regex fix (#5273) 2023-08-03 19:56:44 +00:00
DidierRLopes
373c4f1ea7 Update all_api_keys.json (#5277)
* Update all_api_keys.json

* Update CONTRIBUTING.md

* Create json-yaml-validate

* Update release-drafter.yml

* Update json-yaml-validate

* fix test

* add json lint to general

* Update tsconfig.json

* Add a json_validate exclude to not check tests and certain known violations

* fix workflow

* not sure why this didnt exclude?

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-08-03 15:25:47 +00:00
montezdesousa
70f70a81b4 Hotfix/sdk py38 (#5279)
* replace unsupported Annotated, MappingProxyType, is_annotated_dc

* fix package builder
2023-08-03 12:43:55 +01:00
Diogo Sousa
61afffb1f5 typing 2023-08-02 16:56:40 +01:00
Diogo Sousa
0b3b30eccc rename exception for better localization 2023-08-02 16:51:07 +01:00
Diogo Sousa
49fe650117 update provider readme 2023-08-02 16:43:54 +01:00
Diogo Sousa
1e0a3c36c4 update provider readme 2023-08-02 16:43:19 +01:00
Diogo Sousa
9a1b4a8fba update provider readme 2023-08-02 16:42:02 +01:00
Diogo Sousa
6b93a603dc update provider readme 2023-08-02 16:37:54 +01:00
Diogo Sousa
13d95452c3 to follow the convention 2023-08-02 15:50:20 +01:00
Diogo Sousa
e3d65b502f filter 2023-08-02 14:49:19 +01:00
Diogo Sousa
cc5a334258 cleanup filters 2023-08-02 14:42:14 +01:00
montezdesousa
be864d01f3 Feature/provider refactoring (#5266)
* remove comment

* replace registry description

* black and add some todos

* remove unused var

* allow description and move provider to title

* fix the data field descriptions

* refactor globalnews

* added `"limit"` to metadata descriptions

* fix cpi command and refactor

* refactored `AnalystEstimates`

* add concat param

* refactored `AvailableIndices` for `economy.available_indices`

* sort and set index to date

* place it inside exception

* move literals to core

* rename descriptions dict

* add descriptions to cpi data

* change description

* black

* refactored `CompanyOverview` for `stocks.fa.overview`

* Updated `DATA_DESCRIPTIONS` in provider metadata

* Updated `symbol` description in `DATA_DESCRIPTIONS`

* fix stock_news alias

* pass standard limit

* fix stock news

* fix to datframe

* rebuild python interface

* refactored `CryptoEOD` for `crypto.load`

* added Field descriptions

* fix polygon stock_news

* fix stock_news data

* ruff

* refactored `DividendCalendar` for `stocks.fa.cal`

* refactored `EarningsCalendar` for `stocks.fa.cal`

* refactored `EarningsCallTranscript` for `stocks.fa.transcript`

* refactored `ExecutiveCompensation` for `stocks.fa.comp`

* first round, refactor registry, executor, map

* ruff

* Allow alias in the provider models for provider specific params

* Updated stock news to use alias in query

* small fixes

* fix interface bug

* black

* exceptions and typing

* ruff

* fix docstring

* sort providers

* push static assets without docstrings

* date Field and optional dates params in `CryptoEOD` for fmp and polygon

* refactored `ForexEOD` for `forex.load`

* add comment

* refactored `ForexPairs` and added Polygon provider

* removed `_price` models from fmp and polygon

* Updated `economy.index` to use `MajorIndicesEOD`

* removed `_price` from sdk models

* refactored `MajorIndicesEOD` for `economy.index`

* refactored `StockEOD` for `stocks.load`

* regenerate sdk

* ruff

* fix bug with global_news

* typing

* add docstrings to registry map

* update docstrings

* add executor query arg

* follow convention

* docstring

* inject provider interface instead

* doc

* safer this way

* docs

* add abstractmethod decorator

* add explicit fetcher property model_name

* remove mode_name prop

* get model name from query params

* force extra params or data to be optional

* replace fetcher list by fetcher dict and black

* explicit depps in prov interface

* explicit depps in prov interface

* no formatted creds

* no formatted creds

* dep injection

* dep injection

* private methods

* just verify credentials

* docstring

* typing and cut doc

* typing

* typing

* typing

* no overkill

* ruff

* don't block if model not found, just warn

* don't block if model not found, just warn

* don't block if model not found, just warn

* empty list if creds None

* check creds before request

* just return the data

* typing

* move query params

* ruff

* move queryparams

* move queryparams

* move queryparams

* fix a bunch o polygon models

* ruff

* partial fix fmp models

* ruff

* refactor more fmps

* create dict by alias

* refactor more fmp endpoints

* bug

* add params to transform query

* ruff

* fix fmp bugs

* has to be annotation

* rewrite static

* typing

* append return type to map

* support return for generic data type

* remove return type for openbb provider

* add todo

* fix small fred typing error

* add more return type info

* better message

* handle multiple types of data (the fetcher should declare them later)

* add comment

* ruff

* handle returns with generic for now (check juan solution)

* fix bug with generic

* fix fmp fetchr dict

* fill return type in the provider lib for docstrings

* polygon stock news

* Update economy_router.py (#5254)

* remove return type stuff

* adapt cpi and overview

* rewrite python interface

* fix to_dataframe

* limit stocks eod output

* rename method

* mypy

* mypy

* mypy chart style

* mypy provider

* mypy ignores

* mypy credentials

* Added Statements Growth endpoints from FMP

* account mypy fix

* privatize account method

* one more mypy

* remove mypy ignore

* rename private method

* Linting

* Docstring generation

* Linting

* move provider.py into __init__.py

* add default to required_credentials -> None

* refactored `KeyExecutives` for `stocks.fa.mgmt`

* refactored `HistoricalEmployees` for `stocks.fa.emp`

* provider docstring

* docstring

* refactored `HistoricalStockSplits` for `stocks.fa.split`

* standardised date in stockeod

* refactored ``InstitutionalOwnership` for `stocks.fa.own`

* removed unused imports

* add `check_fields=False` in `@validator`

* historical dividens

* remove unused helper

* move single used helpers to where they are used

* move single used helpers to where they are used

* move single used helpers to where they are used

* standardise date, vwap in crypto eod and forex eod

* rename __commands__ to __extensions__

* change coverage separator

* the map cannot change sep

* sry

* sry again

* remove comment

* refactored `MajorIndicesConstituents` for `economy.const`

* add some descriptions about provider

* refactored `PriceTargetConsensus` for `stocks.fa.pt`

* refactored `PriceTarget` for `stocks.fa.pta`

* refactored `RevenueBusinessLine` for `stocks.fa.revseg`

* change metadata file name

* docstring

* remove unecessary arg

* ruff & black

* refactored `RevenueGeographic` for `stocks.fa.revgeo`

* refactored `RiskPremium` for `economy.risk`

* refactored `SECFilings` for `stocks.dd.sec`

* refactored `ShareStatistics` for `stocks.fa.shrs`

* refactored `StockInsiderTrading` for `stocks.fa.ins`

* peers

* stock splits

* refactored `KeyMetrics` for `stocks.fa.metrics`

* refactored `StockMultiples` for `stocks.multiples`

* refactor income statement

* rebuild

* fmp balance

* added `StocksOwnership` to `stocks.fa.own`

* added `InstitutionalOwnership` to `stocks.fa.ins_own`

* refactored `StocksOwnership` for `stocks.fa.own`

* cleanup

* refactored `TreasuryRates` for `fixedincome.treasury`

* reorder balance items

* fix polygon bs

* refactored `IncomeStatement` for `stocks.fa.balance`

* refactored base and types

* added static files

* cleanup

* cleanup

* refactored `CashFlowStatement` for `stocks.fa.cash`

* added `stocks/fa` static file

* black and ruff

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2023-08-02 18:47:20 +05:30
hjoaquim
b7fecb80e8 placeholders for other repository tests 2023-08-02 06:30:39 +01:00
hjoaquim
faf4837457 tests for repository/abstract 2023-08-02 06:28:15 +01:00
Henrique Joaquim
2066d7d4be Merge branch 'develop' into feature/openbb-sdk-v4 2023-08-02 05:37:20 +01:00
montezdesousa
07537199af Move hub api keys ts (#5267)
* move hub api keys ts

* json instead

* update contributing.md

* Update all_api_keys.json

---------

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2023-08-01 16:27:59 +00:00
teh_coderer
ae91a3f9b9 Hotfix economy/overview rates displaying as dates (#5269)
* fix: `economy/overview` rates displaying as dates

* Fix Test

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-08-01 16:05:29 +00:00
hjoaquim
35dd4ec3f1 black 2023-08-01 15:44:12 +01:00
hjoaquim
a7584c8a3d ruff 2023-08-01 15:01:29 +01:00
hjoaquim
a618e325ec tests for system settings 2023-08-01 14:52:32 +01:00
Danglewood
3b5fc53cc7 Adds details/image for installing C++ Build Tools (#5268)
* Adds details/image for installing C++ Build Tools

* Update installation_updates.md with screenshots

* Update installation_updates.md

Screenshots for MS C++ Build Tools
2023-08-01 13:41:21 +00:00
hjoaquim
a6b2c1fac7 ruff 2023-08-01 14:04:25 +01:00
hjoaquim
b1ecbc75e6 add tests for command_output 2023-08-01 13:08:14 +01:00
Diogo Sousa
fe1073da09 only allow setup for allowed system fields 2023-08-01 12:29:42 +01:00