From 7584a19cc0636444a0fb938b3b89659d9140587f Mon Sep 17 00:00:00 2001 From: Mark Schreiber Date: Fri, 27 Sep 2024 17:05:27 -0400 Subject: [PATCH] re-formats and lint fixes --- omics/cli/run_analyzer/__main__.py | 2 +- omics/cli/run_analyzer/batch.py | 1 - omics/cli/run_analyzer/writeconfig.py | 3 ++- tests/run_analyzer/unit/test_writeconfig.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/omics/cli/run_analyzer/__main__.py b/omics/cli/run_analyzer/__main__.py index 53a6e7c..a289f7b 100755 --- a/omics/cli/run_analyzer/__main__.py +++ b/omics/cli/run_analyzer/__main__.py @@ -33,7 +33,7 @@ -t, --time= Select runs over a time interval [default: 1day] -s, --show Show run resources with no post-processing (JSON) -T, --timeline Show workflow run timeline - + -h, --help Show help text --version Show the version of this application diff --git a/omics/cli/run_analyzer/batch.py b/omics/cli/run_analyzer/batch.py index af7a373..65b4519 100644 --- a/omics/cli/run_analyzer/batch.py +++ b/omics/cli/run_analyzer/batch.py @@ -53,7 +53,6 @@ def _aggregate_resources( run_resources_list: list[list[dict]], task_base_name: str, engine: str, out ): """Aggregate resources with the same base name""" - run_tasks_with_name: list[dict] = [] for run_resources in run_resources_list: diff --git a/omics/cli/run_analyzer/writeconfig.py b/omics/cli/run_analyzer/writeconfig.py index 761324e..6193a14 100644 --- a/omics/cli/run_analyzer/writeconfig.py +++ b/omics/cli/run_analyzer/writeconfig.py @@ -2,6 +2,7 @@ def create_config(engine, task_resources, filename): + """Create a config file based on recommended CPU and Memory values""" if engine == "NEXTFLOW": with open(filename, "w") as out: for task in task_resources: @@ -24,7 +25,7 @@ def create_config(engine, task_resources, filename): def get_base_task(engine, task): - # Returns the base task name + """Return the base task name""" if engine == "NEXTFLOW": individual_task = task.split(" ")[0] return individual_task diff --git a/tests/run_analyzer/unit/test_writeconfig.py b/tests/run_analyzer/unit/test_writeconfig.py index 53ce9dc..ccf2521 100644 --- a/tests/run_analyzer/unit/test_writeconfig.py +++ b/tests/run_analyzer/unit/test_writeconfig.py @@ -9,7 +9,7 @@ def test_get_base_task_nextflow(self): self.assertEqual(result, "task1") def test_get_base_task_cwl(self): - result = writeconfig.get_base_task("CWL", "task1 (sample1)") + _ = writeconfig.get_base_task("CWL", "task1 (sample1)") self.assertRaises(ValueError)