Skip to content

Commit

Permalink
Rename PipelineDeliverables to WorkflowDeliverables
Browse files Browse the repository at this point in the history
  • Loading branch information
sofstam committed Feb 19, 2024
1 parent 870ab2f commit ae11274
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
14 changes: 7 additions & 7 deletions cg/meta/workflow/nf_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
MetricsDeliverablesCondition,
)
from cg.models.fastq import FastqFileMeta
from cg.models.nf_analysis import FileDeliverable, PipelineDeliverables
from cg.models.nf_analysis import FileDeliverable, WorkflowDeliverables
from cg.models.rnafusion.rnafusion import CommandArgs
from cg.utils import Process
from cg.store.models import Sample
Expand Down Expand Up @@ -337,8 +337,8 @@ def get_deliverables_for_sample(
files.append(FileDeliverable(**deliverables))
return files

def get_deliverables_for_case(self, case_id: str) -> PipelineDeliverables:
"""Return PipelineDeliverables for a given case."""
def get_deliverables_for_case(self, case_id: str) -> WorkflowDeliverables:
"""Return WorkflowDeliverables for a given case."""
deliverable_template: list[dict] = self.get_deliverables_template_content()
samples: list[Sample] = self.status_db.get_samples_by_case_id(case_id=case_id)
files: list[FileDeliverable] = []
Expand All @@ -349,7 +349,7 @@ def get_deliverables_for_case(self, case_id: str) -> PipelineDeliverables:
)
files.extend(bundle for bundle in bundles_per_sample if bundle not in files)

return PipelineDeliverables(files=files)
return WorkflowDeliverables(files=files)

def get_multiqc_json_path(self, case_id: str) -> Path:
"""Return the path of the multiqc_data.json file."""
Expand Down Expand Up @@ -439,10 +439,10 @@ def validate_qc_metrics(self, case_id: str, dry_run: bool = False) -> None:
self.trailblazer_api.set_analysis_status(case_id=case_id, status=AnalysisStatus.COMPLETED)

def report_deliver(self, case_id: str) -> None:
"""Create deliverables file."""
deliverables_content: PipelineDeliverables = self.get_deliverables_for_case(case_id=case_id)
"""Write deliverables file."""
workflow_content: WorkflowDeliverables = self.get_deliverables_for_case(case_id=case_id)
self.write_deliverables_file(
deliverables_content=deliverables_content.dict(),
deliverables_content=workflow_content.dict(),
file_path=self.get_deliverables_file_path(case_id=case_id),
)
LOG.info(
Expand Down
1 change: 0 additions & 1 deletion cg/meta/workflow/rnafusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from cg.models.cg_config import CGConfig
from cg.models.deliverables.metric_deliverables import MetricsBase, MultiqcDataJson
from cg.models.fastq import FastqFileMeta
from cg.models.nf_analysis import PipelineDeliverables
from cg.models.rnafusion.rnafusion import (
RnafusionAnalysis,
RnafusionParameters,
Expand Down
2 changes: 1 addition & 1 deletion cg/models/nf_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def set_path_as_string(cls, file_path: str | Path) -> str | None:
return None


class PipelineDeliverables(BaseModel):
class WorkflowDeliverables(BaseModel):
"""Specification for workflow deliverables."""

files: list[FileDeliverable]

0 comments on commit ae11274

Please sign in to comment.