Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: missed installing extra modules #499

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lean/commands/backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def backtest(project: Path,

# Configure addon modules
build_and_configure_modules(addon_module, cli_addon_modules, organization_id, lean_config,
kwargs, logger, environment_name)
kwargs, logger, environment_name, container_module_version)

lean_runner = container.lean_runner
lean_runner.run_lean(lean_config,
Expand Down
2 changes: 1 addition & 1 deletion lean/commands/live/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def deploy(project: Path,

# Configure addon modules
build_and_configure_modules(addon_module, cli_addon_modules, organization_id, lean_config,
kwargs, logger, environment_name)
kwargs, logger, environment_name, container_module_version)

if container.platform_manager.is_host_arm():
if "InteractiveBrokersBrokerage" in lean_config["environments"][environment_name]["live-mode-brokerage"] \
Expand Down
2 changes: 1 addition & 1 deletion lean/commands/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def optimize(project: Path,

# Configure addon modules
build_and_configure_modules(addon_module, cli_addon_modules, organization_id, lean_config,
kwargs, logger, environment_name)
kwargs, logger, environment_name, container_module_version)

container.update_manager.pull_docker_image_if_necessary(engine_image, update, no_update)

Expand Down
5 changes: 4 additions & 1 deletion lean/components/util/json_modules_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

def build_and_configure_modules(target_modules: List[str], module_list: List[JsonModule], organization_id: str,
lean_config: Dict[str, Any], properties: Dict[str, Any], logger: Logger,
environment_name: str):
environment_name: str, module_version: str):
"""Builds and configures the given modules

:param target_modules: the requested modules
Expand All @@ -29,10 +29,13 @@ def build_and_configure_modules(target_modules: List[str], module_list: List[Jso
:param properties: the user provided arguments
:param logger: the logger instance
:param environment_name: the environment name to use
:param module_version: The version of the module to install. If not provided, the latest version will be installed.
"""
for target_module_name in target_modules:
module = non_interactive_config_build_for_name(lean_config, target_module_name, module_list, properties,
logger, environment_name)
# Ensures extra modules (not brokerage or data feeds) are installed.
module.ensure_module_installed(organization_id, module_version)
lean_config["environments"][environment_name].update(module.get_settings())


Expand Down
Loading