Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
markjschreiber committed Sep 19, 2024
1 parent 92f4c54 commit 5e34018
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion omics/cli/run_analyzer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[--plot=<directory>]
[--headroom=<float>]
omics-run-analyzer --batch <runId>... [--profile=<profile>] [--region=<region>] [--headroom=<float>]
[--out=<path>]
[--out=<path>]
omics-run-analyzer (-h --help)
omics-run-analyzer --version
Expand Down
6 changes: 4 additions & 2 deletions omics/cli/run_analyzer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 5e34018

Please sign in to comment.