Skip to content

Commit

Permalink
merge if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssadai committed Dec 4, 2024
1 parent a5ff5b4 commit de86836
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions bagel/utilities/derivative_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,16 @@ def create_completed_pipelines(session_proc_df: pd.DataFrame) -> list:
if (
pipeline in mappings.KNOWN_PIPELINE_URIS
and version in mappings.KNOWN_PIPELINE_VERSIONS[pipeline]
):
# Check that all pipeline steps have succeeded
if (
session_pipe_df[PROC_STATUS_COLS["status"]].str.lower()
== "success"
).all():
completed_pipeline = models.CompletedPipeline(
hasPipelineName=models.Pipeline(
identifier=mappings.KNOWN_PIPELINE_URIS[pipeline]
),
hasPipelineVersion=version,
)
completed_pipelines.append(completed_pipeline)
) and (
session_pipe_df[PROC_STATUS_COLS["status"]].str.lower()
== "success"
).all():
completed_pipeline = models.CompletedPipeline(
hasPipelineName=models.Pipeline(
identifier=mappings.KNOWN_PIPELINE_URIS[pipeline]
),
hasPipelineVersion=version,
)
completed_pipelines.append(completed_pipeline)

return completed_pipelines

0 comments on commit de86836

Please sign in to comment.