Skip to content

Commit

Permalink
Merge branch 'develop' into feature/yield-curve
Browse files Browse the repository at this point in the history
  • Loading branch information
deeleeramone committed May 16, 2024
2 parents d7f6722 + 4c4f57f commit cdcc839
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 72 deletions.
9 changes: 6 additions & 3 deletions cli/openbb_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import sys

from openbb_cli.config.setup import bootstrap
from openbb_cli.controllers.cli_controller import launch


def main():
"""Use the main entry point for the OpenBB CLI."""
print("Loading...\n") # noqa: T201

# pylint: disable=import-outside-toplevel
from openbb_cli.config.setup import bootstrap
from openbb_cli.controllers.cli_controller import launch

bootstrap()

dev = "--dev" in sys.argv[1:]
Expand Down
80 changes: 36 additions & 44 deletions cli/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ python = "^3.8.1,<3.12"
# OpenBB dependencies
openbb = { version = "^4.2.0", extras = ["all"] }

# Terminal dependencies
# CLI dependencies
prompt-toolkit = "^3.0.16"
rich = "^13"
python-dotenv = "^1.0.0"
Expand Down
16 changes: 8 additions & 8 deletions cli/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from openbb_cli.cli import main


@patch("openbb_cli.cli.bootstrap")
@patch("openbb_cli.cli.launch")
@patch("openbb_cli.config.setup.bootstrap")
@patch("openbb_cli.controllers.cli_controller.launch")
@patch("sys.argv", ["openbb", "--dev", "--debug"])
def test_main_with_dev_and_debug(mock_launch, mock_bootstrap):
"""Test the main function with dev and debug flags."""
Expand All @@ -15,8 +15,8 @@ def test_main_with_dev_and_debug(mock_launch, mock_bootstrap):
mock_launch.assert_called_once_with(True, True)


@patch("openbb_cli.cli.bootstrap")
@patch("openbb_cli.cli.launch")
@patch("openbb_cli.config.setup.bootstrap")
@patch("openbb_cli.controllers.cli_controller.launch")
@patch("sys.argv", ["openbb"])
def test_main_without_arguments(mock_launch, mock_bootstrap):
"""Test the main function without arguments."""
Expand All @@ -25,8 +25,8 @@ def test_main_without_arguments(mock_launch, mock_bootstrap):
mock_launch.assert_called_once_with(False, False)


@patch("openbb_cli.cli.bootstrap")
@patch("openbb_cli.cli.launch")
@patch("openbb_cli.config.setup.bootstrap")
@patch("openbb_cli.controllers.cli_controller.launch")
@patch("sys.argv", ["openbb", "--dev"])
def test_main_with_dev_only(mock_launch, mock_bootstrap):
"""Test the main function with dev flag only."""
Expand All @@ -35,8 +35,8 @@ def test_main_with_dev_only(mock_launch, mock_bootstrap):
mock_launch.assert_called_once_with(True, False)


@patch("openbb_cli.cli.bootstrap")
@patch("openbb_cli.cli.launch")
@patch("openbb_cli.config.setup.bootstrap")
@patch("openbb_cli.controllers.cli_controller.launch")
@patch("sys.argv", ["openbb", "--debug"])
def test_main_with_debug_only(mock_launch, mock_bootstrap):
"""Test the main function with debug flag only."""
Expand Down
Loading

0 comments on commit cdcc839

Please sign in to comment.