From fd05c04e75e53992a63ef4d1e0fef63020aefede Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:14:52 -0400 Subject: [PATCH] correct retrieving reports directory, use pipestat rm_record for filtered samples when destroying https://github.com/pepkit/looper/issues/469 --- looper/looper.py | 22 ++++++++-------------- requirements/requirements-all.txt | 2 +- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/looper/looper.py b/looper/looper.py index a120eebbe..defe11597 100755 --- a/looper/looper.py +++ b/looper/looper.py @@ -46,7 +46,6 @@ sample_folder, ) from pipestat.reports import get_file_for_table -from pipestat.reports import get_file_for_project _PKGNAME = "looper" _LOGGER = logging.getLogger(_PKGNAME) @@ -270,7 +269,9 @@ def __call__(self, args, preview_flag=True): sample_name=sample.sample_name ) for pipeline_name, psm in psms.items(): - psm.remove(record_identifier=sample.sample_name) + psm.backend.remove_record( + record_identifier=sample.sample_name, rm_record=True + ) else: _remove_or_dry_run(sample_output_folder, args.dry_run) @@ -694,10 +695,8 @@ def destroy_summary(prj, dry_run=False, project_level=False): for name, psm in psms.items(): _remove_or_dry_run( [ - get_file_for_project( - psm, - pipeline_name=psm.pipeline_name, - directory="reports", + get_file_for_table( + psm, pipeline_name=psm.pipeline_name, directory="reports" ), get_file_for_table( psm, @@ -709,9 +708,6 @@ def destroy_summary(prj, dry_run=False, project_level=False): pipeline_name=psm.pipeline_name, appendix="objs_summary.yaml", ), - get_file_for_table( - psm, pipeline_name=psm.pipeline_name, appendix="reports" - ), ], dry_run, ) @@ -726,10 +722,8 @@ def destroy_summary(prj, dry_run=False, project_level=False): for name, psm in psms.items(): _remove_or_dry_run( [ - get_file_for_project( - psm, - pipeline_name=psm.pipeline_name, - directory="reports", + get_file_for_table( + psm, pipeline_name=psm.pipeline_name, directory="reports" ), get_file_for_table( psm, @@ -742,7 +736,7 @@ def destroy_summary(prj, dry_run=False, project_level=False): appendix="objs_summary.yaml", ), get_file_for_table( - psm, pipeline_name=psm.pipeline_name, appendix="reports" + psm, pipeline_name="", directory="aggregate_results.yaml" ), ], dry_run, diff --git a/requirements/requirements-all.txt b/requirements/requirements-all.txt index 5d7d5eb23..108303465 100644 --- a/requirements/requirements-all.txt +++ b/requirements/requirements-all.txt @@ -6,7 +6,7 @@ logmuse>=0.2.0 pandas>=2.0.2 pephubclient>=0.4.0 peppy>=0.40.0 -pipestat>=0.8.2a1 +pipestat>=0.8.3a1 pyyaml>=3.12 rich>=9.10.0 ubiquerg>=0.5.2