diff --git a/openbb_terminal/session/hub_model.py b/openbb_terminal/session/hub_model.py index 298ee23246ee..9d00fd6f152d 100644 --- a/openbb_terminal/session/hub_model.py +++ b/openbb_terminal/session/hub_model.py @@ -4,6 +4,7 @@ from openbb_terminal.rich_config import console +REGISTER_LINK = "https://my.openbb.dev/register" BASE_URL = "https://payments.openbb.dev/" TIMEOUT = 15 diff --git a/openbb_terminal/session/session_controller.py b/openbb_terminal/session/session_controller.py index 31619e76cb04..e9631fa9b85b 100644 --- a/openbb_terminal/session/session_controller.py +++ b/openbb_terminal/session/session_controller.py @@ -6,6 +6,7 @@ from openbb_terminal import terminal_controller from openbb_terminal.core.config.paths import PACKAGE_DIRECTORY from openbb_terminal.rich_config import console +from openbb_terminal.session.hub_model import REGISTER_LINK from openbb_terminal.session.session_model import ( LoginStatus, create_session, @@ -17,8 +18,12 @@ def display_welcome_message(): """Display welcome message""" with open(PACKAGE_DIRECTORY / "session" / "banner.txt") as f: console.print(f"[menu]{f.read()}[/menu]\n") - console.print("Register : [cmds]https://my.openbb.co/register[/cmds]") + console.print(f"Register : [cmds]{REGISTER_LINK}[/cmds]") console.print("Ask support : [cmds]https://openbb.co/support[/cmds]") + console.print( + "[yellow]\nWARNING: This is a pre-release version published for testing.[/yellow]" + "[yellow]\nBeware that your account will be deleted without notice.[/yellow]" + ) def get_user_input() -> Tuple[str, str, bool]: diff --git a/openbb_terminal/session/user.py b/openbb_terminal/session/user.py index 401070db5472..ad50700684ba 100644 --- a/openbb_terminal/session/user.py +++ b/openbb_terminal/session/user.py @@ -1,5 +1,6 @@ import openbb_terminal.feature_flags as obbff from openbb_terminal.rich_config import console +from openbb_terminal.session.hub_model import REGISTER_LINK class User: @@ -59,7 +60,7 @@ def whoami(cls): else: console.print( "[info]You are currently logged as a guest.\n" - "Create an account here https://my.openbb.co/register.[/info]" + f"Create an account here {REGISTER_LINK}.[/info]" ) @classmethod diff --git a/openbb_terminal/terminal_controller.py b/openbb_terminal/terminal_controller.py index f8742c936b00..bf5fe26379e5 100644 --- a/openbb_terminal/terminal_controller.py +++ b/openbb_terminal/terminal_controller.py @@ -48,6 +48,7 @@ from openbb_terminal.reports.reports_model import ipykernel_launcher from openbb_terminal.rich_config import MenuText, console from openbb_terminal.session import session_controller +from openbb_terminal.session.hub_model import REGISTER_LINK from openbb_terminal.session.user import User from openbb_terminal.terminal_helper import ( bootup, @@ -370,7 +371,7 @@ def call_account(self, _): if User.is_guest(): console.print( "[info]You need to be logged in to use this menu.\n" - "Create an account here https://my.openbb.co/register.[/info]\n" + f"Create an account here {REGISTER_LINK}.[/info]\n" ) return self.queue = self.load_class(AccountController, self.queue) diff --git a/tests/openbb_terminal/session/txt/test_session_controller/test_display_welcome_message.txt b/tests/openbb_terminal/session/txt/test_session_controller/test_display_welcome_message.txt index 07014fb7a258..591c10ff993a 100644 --- a/tests/openbb_terminal/session/txt/test_session_controller/test_display_welcome_message.txt +++ b/tests/openbb_terminal/session/txt/test_session_controller/test_display_welcome_message.txt @@ -18,5 +18,8 @@ Investment research for Everyone, Anywhere. [/menu] -Register : [cmds]https://my.openbb.co/register[/cmds] +Register : [cmds]https://my.openbb.dev/register[/cmds] Ask support : [cmds]https://openbb.co/support[/cmds] +[yellow] +WARNING: This is a pre-release version published for testing.[/yellow][yellow] +Beware that your account will be deleted without notice.[/yellow] diff --git a/tests/openbb_terminal/session/txt/test_user/test_whoami[True-True].txt b/tests/openbb_terminal/session/txt/test_user/test_whoami[True-True].txt index f9e689b7db0d..805bc8bd83ba 100644 --- a/tests/openbb_terminal/session/txt/test_user/test_whoami[True-True].txt +++ b/tests/openbb_terminal/session/txt/test_user/test_whoami[True-True].txt @@ -1,2 +1,2 @@ [info]You are currently logged as a guest. -Create an account here https://my.openbb.co/register.[/info] +Create an account here https://my.openbb.dev/register.[/info]