Files
OpenBB/terminal.py
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

33 lines
945 B
Python

import sys
from multiprocessing import freeze_support
import openbb_terminal.config_terminal as cfg
# pylint:disable=unused-import,import-outside-toplevel
import openbb_terminal.core.session.current_system as syst # noqa: F401
import openbb_terminal.core.session.current_user as user # noqa: F401
from openbb_terminal.terminal_helper import is_auth_enabled, is_installer
def main():
sent_args = sys.argv[1:]
cfg.setup_config_terminal()
if "-t" in sent_args or "--test" in sent_args:
from openbb_terminal.core.integration_tests import integration_controller
integration_controller.main()
else:
from openbb_terminal.core.session import session_controller
if is_auth_enabled() and ("--login" in sys.argv[1:] or is_installer()):
session_controller.main()
else:
session_controller.launch_terminal()
if __name__ == "__main__":
freeze_support()
main()