Commit Graph

9 Commits

Author SHA1 Message Date
montezdesousa
825b8955df Set guest by default and put authentication behind environment variable (#4197)
* small bug

* small bug on routines list

* guest as default

* limit logout to users2

* simpler this way

* add logout

* move logout to account & add env var

* put authentication under env var

* fix tests

* remove login

* remove openbb vars on login

* ruff

* revert .toml

* Delete Icon

* Update .env

* fix sdk guest not loading keys

* ruff

* remove press enter & --login

* ruff

* move env load

* load env

* move dot env loading to terminal.py

* fix user sdk login mixing .env with user

* now it works

* fix reset

* fix tests

* ruff

* Login on the SDK using the OpenBB Personal Access Token (#4206)

* openbb key on keys menu

* adding sdk endpoints

* adding login via token to the sdk

* base url

* rename to personal access token

* added docstrings and examples

* openbb is special

* removing extra break line

* making keys working with the personal access token

* resolve conflicting tests

* Revert "resolve conflicting tests"

This reverts commit 2fca2c0ec3.

* using custom requests

* tests

* tests

* tests

* using process_session_response instead

* rewriting some tests

* Fix sdk guest not loading keys (#4207)

* fix sdk guest not loading keys

* ruff

* remove comment

* tests

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* test record mode vcr none

* remove yes from tests yml

* specify modules to reload

* try disable check api

* UPdate spec file

* Small stocks bug

* avoid reloading in test mode

* will this work?

* skip session tests

* try with env var as well

* mock sdk reload

* pylint

* bump poetry on python 3.8

* adapt to python 3.8

* adapt to python 3.8 remaining tests

* Tests : update cassettes

* Fix linting

* Makes login conditions simpler

* Tests : txt

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Chavithra <chavithra@gmail.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
2023-02-14 09:56:03 +00:00
James Maslek
2a7ec56000 Sunset some dependencies (#4215)
* Sunset some dependencies

* Mypy

* Last iex refs

* remove ref to investpy

* tests

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
2023-02-13 08:54:54 -05:00
montezdesousa
1186939884 Fix keys menu: tokenterminal & shroom bug fix (#2781)
* fix tikenterminal and shroom

* add unittests

* add the 2 keys to api
2022-10-11 10:16:28 +01:00
montezdesousa
732a614937 Allow users to change api keys through OpenBB SDK (#2642)
* set fred keys through api

* linting

* doc change

* expose api keys dict

* allow optional persistency of api key change

* black

* place decorators

* add keys paths

* av and fmp keys

* some fixes

* rewrite av, fmp, fred cassettes

* quandl key

* polygon key

* rewrite polygon cassette

* news and tradier

* cmc key

* change some docstring

* change some docstring

* filtered keys dict on mykeys

* simplify mykeys collection

* revert arg to persist

* finnhub

* iex key

* reddit key

* reddit docstring

* check for prefix before removing

* glassnode key

* glassnode virtual path

* bitquery keys

* twitter key

* robinhood key

* degiro keys

* oanda key

* binance keys

* si key

* coinbase key

* refactor btcrb dates and logic

* walert key

* coinglass key

* regenerate cassettes

* cpanic keys

* ethplorer keys

* replace ouput status failed msg

* smartstake keys

* gitub keys

* messari keys

* eodhd keys

* santiment keys

* remove unused imports

* typo formatting test

* remove forbidden arg

* fix btcrb test

* fix test import

* revert cassette changes

* fix more tests

* fix last failing

* black

* try to change status to int code

* change status to int

* first try at keys controller refactoring

* fix some tests accordingly

* display msg on set

* change some vars

* remove elifs

* add progress bar and remove duplicate key check

* add mykeys and refresh to menu

* remove unused import

* change mykeys output to df

* remove check keys from keys ctrl tests

* update test split to new structure

* reduce duplicate code

* upper case

* change var name

* rename mykeys df cols

* add keys integrations tests

* add mykeys test to keys controller

* fix mykeys

* fix wrong eodhd var name

* pylint

* test_set_key

* black

* patch dotenv kinda

* fix mypy

* remove refresh

* filter mykeys df

* filter mykeys df

* update integration tests

* first unit test for set api key

* add 2 more test cases to fred

* add persist test to fred unittest

* add av unittest

* add polygon unittest

* generate av cassettes

* add unittests av, fmp, quandl, polygon, fred

* change si token to key

* forgot controller func

* unittest: news, tradier, cmc, finnhub, iex, bitquery

* add si unittest

* update eodhd key name

* add unittest: walert, glassnode, coinglass, cpanic, ethplorer, github, messari, eodhd, santiment

* black

* add reddit unittest

* refactor unittests to handle multi args

* regenerate cassettes

* add more unittests

* add degiro, oanda and rh unittest

* generate oanda records

* fix rh and degiro unittest

* fix oanda unittest

* black

* flake8

* fix si controller test

* move tmp

* pylint

* fix av test

* fix fmp key check

* rewrite fmp

* rewrite oanda output

* fix quandl check

* rewrite expected

* supress logger exception

* fix iex cloud key

* remove iex warning

* fix coinglass check key

* cpanic fix

* regenerate cpanic cassettes

* flake8

* fix smartstake keys check

* regenerate expected output

* fix eodhd

* try at binance

* black

* fix controller tests

* pylint

* disable warning

* flake

* add option to show keys

* add Enum to model

* regenerate test output

* update contributing

* flake

* fix type hint

* remove status msg dict

* pylint

* regenerate and remove unecessary cassettes

* remove duplicate return

* supress traceback

* remove unused imports

* update some docstrings

* add todo

* add export option to mykeys

* minor change

* refactor color scheme

* update contributing

* update contributing

* regenerate cassettes

* fix check output

* small msg change

* small details

* rewrite some tests

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
2022-10-08 12:30:23 +02:00
Colin Delahunty
5bc7bc070e Tests over API Best Practices (#2344)
* Started new tests

* Added special function

* Improved dict

* Finished new test

* Got bad functions to 75

* Got bad func to 73

* Bad func down to 60

* Bad func down to 50

* Bad func down to 35

* Got bad func to 30

* No more bad functions

* Added tests

* Added fix

* Fixed some tests

* Fixed some tests

* Fixed some tests

* Fixed some tests

* Added tests to CI

* Fixed CI tests

* Fixed CI tests

* Imrproved CI tests

* Fixed reports

* Fixed reports

* Added stuff

* Removed CI

* Fixed

* Fixed some typing'

Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
2022-09-22 22:31:46 +01:00
soggyomelette
824373cad1 Adds santiment to keys menu in response to #2224 (#2238)
* 'Adds santiment key in keys_controller.py and adds tests for santiment and messari keys'

* fix linting

* fix linting

* Fixed \n issue

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: colin99d <colin99delahunty@gmail.com>
2022-08-05 10:53:44 -04:00
Colin Delahunty
37e2597bb4 Added fixes for coinbase (#2202)
* Added fixes for coinbase

* Fixed tests

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-07-29 19:20:34 +01:00
didierlopes.eth
385d12803a Add bottom toolbar hint feature flag - helps new users in getting started (#1873) 2022-05-26 16:43:04 +01:00
Colin Delahunty
8994168e45 openbb_terminal tests: coverage (61% -> 65%) (#1664)
* Attempting more tests

* Began adding tests

* Added keys controller tests

* Added tests for settings and econometrics controller

* Prevented tests from changing .env files

* Fixed issues with tests

* Added econometrics tests

* fixed pylint issues

* Added folder

* Added QA tests

* Fixed qa tests

* Fixed qa tests

* Fixed tests

* Removed skip

* Added mock to tests

* Update helper_funcs.py

Fix any windows path issues

* Update helper_funcs.py

oops forgot import lol

* Skipped display_hist

* expanded tests

* Maybe mocked matplotlib everywhere

Co-authored-by: teh_coderer <me@tehcoderer.com>
2022-04-19 20:44:15 -04:00