Commit Graph

6721 Commits

Author SHA1 Message Date
montezdesousa
67cc3bb3c8 return None instead of nan, nan breaks API (#5475) 2023-09-25 12:46:26 +01:00
Pratyush Shukla
58232f34cc fix field types 2023-09-22 19:28:16 +05:30
Pratyush Shukla
24f8baaed7 set Optional alpha vantage provider fields 2023-09-22 18:28:32 +05:30
montezdesousa
b641bb05ca Release/4.0.0a2 (#5463)
* patch package version

* poetry lock provider

* update toml files to a2

* update sdk readme and toml

* poetry lock core

* bulk lock extensions/providers

* rebuild with new versions

* poetry lock openbb

* move version back to dev
2023-09-22 12:21:36 +01:00
Diogo Sousa
3237368b3b fix test package builder 2023-09-22 11:20:38 +01:00
Diogo Sousa
a82574ff45 black 2023-09-22 10:55:31 +01:00
montezdesousa
d0862a9ea7 Include extensions in package __repr__ (#5462)
* include extensions in package repr

* rename menus to routers

* move docstring

* doc typo

* rename CLASS to ROUTER
2023-09-22 10:08:09 +01:00
Danglewood
95d7392cb0 Hotfix/fix yfinance sdk4 (#5455) 2023-09-22 10:27:09 +05:30
Diogo Sousa
2d2592df45 readme typo 2023-09-21 16:32:28 +01:00
Diogo Sousa
55cf6eeaba revert toml version changes to match pypi 2023-09-21 16:09:59 +01:00
Diogo Sousa
147724301d avoid readme confusion with v3 2023-09-21 16:07:28 +01:00
Diogo Sousa
818355060f fix quandl readme 2023-09-21 14:56:20 +01:00
Diogo Sousa
e5e22a87ca grab version from constants 2023-09-21 14:46:58 +01:00
Danglewood
de310ea7f4 Hotfix/fix-quandl-regression (#5461)
* fix quandl regression

* Update cot_search.py

* return`List[QuandlCotSearchData]` in Fetcher

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
2023-09-21 15:21:04 +05:30
Diogo Sousa
0fefe7b644 other typo 2023-09-21 10:35:54 +01:00
Diogo Sousa
f774a9767d typo 2023-09-21 10:35:04 +01:00
Diogo Sousa
0fc3185139 make extension test less verbose 2023-09-21 10:34:12 +01:00
montezdesousa
4f4e941267 Hotfix/ext map test (#5459)
* add tests and rebuild

* remove files before rebuild to avoid leftovers

* replace NoneType with None

* docstring
2023-09-21 09:17:40 +01:00
Henrique Joaquim
4851da1945 add try except on metadata computing (#5456) 2023-09-20 19:11:24 +01:00
Pratyush Shukla
d60befa328 Parse object using parse_obj from Pydantic 2023-09-20 23:40:36 +05:30
Henrique Joaquim
826d0136f2 Metadata input scaling (#5448)
* adding scalling of arguments in metadata

* adjustments + tests for metada

* tests

* minor fix so we don't get repeated columns

* serie to series

* ruff and one more test

* docstring formatting
2023-09-20 15:46:31 +01:00
Diogo Sousa
3aac0baa8b rebuild package 2023-09-20 12:51:40 +01:00
Danglewood
264feb04a4 Hotfix/fix-cboe-regressions (#5447)
* fix cboe regressions

* Lint

* fixes intraday dates

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
2023-09-20 12:44:54 +01:00
montezdesousa
2794b5d657 Update readme (#5449)
* update readme

* typos

* installation

* keys

* example

* minor fix

* api keys

* eg

* Update CONTRIBUTING.md

* openbb hub

* minor adjustments

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
2023-09-20 10:37:22 +01:00
montezdesousa
4660401974 Hotfix/tests passing (#5452)
* replace string dates with datetime in fetcher tests

* lint
2023-09-20 10:31:44 +01:00
Theodore Aptekarev
ac5bcc5e9a Fix linting errors 2023-09-20 10:46:23 +02:00
Pratyush Shukla
6ed837d24c Fix bugs in the provider models and standard models (#5427)
* added `StockNews` to yfinance

* make `symbol` optional in `IncomeStaementData`

* added financial statements

* intrinio provider package init

* added `StockEOD` model

* added `ForexPairs` model

* added `StockNews` model

* added `GlobalNews` model

* added Fetchers for models

* static files

* cleanup

* fetch all pages in intrinio

* static

* refactored `StockQuote` standard model

* refactored `StockQuote` fmp model

* added `StockQuote` for Intrinio

* static files

* Adding AV and StockEOD (#5365)

* boilerplate for av provider

* adding stock eod for av

* ruff n black

* changing available functions for better ux

* docstring

* move debug_mode out of system settings (#5366)

* move debug_mode out of system settings

* Update router.py

* update readme with debug mode

* dev_mode hub service + openbb_ namespace to Env

* update readme

* copy env to avoid problems w global state

* Linting

* rebuild python interface + fix py38

* Add @classproperty to fetcher for nested return types (#5371)

* add classproperty to fetcher and cpi.py

* type var bound

* validate model in registry map

* better exception msg

* fix fred mypy and add data_type

* typo

* specific model validation

* specific model validation

* reformat error msg

* better

* msg

* add black & ruff to core deps

* supress linter errors if not debug mode

* pylint + regen fixedincome

* py38 compat

* fix bug getting provider for placeholder cmds + ruff

* Revert "fix bug getting provider for placeholder cmds + ruff"

This reverts commit 1328c0b041.

* ruff

* avoid bug for placeholder and no provider

* expose available providers in provider interface

* poetry toml to match ci ruff version

* first we ruff and then we black

* add back noqa: E501 to docstrings inside package

* use singleton for provider interface: same functionality (#5372)

* use singleton for provider interface: same functionality

* ruff

* docstring typo

* update readme with tuna reference

* move to correct readme

* Merge

* Some error handling (#5357)

* Removed prints (#5367)

* Removed prints

* FIxed typing

* FIxed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fix

* Reverted stuff

* Feature/move package (#5374)

* move package to openbb_sdk

* avoid test writing files

* black

* revert toml changes, will do it in another PR

* run build in a separate process

* change error msg

* rename func

* change msg

* rename func + msg

* change param name

* update readme

* lazy load some deps

* Update README.md

* modules is better

* doc

* ruff

* pylint

* fix autocomplete (#5383)

* Core tests (#5375)

* makeing the function easier - @montezdesousa pls review this commit

* improve update_provider_choices readbility

* unncessary classmethod

* command runner tests

* fixing wrong attribution

* some tests for the charting manager

* changing fetcher and models to have a shorter name

* @the-prax suggestions

* fixing references to av

* making function a private fild so the user don't access it

* unbreaking changes

* Improve snake_case generation

* adding av to pyproject.toml

* stating the function as a private field while keeping validation for function specific fields

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>

* Rename EOD to Historical in code and files (#5395)

* rename EOD to Historical in providers

* renamed EOD to Historical in sdk/provider

* rename _eod to _historical in standard_models

* rename _eod to _historical in providers directory

* cleanup

* rename EOD to Historical in extensions

* static

* Revert "rename EOD to Historical in extensions"

* rename EOD to Historical in relevant extensions

* fix spelling in init

* static

* linting

* intrinio y u alone

* so sorry intrinio

* static

* ruff

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>

* feature/quandl-provider: Add Quandl provider to SDK-V4 (#5339)

* adds futures term structure from cboe

* Linting

* error handling for empty response

* codespell

* rename term_structure --> curve

* unused imports

* Improve import speed for CBOE

* add quandl provider

* doc strings

* black

* moves series id definitions to a separate file

* black

* add pandas dependency

* fix pyproject.toml

* refactor to load nothing on runtime

* black

* futures_curve model

* fix docstring

* static directory file no longer needed

* helper for european index constituents

* remove abstract request function which gets rid of Numpy import

* remove Numpy from dependencies

* add Europe class to helpers and European index data

* symbol.upper()

* add european_index to economy module

* add US indices in

* adds cboe as provider for major_indices_eod

* enforce snake_case for FMP columns

* add

* fix FMP non-intraday

* add european_index_constituents

* black

* update docstring in economy_router

* add cot_search() and makes helper function for querying the Commitment of Traders Reports

* refactor quandl

* docstring

* refactor cboe provider

* black

* merge feature/openbb-sdk-v4 into branch

* add Intrinio options chains

* codespell exception

* remove manual camelCase conversion in FMP StockEOD and MajorIndicesEOD

* fix polygon - MajorIndicesEOD

* fix FMP intraday stripping the time

* more codespell

* put validators back - fmp

* enhance yFinance indices

* timestamp to str

* yahoo index - empty no breaky

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* hotfix intrinio

* better cboe stock_info error handling

* fix merge

* handling for if ^ in symbol

* make alpha_vantage work

* fix yfinance intraday - stock historical

* fix yfinance major_indices_historical

* fix yfinance crypto_historical

* fix yfinance forex_historical

* fix yfinance crypto and forex

* economy router and package rebuild

* black

* add multi-ticker support for cboe stock_historical

* use yf_download for crypto and forex instead of yf(Ticker).history()

* potentially allow multiple tickers

* feature/sdk v4 bug fixes - Fixing some bugs (#5401)

* added `StockNews` to yfinance

* make `symbol` optional in `IncomeStaementData`

* added financial statements

* intrinio provider package init

* added `StockEOD` model

* added `ForexPairs` model

* added `StockNews` model

* added `GlobalNews` model

* added Fetchers for models

* static files

* cleanup

* fetch all pages in intrinio

* static

* refactored `StockQuote` standard model

* refactored `StockQuote` fmp model

* added `StockQuote` for Intrinio

* static files

* Adding AV and StockEOD (#5365)

* boilerplate for av provider

* adding stock eod for av

* ruff n black

* changing available functions for better ux

* docstring

* move debug_mode out of system settings (#5366)

* move debug_mode out of system settings

* Update router.py

* update readme with debug mode

* dev_mode hub service + openbb_ namespace to Env

* update readme

* copy env to avoid problems w global state

* Linting

* rebuild python interface + fix py38

* Add @classproperty to fetcher for nested return types (#5371)

* add classproperty to fetcher and cpi.py

* type var bound

* validate model in registry map

* better exception msg

* fix fred mypy and add data_type

* typo

* specific model validation

* specific model validation

* reformat error msg

* better

* msg

* add black & ruff to core deps

* supress linter errors if not debug mode

* pylint + regen fixedincome

* py38 compat

* fix bug getting provider for placeholder cmds + ruff

* Revert "fix bug getting provider for placeholder cmds + ruff"

This reverts commit 1328c0b041.

* ruff

* avoid bug for placeholder and no provider

* expose available providers in provider interface

* poetry toml to match ci ruff version

* first we ruff and then we black

* add back noqa: E501 to docstrings inside package

* use singleton for provider interface: same functionality (#5372)

* use singleton for provider interface: same functionality

* ruff

* docstring typo

* update readme with tuna reference

* move to correct readme

* Merge

* Some error handling (#5357)

* Removed prints (#5367)

* Removed prints

* FIxed typing

* FIxed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fix

* Reverted stuff

* Feature/move package (#5374)

* move package to openbb_sdk

* avoid test writing files

* black

* revert toml changes, will do it in another PR

* run build in a separate process

* change error msg

* rename func

* change msg

* rename func + msg

* change param name

* update readme

* lazy load some deps

* Update README.md

* modules is better

* doc

* ruff

* pylint

* fix autocomplete (#5383)

* Core tests (#5375)

* makeing the function easier - @montezdesousa pls review this commit

* improve update_provider_choices readbility

* unncessary classmethod

* command runner tests

* fixing wrong attribution

* some tests for the charting manager

* changing fetcher and models to have a shorter name

* @the-prax suggestions

* fixing references to av

* making function a private fild so the user don't access it

* unbreaking changes

* Improve snake_case generation

* adding av to pyproject.toml

* stating the function as a private field while keeping validation for function specific fields

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>

* Rename EOD to Historical in code and files (#5395)

* rename EOD to Historical in providers

* renamed EOD to Historical in sdk/provider

* rename _eod to _historical in standard_models

* rename _eod to _historical in providers directory

* cleanup

* rename EOD to Historical in extensions

* static

* Revert "rename EOD to Historical in extensions"

* rename EOD to Historical in relevant extensions

* fix spelling in init

* static

* linting

* intrinio y u alone

* so sorry intrinio

* static

* ruff

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>

* feature/quandl-provider: Add Quandl provider to SDK-V4 (#5339)

* adds futures term structure from cboe

* Linting

* error handling for empty response

* codespell

* rename term_structure --> curve

* unused imports

* Improve import speed for CBOE

* add quandl provider

* doc strings

* black

* moves series id definitions to a separate file

* black

* add pandas dependency

* fix pyproject.toml

* refactor to load nothing on runtime

* black

* futures_curve model

* fix docstring

* static directory file no longer needed

* helper for european index constituents

* remove abstract request function which gets rid of Numpy import

* remove Numpy from dependencies

* add Europe class to helpers and European index data

* symbol.upper()

* add european_index to economy module

* add US indices in

* adds cboe as provider for major_indices_eod

* enforce snake_case for FMP columns

* add

* fix FMP non-intraday

* add european_index_constituents

* black

* update docstring in economy_router

* add cot_search() and makes helper function for querying the Commitment of Traders Reports

* refactor quandl

* docstring

* refactor cboe provider

* black

* merge feature/openbb-sdk-v4 into branch

* add Intrinio options chains

* codespell exception

* remove manual camelCase conversion in FMP StockEOD and MajorIndicesEOD

* fix polygon - MajorIndicesEOD

* fix FMP intraday stripping the time

* more codespell

* put validators back - fmp

* enhance yFinance indices

* timestamp to str

* yahoo index - empty no breaky

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* hotfix intrinio

* better cboe stock_info error handling

* fix merge

* handling for if ^ in symbol

* make alpha_vantage work

* fix yfinance intraday - stock historical

* fix yfinance major_indices_historical

* fix yfinance crypto_historical

* fix yfinance forex_historical

* fix yfinance crypto and forex

* economy router and package rebuild

* black

* add multi-ticker support for cboe stock_historical

* use yf_download for crypto and forex instead of yf(Ticker).history()

* potentially allow multiple tickers

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* no reset index on yfinance crypto/forex

* added missing index search

* `stock_info` removed merge symbols

* static

* `\%` to `%` in FMP historical models

* removed fields

* set `period` and `cik` to `Optional`

* fix yfinance financial statements

* cleaned duplicate code

* static

* static

* fixed yfinance stock news

* improved yfinance stock news

* cleanup

* set `date` field type to `datetime` (again)

* add date validator

* `BaseSymbol` eliminated

* linting

* Add Quandl functions to economy router

* YFinance Statement Bugs

* Fix/provider-bugs-intrinio: fix bad API key response for options symbols (#5419)

* fix bad api key response for symbol directory

* move model functions into Fetcher class as static methods

* make ruff and black play together

* description fix

* move options tickers and expirations to helpers

* vw->vwap

* Remove confusing columns in cpi model

* `news.globalnews` has `limit` set as standardized param

* intrinio stocks historical fetch data robustly

* fix too many .reset_index()

* ruff

* fixed standardization

* cleanup

* `stocks.news` params standardized

* polygon `StockNews` model revamped

* intrinio `StockNews` model params standardized

* `link` and `final_link` set as `Optional` to fix validation errors

* benzinga cleanup

* linting

* set `type` to `Optional`

* removed extra cash_flow file

* `FinancialStatementQueryParams` eliminated

* Polygon `StockHistorical` returns all results

* `PolygonFundamentalQueryParams` eliminated

* Added source in doc

* `^` needed in symbol for FMP

* fix validation error for negative eps values

* change to latest v2 params

* correct descriptions

* removed `stocks.dd` and moved `sec` to `fa`

* `obb.news.globalnews` revamped

* `stocks.news` revamped

* `list` to `List`

* adding List instead of list

* `options.chains` Intrinio cleanup and standardization

* linting

* cleanup intrinio

* static

* bump package versions

* fixed date validation errors for yfinance

* YFinance updates

* Fix FMP tests

* Fix Intrinio

* Re-record Benzinga

* Fix Polygon fetchers and tests

* Re-record and fix CBOE

* Re-record and fix Quandl

* Some FMP fixes and hardcoded tests

* fmp stock ownership refactor and fix test

* fix fmp treasury rate `transform_query` to pass test

* fix fmp dividend calendar `transform_query` to pass test

* fix fmp historical models `transform_query` to pass test

* Fix Polygon fetchers and tests

* Fix Intrinio test and fetcher

* Re-record and fix YFinance

* Fred

* Update test generator

* CBOE cleanup

* Fix tests (again)

* static

* fix more tests

* fix yfinance tests

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-09-20 02:00:44 +05:30
montezdesousa
848edee368 Limit number of characters in docstring types (#5438)
* package_builder changes

* truncate only the mandatory args

* minor fix
2023-09-19 16:16:29 +02:00
Igor Radovanovic
fc9d7522ac Merge pull request #5435 from OpenBB-finance/feature/auto-test
Feature/auto test
2023-09-18 20:44:22 +02:00
Igor Radovanovic
ceff6b9745 Final fixes 2023-09-18 20:31:02 +02:00
hjoaquim
4ee4646f5b tests to check if all providers have tests and if each fetcher also have tests cc @IgorWounds 2023-09-18 19:00:09 +01:00
hjoaquim
9693a4520c moving utils inside the tests folder 2023-09-18 17:36:19 +01:00
hjoaquim
b7adfebe9c readme 2023-09-18 17:34:12 +01:00
Igor Radovanovic
f4e9a670a2 Improvements 2023-09-18 16:00:33 +02:00
Igor Radovanovic
2ae51ceef9 Fix assertions 2023-09-18 15:46:57 +02:00
Igor Radovanovic
0f160b26f5 Docstring 2023-09-18 15:32:18 +02:00
Igor Radovanovic
3eb3619726 Cleanup 2023-09-18 15:30:52 +02:00
Igor Radovanovic
959aef83cc Improvements
Co-authored-by: @hjoaquim
2023-09-18 15:29:33 +02:00
Igor Radovanovic
9c553a0b55 Fix 2023-09-18 14:45:25 +02:00
Igor Radovanovic
2e95b43f77 Improvements 2023-09-18 13:37:23 +02:00
Igor Radovanovic
c2021fff49 toml updates 2023-09-18 13:05:37 +02:00
Igor Radovanovic
62e441fc29 Update nox 2023-09-18 12:57:05 +02:00
Igor Radovanovic
36cdc34c63 Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> 2023-09-18 12:48:58 +02:00
Igor Radovanovic
2729ba59ac Update nox 2023-09-18 12:41:16 +02:00
Igor Radovanovic
649ef7438a Update nox 2023-09-18 12:12:35 +02:00
Igor Radovanovic
fea3b40cc9 Lint and init 2023-09-18 12:12:21 +02:00
Igor Radovanovic
e84fd09e89 Re-record and improve 2023-09-18 12:06:52 +02:00
Igor Radovanovic
ce89d3d430 Test nox 2023-09-18 11:29:33 +02:00
Igor Radovanovic
4ae4aab072 Test nox 2023-09-18 11:29:21 +02:00
hjoaquim
2b0f68798b Merge branch 'feature/openbb-sdk-v4' into feature/auto-test 2023-09-18 09:41:02 +01:00