Skip to content

Commit

Permalink
correct retrieving reports directory, use pipestat rm_record for filt…
Browse files Browse the repository at this point in the history
…ered samples when destroying #469
  • Loading branch information
donaldcampbelljr committed Mar 14, 2024
1 parent 08824da commit fd05c04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
22 changes: 8 additions & 14 deletions looper/looper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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,
Expand All @@ -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,
)
Expand All @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd05c04

Please sign in to comment.