Commit Graph

46 Commits

Author SHA1 Message Date
teh_coderer
f8fb5937f6 Docs / only display results for current platform (#6017)
* Update index.js

* Update index.js

* yfinance

* tzcache no longer exists

* fixxy

* ruff

---------

Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Andrew <andrew.kenreich@gmail.com>
2024-02-06 16:49:48 +00:00
Colin Delahunty
141dd68e68 Removed prints (#5367)
* Removed prints

* FIxed typing

* FIxed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fixed typing

* Fix

* Reverted stuff
2023-08-23 18:40:31 +00:00
Colin Delahunty
1ca7fd9beb Improves the settings/userdata command, and upgrade ruff (#5359)
* Began the fax

* Bumped ruff

* Fixed a BUNCH of ruff errors

* Fixed a lot of ruff errors

* Simplify if statements

* Fixed black

* Updated some stuff

* Updated some stuff

* A lot more ruff fixes

* Added a fix

* Added a fix

* Fixed mypy

* Fixed some stuff

* Reverted one thing

* Small fix

* Small fix

* Small fix

* Added fix

* Added fix

* Update requirements
2023-08-22 20:11:48 +00:00
teh_coderer
979930b9e8 feature / Refactor Interactive Charts to React (#4941)
* init

* fix tables

* add shortcuts

* handle svgs

* test

* test2

* test3

* Update loggers.py

* Update sdk_helpers.py

* Update loggers.py

* Update loggers.py

* updates

* updates

* update

* handle add text high/low for candlestick traces when updating

* adding save overlay to tables

* maybe fix

* prints

* asdf

* working

* working

* removing prints

* update

* fix no figure title text

* add trace labels space

* download finished popup for MacOS

* bump pywry

* update

* update table

* Update plotly_helper.py

* only format numbers over 10_000 on tables

* Delete generate_index.py

* turn off logs in generations

* update tables

* bump pywry, fix tables, added ichimoku ta indicator

* Update backend.py

* mypy

* update tables

* updates

* juan more

* tables

* test

* bump pywry

* bump pywry

* Update loggers.py

* test

* fixing some formatting

* add update button to indicators dashboard

* fix oecd dates to be full dates

* prepare charts/tables for pywry update

* Update poetry.lock

* Update finviz_view.py

* tests

* tests

* tests

* tests

* testss?

* tests

* Create test_call_func[call_sec-nasdaq_view.sec_filings-other_args37-called_with37].yaml

* testtss please

* Update loggers.py

* testss

* `with open(newline="\n")`

* tests

* tests -__-

* why

* Revert "`with open(newline="\n")`"

This reverts commit 554e0f53f4.

* Revert "why"

This reverts commit 89f1d9b823.

* Revert "tests -__-"

This reverts commit a9c694ae96.

* Revert "tests"

This reverts commit 5463249498.

* whelp

* .

* rename `streamlit.py` -> `streamlit_run.py`,  bump pywry/finviz/streamlit

* Update backend.py

* update

* Revert "update file"

---------

Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-05-11 17:38:12 +00:00
Henrique Joaquim
13a91af400 Remove references to environment variables (#4633)
* removing references to test_mode as env variable

* removing references to os.getenv

* adding functions to change system properties

* removing references to env

* introducing set_system_variable and removing change_logging_suppress function

* removing change_test_mode and change_debug_mode

* removing change_log_collect

* adjusting config_terminal and generate_sdk

* generating the sdk

* removing unused imoports

* introducing DISABLE_STREAMLIT_WARNING

* removing load_env_vars

* test_print_help test

* sync tests

* rewrite tests

* setting the auth to True as default

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
2023-04-03 16:22:41 +00:00
Henrique Joaquim
937d033160 Adds BaseModel and SystemModel (#4491)
* adding BaseModel

* initial version of the system model

* creating setup functions and removing constants from config_terminal

* removing log_supress const

* fix test

* merge

* system handler

* fix import

* centralized configs setup

* repr to use the BaseModel

* updating i18n dict location

* ignoring warning on wrong type-var

* ruff

* Update openbb_terminal/core/models/system_model.py

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

* Update openbb_terminal/core/models/system_model.py

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

* import literal

* loading env files before the plot backend is called

* fix tests/openbb_terminal/test_terminal_helper.py

* tests need to have i18n initialized

* fix seeking_alpha tests

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
2023-03-22 15:00:58 +00:00
montezdesousa
475ebb5acd [WIP] Migrate user, feature flags and configurations to dataclass (#4309)
* implement user and change is guest

* replace User methods

* move remaining functions to user

* fix bug

* portfolio test

* fix tests

* fix tests

* uncomment skip

* ruff

* start credentials model implementation

* change deault structure

* refacto quandl

* change default struct and file names

* bug

* start using global user

* add comments

* move update flair

* change cfg references in keys model

* reddit & fmp

* refactore additional keys

* remaing config keys

* remove unsude imports and fix hub keys

* ruff

* fix line too long

* unblock unittests

* fix keys model tests

* remove os patch

* fix account controller tests

* fix account controller tests

* fix account model

* account fixed

* fix user tests

* User Model

* User Model

* User Model

* Move session folder

* User Model : grouping the models

* User Model : fix bugs

* Config Plot + bug fix

* User Model : Refactoring plots

* Feature flags

* Remove dup

* clean comments a fix some vars

* fix feature flags controller

* refactor obbff from settings controller

* refactor a bunch of obbff variables

* fix bug blocking terminal

* fix integration tests

* refactor controllers with obbff

* refactor remaining ffs

* remove comments

* log not started

* mispelled variable

* set current user on local model

* User Model : moving files + updating

* User Preferences

* User : Refactor is_guest function + bug fix

* User : refactor is_guest function

* Fix conftest.py

* remove lost obbffs

* typo on fileoverwrite

* Plot config: move variables and start plot dpi

* User : tests

* refactor plot dpi references

* remove plot dpi imports

* refactor some config terminal leftover

* /account/sync : fix bug

* remove configs reload

* start path refactor

* installation paths vs user paths

* remove cfg_plot

* Tests : User Refactoring

* user prefix only for preferences

* user prefix only for preferences

* move user paths

* remove comment

* update apply remote configs

* fix tz not updating

* save some copys

* small fix

* create interface for credentials and preferences

* wrong docstrings fixed

* ruff core

* fix some pref setting

* login is better

* ruff

* ruff

* remove Literal

* add small comment

* Tests : User Refactoring

* Credentials Model : add DataBento

* Fix helper_funcs

* Fixing code

* Tests : fixing

* User Model : freezing the models

* Fixed Income + Databento

* Tests : fixing keys

* black

* ruff

* Tests : user model

* Tests : user model

* Fix linting

* Fix linting

* Linting

* Linting

* Fixing code and tests

* Fix tests

* mypy

* SDK

* Clean ruff cache

* Fix syntax issue

* Update fred_view

* Black

* Linting

* Update code

* Update tests

* Linting

* Linting

* Tests

* Black

* Linting

* Linting

* Mock os.listdir to avoid looking for file that doesnt exist

* Mock options paths

* lint

* Tests : fix

* Code : update

* Tests + Linting

* Tests

* Ruff

* Code : update

* Tests

* Code : update

* Fix workflow

* Code : update

---------

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: luqazino@gmail.com <luqazino@gmail.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-03-05 00:37:19 +01:00
teh_coderer
602cfa2c8c [POC] Plotly Backend (#3941)
* Update portfolio_view.py

* mypy 1.0 test

* Update helpers.py

* black

* ruff

* Update thought_of_the_day.py

* isort

* Update portfolio_view.py

* Update business_insider_view.py

* funds,bt,ca,fa view updates

* economy,etf,futures view updates

* econometrics regression

* mypy

* reports notebooks, PlotlyTA class adjustments, crypto finbrain view

* crypto views updates

* crypto views done?, ba, econometrics, funds, reports

* update docstrings

* Update sec_view.py

* portfolio reports

* Update equity.ipynb

* ruff

* mypy + equity reports

* Update yahoo_finance_view.py

* Update economy_controller.py

* clean up returns

* mypy

* finished dashboards/reports templates

* update some tests

* Update common.py

* Update account_controller.py

* Update banner.txt

* update tests

* tests

* Update helpers_denomination.py

* tests

* tests

* finished tests, refactor add_histplot/add_corr_plot

* ruff

* Update backend.py

* mypy

* Update backend.py

* pywry linux libs for tests

* pywry version bump

* OpenBBFIgure import changes

* Update business_insider_view.py

* Update backend.py

* tests

* bump pywry version

* forecast plot_explainability converted to plotly

* Update helpers.py

* tests

* Update helpers.py

* tests

* Update helpers.py

* Update helpers.py

* default plotly annotation `showarrow` to false

* Update backend.py

* fixes

* Update poetry.lock

* docker

* Update openbb.dockerfile

* up

* Update style.css

* bump pywry version

* Update unit-test.yml

* Update unit-test.yml

* figure to image/pdf export

* requirements txt files, pywry version bump

* mypy, pylint

* cleanup

* Update covid_view.py

* Update helper_funcs.py

* Update backend.py

* updates

* Update backend.py

* Update backend.py

* bump pywry version

* Update poetry.lock

* Update trailmap.py

* update reports

* Update custom_indicators_plugin.py

* Update momentum_plugin.py

* equity report

* reqs files

* Update fred_view.py

* ruff

* Update po_view.py

* bump pywry version

* reqs txt files

* fix installer icons for mac

* test updated torch/darts/pyinstaller on mac

* Update dashboards_controller.py

* Update terminal.py

* Update terminal.spec

* Update terminal.spec

* test

* Update poetry.lock

* Report adjustments, improved dashboard subprocesses termination

* pylint

* Update plotly_helper.py

* Update plotly_helper.py

* pylint

* revert darts

* test

* test

* fix

* improve shap scatter plot

* Update helpers.py

* Update helpers.py

* cleanup

* Update runa_view.py

* more cleanupp

* fixes

* update tests

* Update intrinio_view.py

* Update intrinio_view.py

* Update intrinio_view.py

* reqs files, poetry lock

* Update backend.py

* test for new icon

* Update fmp_view.py

* updates

* Update plotly_helper.py

* Update businessinsider_view.py

* ruff

* pylint

* fix previous merge

* Update plotly_helper.py

* update reqs files

* Update directories.py

* fix alt covid

* fix display_candle data is None load being unreachable, get covid views ready for sdk server

* Update covid_view.py

* refactor cleanup

* plotly_ta adjustments

* terminal wide ignore print_table if export

* Update plotly_helper.py

* forgot to save a few

* added edge case fallback if figures are in queue before backend fail

* Update ta_class.py

* Rename env variable name required to return plotly json

* Resolve pydocstyle warnings

* Resolve linting errors

* revert forecasting/pyinstaller versions

* Update terminal.spec

* finished incoming fixedincome menu, improve get_ecb_yield_curve speed with multiprocessing

* update deps

* Update backend.py

* fix fred model/view from switch to DataFrame, improve ecb_model

* Update config_terminal.py

* Update backend.py

* black

* clean up

* Update fred_view.py

* Update ta_class.py

* Update ta_class.py

* Update plotly_helper.py

* sync fixedincome

* Update ecb_model.py

* convert excel to csv for faster processing

* cleanup

* remove excel files

* Update terminal_controller.py

* update tests

* adjustments/missed figs in export_data

* Update cryptocurrency_helpers.py

* fixes

* account for volume column with no volume when plotting indicators , images autogen POC

* Update plotly_helper.py

* Update etf_controller.py

* Update etf_controller.py

* margin arg for export_data func figures, some plot adjustments

* logic for numpy array for plotly helper `get_dateindex` function

* cleanup

* update

* req file updates

* views

* Update backend.py

* update tests

* Update test_load_none[btc-usd].yaml

* convert merged cpi chart

* linting

* updates

* clean

* tests

* Update openbb.dockerfile

* remove test docker in root

* Update CONTRIBUTING.md

---------

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: Chavithra <chavithra@gmail.com>
2023-03-01 22:48:45 -05:00
James Maslek
437607c54b merge release into develop (#4359)
* Update trailmap.py (#4300)

* Fixes Failing AutoDocs (#4304)

* Fixes Failing AutoDocs

* Update test_print_help.txt

* Release time

* Revert papermill and update gh pages action

* Fix shortname (#4356)

* uninstall brotli on conda test

* Fix issue 4316 (#4357)

* Fix issue 4316

* Updating polygon_model + options_controller

* Tests : FRED

* ruff

---------

Co-authored-by: teh_coderer <me@tehcoderer.com>
Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: Chavithra <chavithra@gmail.com>
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
2023-03-01 09:07:10 -05:00
teh_coderer
69b4d117fa SDK Auto-Generation/Refactor (#3358)
* Fixes

* Update stocks_helper.py

* update git-actions set-output to new format

* Update stocks_helper.py

* Update terminal_helper.py

* removed LineAnnotateDrawer from qa_view

* lint

* few changes

* updates

* sdk auto gen modules done

* Update stocks_helper.py

* updates to changed imports, and remove first sdk_modules

* Update generate_sdk.py

* Update generate_sdk.py

* pylint

* revert stocks_helper

* Update generate_sdk.py

* Update sdk.py

* Update generate_sdk.py

* full auto generation, added sdk.py/controllers creation

* missed enable forecasting

* added running black in subprocess after sdk files generation completes

* removed deleted sdk_arg_logger

* comment out tests

* property doc fix

* clean up

* Update generate_sdk.py

* make trailmap classes useable for doc generation

* Update generate_sdk.py

* added lineon to trailmap class for linking to func in markdown

* changed lineon to dict

* added full_path to trailmap for linking in docs

* updated portfolio

* added func_def to trailmap attributes for markdown in docs, added missing type hints to covid functions

* Update generate_sdk.py

* Update generate_sdk.py

* Update generate_sdk.py

* Update generate_sdk.py

* merge

* update sdk

* updates

* Update generate_sdk.py

* Update generate_sdk.py

* dead imports

* bump

* updates

* updates

* updated missing

* added alt realestate functions to trailmap, logic to clear folders before building

* Update __init__.py

* Update generate_sdk.py

* clean __init__.py files before build

* sync website content folder

* Update generate_sdk.py

* updates + logging

* drop pandas inplace.  add docstrings

* Update trail_map.py

* Update generate_sdk.py

* Update trail_map.py

* stocks/fa PR added

* synced trailmap with develop branch

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update sdk_init.py

* fix removed keys functions

* updates

* reqs txt files

* forgot to save

* up to date with main

* made sure help(openbb.trailmap) is preserved

* ruff

* Update requirements-full.txt

---------

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Chavithra <chavithra@gmail.com>
2023-02-15 14:37:44 -05:00
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
Chavithra PARANA
ac14ef9d88 Tests : mocking yfinance tzcache 2023-02-09 17:25:19 +01:00
Jeroen Bouma
0ee2ebcf1e Refractor stocks/fa by incorporating stocks/dd and making the menu less reliant on Yahoo Finance (#4055)
* I missed some sheet_name ones :)

* Move quote to main menu and combine yahoo finance commands

* Update stocks for quote

* First update to move yfinance away from main functionality

* Small updates

* Update tests to reflect changes

* Fix some little things

* Update docs a little too

* Remove the Due Diligence menu

* Update tests for new change

* Update fa and stocks with new text and move some stuff around

* Bye bye dd

* Pls work

* work..

* work..

* work..

* Work..|

* Add tests back in

* Remove tests

* Fix fix fix

* Remove tests to fix conflicts

* Improve the `stocks/search` command (#4084)

* Improve search command

* Make it more intuitive

* Fix tests

* Update the docs

* Ok done

* Ok done 2

* Ok done 3

* Git update tests that failed

* Update commands with --sheet-name that didn't work (#4088)

* Update commands with --sheet-name that didn't work

* Fix test

* oops

* Adds auto completion to `news` (#4089)

* Fix plot look when using eval and add query to choices (#3881)

* convert index to datetime and update choices

* uncomment economy integration test

* fix treasury concat bug

* fix datasets concat on duplciates

* Lock ruff version so that new lints dont break our CI (#3905)

* Lock ruff version so that new lints dont break our CI

* Bumped pre-commit ruff version

* returning always a dataframe

* Revert "returning always a dataframe"

This reverts commit d5dbf3132f.

* quick fix to auto complete args

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Hotfix/Windows-CLI (#4087)

* init

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* oops

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Adds end date to `forex/load` (#4077)

* Fix plot look when using eval and add query to choices (#3881)

* convert index to datetime and update choices

* uncomment economy integration test

* fix treasury concat bug

* fix datasets concat on duplciates

* Lock ruff version so that new lints dont break our CI (#3905)

* Lock ruff version so that new lints dont break our CI

* Bumped pre-commit ruff version

* returning always a dataframe

* Revert "returning always a dataframe"

This reverts commit d5dbf3132f.

* adding end date to the forex load

* added some tests

* added example

* always show msg

* rewriting test

* updating tests

* updating tests

* Redo load tests

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Update tests to reflect changes

* work..

* Remove tests

* Fix fix fix

* Remove tests

* Update the whole test folder

* Small updates

* Revert change

* Update eodhd to reflect it requires a paid plan and update tests

* Fix all the tests

* Update tests

* Update integration tests

* Removing tests so no whining happens

* ADD ALL THE TESTS

* Fix linting

* gitignore.  thanks jer

* Add back dd and redirect to fa

* Update to just display a message

* Update OpenBB SDK commands

* Fixing issues with exporting

* Fix ruff messing up

* Fix tests

* Fix the tests by disabling isort to run on tests folder

---------

Co-authored-by: Jeroen Bouma <jeroenbouma@Jeroens-MacBook-Pro.local>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: teh_coderer <me@tehcoderer.com>
2023-02-06 23:24:15 +01:00
Colin Delahunty
ee34a1f278 Feature/add isort linter (#4114)
* Fixed isort

* Fixed issues

* FIxed linters

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-02-04 21:24:47 -05:00
Henrique Joaquim
3f9c961b9a Hotfix/fix integration tests (#4025)
* Fix plot look when using eval and add query to choices (#3881)

* convert index to datetime and update choices

* uncomment economy integration test

* fix treasury concat bug

* fix datasets concat on duplciates

* Lock ruff version so that new lints dont break our CI (#3905)

* Lock ruff version so that new lints dont break our CI

* Bumped pre-commit ruff version

* removing leftover test

* fix forex test to use simple pairs

* fix key error in portfolio test

* fix pylint

* fix stocks_bt test

* fix ca tests

* fixing condition

* fixing int tests

* skipping shroom tests

* adding /red

* linting

* making pre commints happy

* linting

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-01-24 17:23:28 +00:00
Henrique Joaquim
cca3b31856 Fix dashboards (#3577)
* updating dependencies

* poetry export

* removed breakline from input

* Export dependencies

* Workflow

* Tests

* Workflow

* Dependencies update

* Linting

* Tests readme

* Dependencies update

* Workflow update

* Linting

* Workflow update

* Fix import

* Tests

* Linting

* Workflow update

* Re-solve the dependencies with poetry 1.1.13

* Workflow update

Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-11-28 12:13:22 -05:00
montezdesousa
7480c5efe0 Fix portfolio optimization SDK bugs (#3582)
* Small improvement to text handling

* fix plot and engine

* change msg

* fix po engine

* fix rc

* fix error

* opt pytest

* bug fix

Co-authored-by: colin99d <colin99delahunty@gmail.com>
Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-11-25 18:10:48 -05:00
teh_coderer
79046608b6 Docs Fix (#3543)
* Update generate_terminal_markdown.py

* updates

* update workflows

* Automated Change

* tests

* tests

* Automated Change

* Update test_generate_docs.py

* Automated Change

* updates

* Automated Change

* Update gen-docs.yml

* Update test.yml

* Automated Change

* Update test.yml

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* test

* Automated Change

* testtt23

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* Automated Change

* added empting reference folders before autogen docs

* updates

* Automated Change

* update tests gitactions

* Automated Change

* up

* Automated Change

* Automated Change

* update pytest

* Automated Change

* tests

* Automated Change

* examples update

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* Update test.yml

* Update generate_sdk_markdown.py

* strip

* Automated Change

* Workflow : check test update

* Automated Change

* Automated Change

* Automated Change

* Update test.yml

* Automated Change

* Update test.yml

* Automated Change

* Automated Change

* up

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* update workflows

* fix guides

* testing

* Update gh-pages.yml

* Update gh-pages.yml

Co-authored-by: tehcoderer <tehcoderer@users.noreply.github.com>
Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: Chavithra <Chavithra@users.noreply.github.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: jose-donato <jose-donato@users.noreply.github.com>
2022-11-25 17:19:08 -05:00
teh_coderer
721a7d560c [Bugs] Fix 3255,3160 + Improved Terminal Version Check (#3296)
* Fixes

* Update stocks_helper.py

* update git-actions set-output to new format

* Update stocks_helper.py

* Update terminal_helper.py

* removed LineAnnotateDrawer from qa_view

* lint

* Update stocks_helper.py

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-11-09 11:29:48 -05:00
Henrique Joaquim
46afc9eb8f Fix economy bugs (#3144)
* removed investing/investpy from sources and added #TODO

* removed Investing from events source

* fixed autocompletion for events

* added rank column based on the debt value

* removed options in treasury autocompletion

* fixed autocompletion to use comma instead of space

* fix verification for no data on economy/qa

* fix the exaple

* commented spreadso it don't show on auto completion

* preventing testst from using user default data sources and also removing unused env variables

* fixing tests

* adding empty line after uninterpreted args

* fixing tests

* improve the way fred works by not repeating the request. also, solve some issues with the plot - but not all

* Revert "improve the way fred works by not repeating the request. also, solve some issues with the plot - but not all"

This reverts commit 1094b454a5.

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-11-07 14:58:09 +00:00
DidierRLopes
7979b1fc07 Add 3 Token Terminal commands (#2447)
* add crypto/ov/fun

* add tokenterminal to dependencies

* update website content

* add to main.yml

* fix tests

* add tests

* Update _index.md

* Update _index.md

* fix tests

* fix test

* List hint added

* improve code based on Jose input

* fix tests

* requirements for token terminal

* add source and fix source bug

* some improvements

* colors bars

* fix dependencies

* update kaleido version

* update setuptools for pkg_resources

* replace pkg_resources by importlib_metadata

* Added fixes

* Fixed tests

* fix stuff for Josecas

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: colin99d <colin99delahunty@gmail.com>
2022-10-10 00:28:42 +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
Theodore Aptekarev
507cbfab39 Small fix (#2240) 2022-08-03 07:48:45 -04:00
montezdesousa
57b61d1b2a Display the help menu whenever users move to a different menu (#1968)
* switch auto print_help on exits

* display help when home called from home directory

* change in test to expect help cmd

* change in test to expect help cmd

* sets autoexithelp flag on conftest

* supress help string print on quit

* adapt tests to expect help

* adds help on 3 tests missing

* run black

* respect literal bool type

* second attemp to respect literal bool

Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
2022-06-22 13:45:48 +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
Colin Delahunty
617266ae21 Closing in on 90% Bot Coverage (#1646)
* Attempting more tests

* fix bots module not found issue

* try this syspath

* black

* fix except

* fix import sys path errors

* remove dual import

* Basic tests

* Sorry Juan

* Seperate discord commands

* fix path issues loading cmds folder

* click dep fix

* Fixed pylint

* Expanded tests

* Expanded tests

* Improve imports

* improve paths, clean up ext load, fixes

* Update pyproject.toml

* resolving windows test issues

Co-authored-by: teh_coderer <me@tehcoderer.com>
2022-04-10 22:07:07 +01:00
Colin Delahunty
6538c0ce14 Expanding bot tests (#1561)
* Expanding bot tests

* expanded tests

* Added tests

* Added stock test

* Fix filepath

* Attempted mock

* Bots : test_run_telegram

* Enhance tests

* Fixed black

* Expanded tests

* Added fix

* Ingore interactive files

* Removed bot dependency installation from tests

* Fix one black

* Fixed black

* Added init.py

* Added pylint disables

* Added skip

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-04-02 14:47:46 -04:00
jmaslek
b71abcfbf4 Updating some names (#1575)
* quick econ fix

* black

* keys and feature flags

* terminal name 👀

* some more replacements

* some more replacements

* edit pyproject

* gst -> openbb

* add example portfolios back to git

* Update api from gst

* sorry.  skipping some tests

* another round of names

* another round of test edits

* Missed some .gst refs and update timezone

* water mark stuff

* Fixing Names in terminal.spec and name of GTFF_DEFAULTS to OBBFF_DEFAULTS

* fix more GST to OpenBB Terminal

* Logging : merge conflicts with main

* Revert wrong files

Co-authored-by: Andrew <andrew.kenreich@gmail.com>
Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-03-29 09:46:26 -04:00
Colin Delahunty
dd4734bd90 Added Tests for Bots (#1523)
* Added common/helper tests

* expanded bot testing

* few changes

* import fix

* missed removing test config

* column order fix

* import fix

* removed df2img add new deps

* req

* update readme

* add dep for image export, fix

* get rid of yahoo-fin, add image export lib

* import issues in some machines fix

* images dir fix

* init fix

* fix?

* test

* test

* Fixed text handling

* missed a tbl

* Fixed tests

* Fixed poetry

* Fixed kaliedo

* Fixed codecov

* Fixed dependencies

* Added fix

* FIxed tests

* Added image cleanup

* Added tests

* Fixed tests

* Added test fix

* Added conda

* Updated bot path

* refactor

* poetry

* update dict/ fix slack image upload

* Update config_discordbot.py

* Updated

* Fixed tests

* Skipped energy

* fixes

* black

* fix

* import

* fix nan on smile

* added env settings

* add cmds_text dict, some chgs

* merge bot test fixes

* fix duplicate

Co-authored-by: teh_coderer <me@tehcoderer.com>
Co-authored-by: Colin Delahunty <colindelahunty@MacBook-Pro.local>
Co-authored-by: Chavithra <chavithra@gmail.com>
2022-03-25 18:21:41 -04:00
minhhoang1023
0127c37c20 Fix ENABLE_RICH bug & fix test not catching the bug (#1448)
* Fix rich bug & fix tests not catching the bug

* Remove feature_flags diff

* Remove enable_rich and enable_rich_panel from ff

* Add back enable_rich_panel

* Setting default value back to True

* Disable rich when running tests

* Remove COLOR

* Fix tests

* Rewrite tests

* Remove default cassette

* Rewrite tests

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-03-14 14:15:12 +00:00
minhhoang1023
401e4c739a Output Missing API Key Message to Console (#1357)
* Decorator to output error msg to console of missing API Key

* Refactor FMP & alpha advantage

* Refactor FRED & QUANDL

* Refactor Polygon

* Refactor FRED

* Refactor FRED

* Refactor Finnhub & coinmarketcap & Newsapi

* Allow disabling of check api

* Updating tests : disable check api for tests

* Refactor Finnhub & SI & Binance

* Fix linting

* Fix test & add black formatting

* Fix test failing

* Fix test failing

* Refactor CryptoPanic & Whales alert & Glassnode & Coinglass

* Refactor ETHexplorer & Smartstake & Alpha Advanage & Coinbase

* Add decorators to controllers

* Fix test & Refactor Coinbase, RH, Reddit

* Add contributing guideline

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* fix tests

* add decorator to snews cmd

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-03-05 15:27:43 +00:00
Jeroen Bouma
f2ca215132 Econometrics Menu (#1403)
* Add Statistics Menu

* Add Granger Causality test

* Apply Black formatting

* Add Cointegration Tests

* Adjust plotting for Cointegration test

* Add Significant parameter to Cointegration tests

* Move regression functions to seperate .py files

* Progress on Panel Data

* A lot of progress for Panel Data

* Make functions robust and improve documentation

* Re-enable Breusch-Godfrey

* Add modify functionality

* Improve modify functionality

* Add Breusch-Pagan heteroscedasticity test

* Capitalize a word

* Include documentatin for the Statistics Menu

* Update _index.md

* Update _index.md

* Update _index.md

* Fix export statements and add Example datasets

* Update example with Longley's dataset

* Update documentation with a legit source

* Compare the results from each regression models based on the wage_panel dataset

* Updated with all relevant types of regression tables

* Update with all relevant regression types for Panel data

* Update _index.md

* Add change column type, improve OLS, add time and entity effects for FE

* Update documentation and fix a small bug

* Add in Statistics menu, replacing Custom menu

* Remove custom menu

* Add in documentation

* Add in gst files

* Cointegration can be used on any amount of columns

* Add Tests

* Make tests time invariant

* Update Poetry and Requirements

* Change name of Statistics menu to Econometrics menu

* Rename scripts

* Add type in Documentation

* Change names from Statistics to Econometrics

* Add graph

* Update tests with rounding and naming

* Make minor adjustments to fix the tests

* Updating tests : allow extra args for capture

* Apply recorder formatting

* Adding some minor formatting

* Fix error with MyPy

* Attempt to fix MyPy annoyance

* super small style things

* Fix small bugs and add plot command to dwat

* Small description mistake

* Update documentation with missing argument

* Update styling

* Add error handling and add improve show functionality

* Fix merge issue

* Allow import from custom_imports

Co-authored-by: Jeroen Bouma <jeroenbouma@MacBook-Pro-van-Jeroen.local>
Co-authored-by: jmaslek <jmaslek11@gmail.com>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-03-04 21:44:59 +01:00
Colin Delahunty
f8fc7d00ff Updated uninstall brotli wording (#1333) 2022-02-08 18:08:33 +03:00
Chavithra
ccfe98e19d Tests + Fix : Cryptocurrency > Defi (#1284)
* Updating tests : crypto/defi

* Updating tests : stocks/prediction_techniques

* Updating tests : economy

* Updating tests : conftest

* Updating tests : economy/wsj

* Updating crypto : fixing defi/coindix_view

* Updating crypto : fix crypto/defi/defipulse_model

* Updating tests : crypto/defi

* Updating tests : crypto/defi

* Updating crypto : crypto/defi/graph_model

* Updating tests : crypto/defi

* Updating tests : crypto/defi

* Updating tests : crypto/defi

* Updating tests : black

* Updating tests : economy/fred/prediction

* Updating tests : crypto/defi/graph

* Updating tests : linting
2022-01-29 16:07:41 +01:00
Chavithra
683a8bdd83 Tests : Economy + Conftest (#1260)
* Updating tests : economy

* Updating tests : removing breaklines

* Updating tests : economy

* Updating tests : conftest

* Updating tests : economy
2022-01-24 22:11:40 +01:00
Colin Delahunty
183e10b524 Allow Custom Flairs (#1249)
* Added ability for custom flair

* Refactored for easier use

* Renamed

* Renamed 2
2022-01-23 17:48:21 -05:00
Colin Delahunty
97c755b8e7 Remove Colorama (#1203)
* Began removing colorama

* Removed colorama

* Made progress on tests

* Small change

* Removed colorama

* Update finbrain_view.py

* Updating tests : mocking `rich_table_from_df`

* Updated table functionality

* Fixed tests

* Fixed black issue

* Pylint fixes

* Added pylint fixes

* Fixed tests

* Updated tests

* Updated csv

* Fixed pylint error

* Add run_scripts

Co-authored-by: jmaslek <jmaslek11@gmail.com>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-01-19 11:56:28 -05:00
Colin Delahunty
7412d2b61a Brotli.py check (#1188)
* Added brotli check

* Updated poetry and linting

* Modified to uninstall brotli

* Updated requirements

* Fixed YAML

* Added TOTO

* Added -y to pip uninstall

* Added user flag

* Using python -m

* Switched to conda

* Changed where we remove
2022-01-15 09:07:18 -05:00
Colin Delahunty
82747072c5 Terminal Wide Rich (#1161)
* My idea for how we handle Rich moving forward

* remove independent consoles

* FIxed pylint issues

* add a few vars

* Switched print to console

* More transitions

* Changed more prints

* Replaced all prints

* Fixing tabulate

* Finished replace tabulate

* Finished removing rich from Tabulate

* add Panel around menu

* add GST watermark under feature flag

* Fixed 46 tests

* Delete test_screener[False].yaml

* Delete test_screener[True].yaml

* Fixed the rest of the tests

* add help and source color vars and use rgb

* rich on stocks/options

* update rich on disc, dps, sia

* rich in gov, ins and scr menus

* ba and ca menus with rich

* Fixed import issue

* Fixed some tests

* removed termcolor

* Removed prettytable

* add rich to remaining stocks menus

* FIxed linting issue

* Added James' changes

* Updated dependencies

* Add rich to cryptocurrency menu

* refactor economy and forex

* refactor etf with rich

* refactor mfunds

* refactor rich rest

* not specify style so default color works well on any background

* Fixing mypy issues

* Updated tests

* More test fixes

* James' test fixes

* Updating tests : stocks/screener - fix cassettes using BR

* Updating tests : crypto

* Updating tests : disable DEBUG_MODE

* Updating tests : stocks/fa/yfinance

* minor fixes that escape

* Improve the rich table function (that replaces tabulate :D )

* Fixed bad code

* delete rogue file + dcf fix + NoConsole

* sia mypy

* fuck you linter

* fuck you linter pt 2

* skip hehe

* i hate the black linter

* ubuntu mypy attempt

* Update : rich_config + gtff

* Updating tests : conftest

* Updating tests : stocks

* Update : rich_config

* Updating : rich_config

* make panel configurable for Theodore :b

* colors update

* Merged

* Updating : rich_config + feature_flags

* Updating : rich_config

* Updating tests : stocks

* Updating : feature_flags

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: james <jmaslek11@gmail.com>
Co-authored-by: jose-donato <zmcdonato@gmail.com>
2022-01-15 02:06:00 +00:00
Chavithra
d7685796e6 Updating tests : conftest (#1179) 2022-01-12 16:20:18 -05:00
Chavithra
61dd672e6d Tests : Stocks > Option + Technical Analysis + Screener (#1145)
* Updating tests : stocks/ta

* Updating tests : conftest

* Updating tests : stocks/screener/finviz

* Updating tests : stocks/options
2022-01-06 15:31:30 +01:00
Chavithra
000d1e93d7 Tests : Stocks > Options (#1125)
* Update tests : conftest

* Updating tests : stocks/options

* Updating tests : fix typing

* Updating tests : black

* Updating tests : pyupgrade

* Updating tests : black

* Updating tests : mock dates in cassettes

* Updating tests : conftest

* Updating tests : black

* Updating tests : force single threading

* Updating tests : skip

* Updating tests : black

* Updating tests : conftest

* Update tests : skip stocks/options/controller

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : fixing issue

* Updating tests : add init

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : conftest

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip

* Updating tests : skip
2022-01-04 01:25:31 +01:00
Chavithra
0c205cbeae Tests : Stock > Prediction Techniques + Doc (#1060)
* Updating tests : conftest + pytest.ini

* Updating tests : stocks/prediction_techniques

* Updating tests : doc
2021-12-16 15:11:55 +01:00
Chavithra
0f541f67b1 Tests : Stocks > Doc + Helpers + Government (#1051)
* Updating tests : stocks/government/controller

* Updating tests : stocks/government

* Updating tests : conftest

* Updating tests : stocks > government

* Updating tests : stocks/government

* Updating tests : docs
2021-12-12 22:07:57 +01:00
Chavithra
6c51a584e0 Chavithra/tests draft helpers (#1039)
* Updating tests : fixtures

* Updating tests : fixing pylint

* Updating tests : fixtures

* Updating tests : black

* Updating tests : fixtures

* Updating tests : doc

* Updating tests : fixing mypy
2021-12-09 06:48:13 +01:00
Chavithra
d135aac9c8 Updating tests : stocks/due_diligence (#1005)
* Updating tests : stocks/due_diligence + terminal

* Updating tests : doc

* Updating tests : conftest

* Update tests : pre-commit

* Updating tests : cassette + txt
2021-12-01 23:20:04 +00:00