This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
141 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
(ns lambdacd.presentation.unified | ||
(:require [lambdacd.presentation.pipeline-structure :as pipeline-structure])) | ||
|
||
(defn- unify [step build-state] | ||
(let [step-id (:step-id step) | ||
result-for-step (get build-state step-id {}) | ||
with-result (assoc step :result result-for-step ) | ||
children (:children step) | ||
unified-children (map #(unify % build-state) children) | ||
with-children (assoc with-result :children unified-children)] | ||
(defn- unify-step [step build-state] | ||
(let [step-id (:step-id step) | ||
result-for-step (get build-state step-id {}) | ||
with-result (assoc step :result result-for-step) | ||
children (:children step) | ||
unified-children (map #(unify-step % build-state) children) | ||
with-children (assoc with-result :children unified-children)] | ||
with-children)) | ||
|
||
(defn unified-presentation [pipeline-def build-state] | ||
(defn pipeline-structure-with-step-results [pipeline-structure step-results] | ||
(map #(unify-step % step-results) pipeline-structure)) | ||
|
||
(defn unified-presentation [pipeline-def step-results] | ||
(let [structure (pipeline-structure/pipeline-display-representation pipeline-def)] | ||
(map #(unify % build-state) structure))) | ||
(pipeline-structure-with-step-results structure step-results))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters