diff --git a/lean/commands/cloud/live/deploy.py b/lean/commands/cloud/live/deploy.py index 457b349b..bf63f720 100644 --- a/lean/commands/cloud/live/deploy.py +++ b/lean/commands/cloud/live/deploy.py @@ -340,7 +340,7 @@ def deploy(project: str, logger.info(f"Environment: {brokerage_settings['environment'].title()}") logger.info(f"Server name: {live_node.name}") logger.info(f"Server type: {live_node.sku}") - logger.info(f"Data provider historical: {price_data_handler.replace('Handler', '')}") + logger.info(f"Data provider live: {price_data_handler.replace('Handler', '')}") logger.info(f"LEAN version: {cloud_project.leanVersionId}") logger.info(f"Order event notifications: {'Yes' if notify_order_events else 'No'}") logger.info(f"Insight notifications: {'Yes' if notify_insights else 'No'}") diff --git a/tests/commands/cloud/live/test_cloud_live_commands.py b/tests/commands/cloud/live/test_cloud_live_commands.py index 6f930272..6c1cd888 100644 --- a/tests/commands/cloud/live/test_cloud_live_commands.py +++ b/tests/commands/cloud/live/test_cloud_live_commands.py @@ -114,7 +114,7 @@ def test_cloud_live_deploy_with_ib_using_hybrid_datafeed() -> None: "--ib-account", "DU2366417", "--ib-password", "test_password"]) assert result.exit_code == 0 - assert "Data provider: quantconnecthandler+interactivebrokershandler" in result.output.split("\n") + assert "Data provider live: quantconnecthandler+interactivebrokershandler" in result.output.split("\n") def test_cloud_live_deploy_with_tradier_using_tradier_datafeed() -> None: create_fake_lean_cli_directory() @@ -135,7 +135,7 @@ def test_cloud_live_deploy_with_tradier_using_tradier_datafeed() -> None: "--tradier-access-token", "456", "--tradier-environment", "paper"]) assert result.exit_code == 0 - assert "Data provider: TradierBrokerage" in result.output.split("\n") + assert "Data provider live: TradierBrokerage" in result.output.split("\n") @pytest.mark.parametrize("notice_method,configs", [("emails", "customAddress:customSubject"), ("emails", "customAddress1:customSubject1,customAddress2:customSubject2"), diff --git a/tests/commands/test_backtest.py b/tests/commands/test_backtest.py index 18d64d65..a59ea0f0 100644 --- a/tests/commands/test_backtest.py +++ b/tests/commands/test_backtest.py @@ -612,7 +612,7 @@ def test_backtest_passes_data_purchase_limit_to_lean_runner() -> None: } """) - result = CliRunner().invoke(lean, ["backtest", "Python Project", "--data-provider", "QuantConnect", "--data-purchase-limit", "1000"]) + result = CliRunner().invoke(lean, ["backtest", "Python Project", "--data-provider-historical", "QuantConnect", "--data-purchase-limit", "1000"]) assert result.exit_code == 0 diff --git a/tests/commands/test_live.py b/tests/commands/test_live.py index b8ec5fd5..c418abdb 100644 --- a/tests/commands/test_live.py +++ b/tests/commands/test_live.py @@ -435,7 +435,7 @@ def test_live_calls_lean_runner_with_data_provider(data_provider: str) -> None: options.extend([f"--{key}", value]) result = CliRunner().invoke(lean, ["live", "CSharp Project", "--environment", "live-paper", - "--data-provider", data_provider, + "--data-provider-historical", data_provider, *options]) expected = 0 @@ -488,7 +488,7 @@ def test_live_non_interactive_aborts_when_missing_brokerage_options(brokerage: s result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", brokerage, - "--data-feed", data_feed, + "---data-provider-live", data_feed, *options]) assert result.exit_code != 0 @@ -511,7 +511,7 @@ def test_live_non_interactive_aborts_when_missing_data_feed_options(data_feed: s result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", "Paper Trading", - "--data-feed", data_feed, + "--data-provider-live", data_feed, "--live-cash-balance", "USD:100", *options]) @@ -541,7 +541,7 @@ def test_live_non_interactive_do_not_store_non_persistent_properties_in_lean_con result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", brokerage, - "--data-feed", data_feed, + "--data-provider-live", data_feed, *options]) traceback.print_exception(*result.exc_info) @@ -583,7 +583,7 @@ def test_live_non_interactive_calls_run_lean_when_all_options_given(brokerage: s result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", brokerage, - "--data-feed", data_feed, + "--data-provider-live", data_feed, *options]) traceback.print_exception(*result.exc_info) @@ -622,8 +622,8 @@ def test_live_non_interactive_calls_run_lean_when_all_options_given_with_multipl result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", brokerage, - "--data-feed", data_feed1, - "--data-feed", data_feed2, + "--data-provider-live", data_feed1, + "--data-provider-live", data_feed2, *options]) traceback.print_exception(*result.exc_info) @@ -682,7 +682,7 @@ def test_live_non_interactive_falls_back_to_lean_config_for_brokerage_settings(b result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", brokerage, - "--data-feed", data_feed, + "--data-provider-live", data_feed, *options]) traceback.print_exception(*result.exc_info) @@ -731,7 +731,7 @@ def test_live_non_interactive_falls_back_to_lean_config_for_data_feed_settings(d result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", "Paper Trading", - "--data-feed", data_feed, + "--data-provider-live", data_feed, "--live-cash-balance", "USD:100", *options]) @@ -780,8 +780,8 @@ def test_live_non_interactive_falls_back_to_lean_config_for_multiple_data_feed_s result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", "Paper Trading", - "--data-feed", data_feed1, - "--data-feed", data_feed2, + "--data-provider-live", data_feed1, + "--data-provider-live", data_feed2, "--live-cash-balance", "USD:100", *options]) @@ -924,7 +924,7 @@ def test_live_passes_live_cash_balance_to_lean_runner_when_given_as_option(broke result = CliRunner().invoke(lean, ["live", "Python Project", *options, "--brokerage", brokerage, "--live-cash-balance", cash, - "--data-feed", "Custom data only"]) + "--data-provider-live", "Custom data only"]) if brokerage not in ["Paper Trading", "Trading Technologies", "Terminal Link"] and cash != "": assert result.exit_code != 0 @@ -988,7 +988,7 @@ def test_live_passes_live_holdings_to_lean_runner_when_given_as_option(brokerage options.extend(["--live-cash-balance", "USD:100"]) result = CliRunner().invoke(lean, ["live", "Python Project", "--brokerage", brokerage, "--live-holdings", holdings, - "--data-feed", "Custom data only", *options]) + "--data-provider-live", "Custom data only", *options]) if brokerage not in ["Paper Trading", "Terminal Link"] and holdings != "": assert result.exit_code != 0 diff --git a/tests/commands/test_optimize.py b/tests/commands/test_optimize.py index 940ddf39..4810c683 100644 --- a/tests/commands/test_optimize.py +++ b/tests/commands/test_optimize.py @@ -801,7 +801,7 @@ def test_optimize_used_data_downloader_specified_with_data_provider_option() -> with mock.patch.object(ModuleManager, "install_module"): result = CliRunner().invoke(lean, ["optimize", "Python Project", - "--data-provider", "Polygon", + "--data-provider-historical", "Polygon", "--polygon-api-key", "my-key"]) assert result.exit_code == 0