Skip to content

Commit

Permalink
(Streamline delivery) Filter out RSYNC from summaries (#422) (patch)
Browse files Browse the repository at this point in the history
### Fixed

- RSYNC analyses are excluded in the summary.
  • Loading branch information
islean committed Mar 27, 2024
1 parent ffb6f00 commit 89f8dfe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions trailblazer/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Workflow(StrEnum):
MIP_DNA: str = "MIP-DNA"
MIP_RNA: str = "MIP-RNA"
MUTANT: str = "MUTANT"
RSYNC: str = "RSYNC"


class SlurmSqueueHeader(StrEnum):
Expand Down
6 changes: 5 additions & 1 deletion trailblazer/services/analysis_service/analysis_service.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from trailblazer.constants import Workflow
from trailblazer.dto import (
AnalysesRequest,
AnalysesResponse,
Expand Down Expand Up @@ -73,6 +74,9 @@ def get_summaries(self, request_data: SummariesRequest) -> SummariesResponse:
summaries: list[Summary] = []
for order_id in request_data.order_ids:
analyses: list[Analysis] = self.store.get_latest_analyses_for_order(order_id)
summary: Summary = create_summary(analyses=analyses, order_id=order_id)
analyses_without_rsync: list[Analysis] = [
analysis for analysis in analyses if analysis.workflow != Workflow.RSYNC
]
summary: Summary = create_summary(analyses=analyses_without_rsync, order_id=order_id)
summaries.append(summary)
return SummariesResponse(summaries=summaries)

0 comments on commit 89f8dfe

Please sign in to comment.