Skip to content

Commit

Permalink
feat: change Unknown to None in get lean version name
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Aug 13, 2024
1 parent 3e5a4f1 commit 875d400
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lean/commands/backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def backtest(project: Path,
engine_image = cli_config_manager.get_engine_image(image or project_config.get("engine-image", None))

container_module_version = container.docker_manager.get_image_label(engine_image,
CONTAINER_LABEL_LEAN_VERSION_NAME, "Unknown")
CONTAINER_LABEL_LEAN_VERSION_NAME, None)

if data_provider_historical is not None:
data_provider = non_interactive_config_build_for_name(lean_config, data_provider_historical,
Expand Down
3 changes: 1 addition & 2 deletions lean/commands/data/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,7 @@ def download(ctx: Context,
container.update_manager.pull_docker_image_if_necessary(engine_image, update, no_update)

container_module_version = container.docker_manager.get_image_label(engine_image,
CONTAINER_LABEL_LEAN_VERSION_NAME,
"Unknown")
CONTAINER_LABEL_LEAN_VERSION_NAME, None)

data_downloader_provider = config_build_for_name(lean_config, data_downloader_provider.get_name(),
cli_data_downloaders, kwargs, logger, interactive=True)
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 @@ -278,7 +278,7 @@ def deploy(project: Path,
engine_image = cli_config_manager.get_engine_image(image or project_config.get("engine-image", None))

container_module_version = container.docker_manager.get_image_label(engine_image,
CONTAINER_LABEL_LEAN_VERSION_NAME, "Unknown")
CONTAINER_LABEL_LEAN_VERSION_NAME, None)

organization_id = container.organization_manager.try_get_working_organization_id()
paths_to_mount = {}
Expand Down
3 changes: 2 additions & 1 deletion lean/commands/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ def optimize(project: Path,

paths_to_mount = None

container_module_version = container.docker_manager.get_image_label(engine_image, CONTAINER_LABEL_LEAN_VERSION_NAME, "Unknown")
container_module_version = container.docker_manager.get_image_label(engine_image,
CONTAINER_LABEL_LEAN_VERSION_NAME, None)

if data_provider_historical is not None:
data_provider = non_interactive_config_build_for_name(lean_config, data_provider_historical,
Expand Down
2 changes: 1 addition & 1 deletion lean/commands/research.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def research(project: Path,
container.update_manager.pull_docker_image_if_necessary(research_image, update, no_update)

container_module_version = container.docker_manager.get_image_label(research_image,
CONTAINER_LABEL_LEAN_VERSION_NAME, "Unknown")
CONTAINER_LABEL_LEAN_VERSION_NAME, None)

if str(research_image) != DEFAULT_RESEARCH_IMAGE:
logger.warn(f'A custom research image: "{research_image}" is being used!')
Expand Down

0 comments on commit 875d400

Please sign in to comment.