Commit Graph

13 Commits

Author SHA1 Message Date
montezdesousa
a2e3f04711 Log custom headers (#5966)
* add custom headers

* fix: send on startup and defaults

* pylint

* unittests
2024-01-17 12:22:29 +00:00
Pratyush Shukla
e36ba9dc42 Custom deprecation message in API endpoints and Python commands (#5942)
* add custom deprecation message feature in routers

* add custom deprecation message feature in package builder

* using an actual DeprecationWarning instead

* fix tests

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
2024-01-11 10:20:04 +00:00
Henrique Joaquim
c3abc418a8 Improving Platform's import time (#5894)
* missing decorator

* missing optional statements

* us-gov to optional and right position

* removing redundant call

* lazy load mappings

* docstrings

* introducing the extension loader class

* misleading docstring

* using the extension loader on the router

* using the extension loader on the credentials

* docstrings

* lazy load of entry points

* checkout dev_install

* using the extension loader to get the entry points instead of recalling the function

* improved auth service and charting service

* using the extension loader on the registry

* typos

* adding properties to extension loader for easy access

* using the extension loader on the package builder

* avoiding circular imports by using forward references

* fix charting service tests

* test for the extension loader

* Update openbb_platform/core/openbb_core/app/model/credentials.py

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>

* Update openbb_platform/core/openbb_core/app/router.py

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>

* Update openbb_platform/core/openbb_core/provider/registry.py

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>

* adjustments

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
2024-01-10 15:23:14 +00:00
montezdesousa
bcb1f50b05 Refactor package builder (#5880)
* breakdown builder + remove black

* rebuild

* rebuild

* rebuild

* rename method

* format built code without black

* we still lint if it's available

* fix existing tests

* add linter tests

* add black to dev deps

* auto_build as instance method

* reorder methods

* typing

---------

Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
2023-12-13 12:13:43 +00:00
Henrique Joaquim
fce63afa6c Parameterize obbject.to_df with index and sort_by (#5877)
* Parameterize obbject.to_df with index and sort_by

* unit tests for obbject

* keep using the date as default to use on  basemode_to_df()

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2023-12-11 15:27:58 +00:00
Igor Radovanovic
c02f54536a Command Schema (#5874)
* POC

* Filter by provider

* pass base_app as parameter

* add typing + TODO

* fix some typing

* Fix unit tests

---------

Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
2023-12-11 15:11:00 +00:00
teh_coderer
da7886d0a7 Make Pro Fetchers async by replacing ThreadPoolExecutor with asyncio.gather (#5822)
* init

* Update helpers.py

* filter URL on raise

* polygon, fmp done, update cassettes

* updates

* cleanup

* revert tests for now

* Update discovery_filings.py

* Update helpers.py

* add `async` overload to `Fetcher.extract_data`

* update merged fred models

* tests, improve fred series

* Update insider_trading.py

* insider

* tests

* intrinio

* Update equity_historical.py

* implement abstract async extract on Fetcher, with simple switch

* cleanup

* Update helpers.py

* Update helpers.py

* fix fmp historical deprecated urls

* Revert "fix fmp historical deprecated urls"

This reverts commit 1a760a2473.

* fix fmp `index.market` 1day url missing query params

* Update test_fmp_market_indices_fetcher.yaml

* field fixes

* `extract_data_async` -> `aextract_data`, `async_request` -> `amake_request`

* `async_requests` -> `amake_requests`

* Update company_news.py

* add sort to index `integration` params

* add `client.py` tests

* Update equity_search.py

* Add lost v in platform api version string

* Resolve linter errors here and there

---------

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2023-12-08 14:41:37 +00:00
Henrique Joaquim
ff00312ec4 Hotfix/unskip tests (#5851)
* support for nested structures

* unskip extension map test

* unskip fred tests

* stockgrid tests

* adding pytest-assyncio

* fix query executor test

* package builder tests

* test query test with the asyncio marker

* asyncio marker

* fix extension map test: tests run with all extensions installed

* adding missing tests on user service

* fix update default test

* skipping allows version for non required extensions
2023-12-04 15:45:46 +00:00
Pratyush Shukla
ce14ee612f Fix nasdaq top retail working without a key resulting in an error (#5811)
* raise error if no api key found

* check for empty strings

* black

* fix test

* less verbose

---------

Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
2023-11-29 14:16:31 +00:00
montezdesousa
ed2fc04814 replace provider error by openbb (#5812) 2023-11-28 19:19:21 +00:00
montezdesousa
bb5e76ce5c Feature/general fixes (#5786)
* fix mypy

* import helper from source

* improve missing api key msg

* fix

* remove dynamic default

* rename rest_api_settings file

* add comment async/sync

* fix bug

* Revert "fix bug"

This reverts commit 7d9a0d2749.

* fix bug
2023-11-23 16:16:56 +00:00
teh_coderer
bc2fa9b3e1 Feature/platform async (#5763)
* init

* updates

* Update helpers.py

* tests

* Update helpers.py

* Update command_runner.py

* Update helpers.py

* deps

* Update helpers.py

* only check `async` if model is specified, revert `qa`, `ta`, and `econometrics`

* merge issues

* Update command_runner.py

* remove typing and type: ignore

* fix helpers typing

* add aiohttp to core deps, remove from charting

* remove @overload

* ruff

* import helper from source

* helpers typing+pylint

* black

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
2023-11-23 13:01:56 +00:00
Henrique Joaquim
4400cd9a8f Merge provider and core into core (#5774)
* small changes - moving provider inside the core

* uptade readme

* lint

* remove old provider readme

* leftovers

* refactor website examples

* ruff

* fix nox

* relock

* fix fails_to_deliver headers

* fix for tests that have renamed endpoints

* fix discovery

* removed test for renamed endpoint

* fix broken syntax - test_search_financial_attributes

* fix cash/income/balance

* fix derivatives tests

* fix etf tests

* fix news tests

* fix regulators

* black

* wrong test param

* sort equity gainers/losers by percent

* platform markdown generation import

* Hotfix/fix int tests core merge (#5779)

* removing tests on old endpoint

* removing visualization on old endpoint

* fixing equity tests

* fixing examples

* fix news tests

* fix index test

* example

* add comments

* example

---------

Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
2023-11-22 13:48:01 +00:00