summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormontezdesousa <79287829+montezdesousa@users.noreply.github.com>2023-03-04 23:37:19 +0000
committerGitHub <noreply@github.com>2023-03-05 00:37:19 +0100
commit475ebb5acd0190832c3fc7d1ff1a7ef55abc8066 (patch)
treeceee1292a9ffc1cb4352e44211ef8166ba8c421b
parentcdea224b6decd4b830c1dbedae355c76e9e9dafd (diff)
[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>
-rw-r--r--.github/workflows/unit-test.yml2
-rw-r--r--openbb_terminal/account/account_controller.py95
-rw-r--r--openbb_terminal/account/account_model.py29
-rw-r--r--openbb_terminal/alternative/alt_controller.py4
-rw-r--r--openbb_terminal/alternative/covid/covid_controller.py4
-rw-r--r--openbb_terminal/alternative/oss/github_model.py4
-rw-r--r--openbb_terminal/alternative/oss/oss_controller.py4
-rw-r--r--openbb_terminal/alternative/realestate/realestate_controller.py4
-rw-r--r--openbb_terminal/base_helpers.py8
-rw-r--r--openbb_terminal/common/behavioural_analysis/finnhub_model.py4
-rw-r--r--openbb_terminal/common/behavioural_analysis/reddit_model.py91
-rw-r--r--openbb_terminal/common/behavioural_analysis/reddit_view.py6
-rw-r--r--openbb_terminal/common/behavioural_analysis/twitter_model.py7
-rw-r--r--openbb_terminal/common/newsapi_model.py4
-rw-r--r--openbb_terminal/config_plot.py49
-rw-r--r--openbb_terminal/config_terminal.py187
-rw-r--r--openbb_terminal/core/config/paths.py26
-rw-r--r--openbb_terminal/core/config/paths_helper.py53
-rw-r--r--openbb_terminal/core/integration_tests/integration_controller.py15
-rw-r--r--openbb_terminal/core/library/breadcrumb.py3
-rw-r--r--openbb_terminal/core/library/trail_map.py8
-rw-r--r--openbb_terminal/core/log/collection/log_sender.py4
-rw-r--r--openbb_terminal/core/log/generation/directories.py6
-rw-r--r--openbb_terminal/core/log/generation/settings_logger.py62
-rw-r--r--openbb_terminal/core/log/generation/user_logger.py7
-rw-r--r--openbb_terminal/core/models/__init__.py11
-rw-r--r--openbb_terminal/core/models/credentials_model.py68
-rw-r--r--openbb_terminal/core/models/preferences_model.py107
-rw-r--r--openbb_terminal/core/models/profile_model.py74
-rw-r--r--openbb_terminal/core/models/user_model.py15
-rw-r--r--openbb_terminal/core/plots/backend.py4
-rw-r--r--openbb_terminal/core/plots/plotly_helper.py16
-rw-r--r--openbb_terminal/core/sdk/sdk_helpers.py19
-rw-r--r--openbb_terminal/core/sdk/sdk_init.py2
-rw-r--r--openbb_terminal/core/session/banner.txt (renamed from openbb_terminal/session/banner.txt)0
-rw-r--r--openbb_terminal/core/session/constants.py7
-rw-r--r--openbb_terminal/core/session/credentials_handler.py83
-rw-r--r--openbb_terminal/core/session/current_user.py65
-rw-r--r--openbb_terminal/core/session/env_handler.py33
-rw-r--r--openbb_terminal/core/session/hub_model.py (renamed from openbb_terminal/session/hub_model.py)14
-rw-r--r--openbb_terminal/core/session/local_model.py (renamed from openbb_terminal/session/local_model.py)82
-rw-r--r--openbb_terminal/core/session/preferences_handler.py58
-rw-r--r--openbb_terminal/core/session/sdk_session.py (renamed from openbb_terminal/session/sdk_session.py)33
-rw-r--r--openbb_terminal/core/session/session_controller.py (renamed from openbb_terminal/session/session_controller.py)10
-rw-r--r--openbb_terminal/core/session/session_model.py (renamed from openbb_terminal/session/session_model.py)41
-rw-r--r--openbb_terminal/cryptocurrency/coinbase_helpers.py7
-rw-r--r--openbb_terminal/cryptocurrency/crypto_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/defi/defi_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/defi/smartstake_model.py8
-rw-r--r--openbb_terminal/cryptocurrency/discovery/coinmarketcap_model.py4
-rw-r--r--openbb_terminal/cryptocurrency/discovery/discovery_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/due_diligence/binance_model.py26
-rw-r--r--openbb_terminal/cryptocurrency/due_diligence/coinglass_model.py8
-rw-r--r--openbb_terminal/cryptocurrency/due_diligence/dd_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/due_diligence/glassnode_model.py14
-rw-r--r--openbb_terminal/cryptocurrency/due_diligence/messari_model.py16
-rw-r--r--openbb_terminal/cryptocurrency/due_diligence/santiment_model.py4
-rw-r--r--openbb_terminal/cryptocurrency/due_diligence/tokenterminal_model.py6
-rw-r--r--openbb_terminal/cryptocurrency/nft/nft_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/onchain/bitquery_model.py4
-rw-r--r--openbb_terminal/cryptocurrency/onchain/ethplorer_model.py4
-rw-r--r--openbb_terminal/cryptocurrency/onchain/onchain_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/onchain/shroom_model.py6
-rw-r--r--openbb_terminal/cryptocurrency/onchain/whale_alert_model.py4
-rw-r--r--openbb_terminal/cryptocurrency/overview/cryptopanic_model.py4
-rw-r--r--openbb_terminal/cryptocurrency/overview/overview_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/overview/tokenterminal_model.py6
-rw-r--r--openbb_terminal/cryptocurrency/quantitative_analysis/qa_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/technical_analysis/ta_controller.py4
-rw-r--r--openbb_terminal/cryptocurrency/tools/tools_controller.py4
-rw-r--r--openbb_terminal/dashboards/dashboards_controller.py4
-rw-r--r--openbb_terminal/decorators.py22
-rw-r--r--openbb_terminal/econometrics/econometrics_controller.py23
-rw-r--r--openbb_terminal/economy/alphavantage_model.py21
-rw-r--r--openbb_terminal/economy/economy_controller.py14
-rw-r--r--openbb_terminal/economy/finnhub_model.py4
-rw-r--r--openbb_terminal/economy/fred_model.py14
-rw-r--r--openbb_terminal/economy/nasdaq_model.py4
-rw-r--r--openbb_terminal/economy/quantitative_analysis/qa_controller.py4
-rw-r--r--openbb_terminal/etf/discovery/disc_controller.py4
-rw-r--r--openbb_terminal/etf/etf_controller.py4
-rw-r--r--openbb_terminal/etf/fmp_model.py5
-rw-r--r--openbb_terminal/etf/technical_analysis/ta_controller.py4
-rw-r--r--openbb_terminal/featflags_controller.py152
-rw-r--r--openbb_terminal/feature_flags.py158
-rw-r--r--openbb_terminal/fixedincome/ecb_view.py2
-rw-r--r--openbb_terminal/fixedincome/fixedincome_controller.py7
-rw-r--r--openbb_terminal/fixedincome/fred_model.py9
-rw-r--r--openbb_terminal/fixedincome/fred_view.py2
-rw-r--r--openbb_terminal/fixedincome/oecd_view.py1
-rw-r--r--openbb_terminal/forecast/brnn_model.py11
-rw-r--r--