From 5e3401812b14f01ec7fa155c775d9804cb37fa98 Mon Sep 17 00:00:00 2001 From: Mark Schreiber Date: Thu, 19 Sep 2024 14:58:55 -0400 Subject: [PATCH] lint fixes --- omics/cli/run_analyzer/__main__.py | 2 +- omics/cli/run_analyzer/utils.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/omics/cli/run_analyzer/__main__.py b/omics/cli/run_analyzer/__main__.py index 69c9df8..20e8387 100755 --- a/omics/cli/run_analyzer/__main__.py +++ b/omics/cli/run_analyzer/__main__.py @@ -13,7 +13,7 @@ [--plot=] [--headroom=] omics-run-analyzer --batch ... [--profile=] [--region=] [--headroom=] - [--out=] + [--out=] omics-run-analyzer (-h --help) omics-run-analyzer --version diff --git a/omics/cli/run_analyzer/utils.py b/omics/cli/run_analyzer/utils.py index 6a42af2..40412c3 100644 --- a/omics/cli/run_analyzer/utils.py +++ b/omics/cli/run_analyzer/utils.py @@ -8,12 +8,14 @@ def get_engine(workflow_arn, session) -> str: + """Get the engine name for the workflow_arn""" omics = session.client("omics") id = workflow_arn.split("/")[-1] return omics.get_workflow(id)["engine"] def task_base_name(name: str, engine: str) -> str: + """Find the base name of the task assuming the naming conventions used by the engine""" # WDL if engine == "WDL": m = re.match(_wdl_task_regex, name) @@ -35,7 +37,7 @@ def task_base_name(name: str, engine: str) -> str: def omics_instance_weight(instance: str) -> int: - + """Compute a numeric weight for an instance to be used in sorting or finding a max or min""" sizes = { "": 2, "x": 4, @@ -46,7 +48,7 @@ def omics_instance_weight(instance: str) -> int: "16x": 64, "24x": 96, } - families = {"c": 2, "m": 4, "r": 8, "g4dn": 16, "g5": 32} + families = {"c": 2, "m": 4, "r": 8, "g4dn": 16, "g5": 16} # remove the "omics." from the string instance.replace("omics.", "") # split the instance into family and size