2016-12-02 22:33:40 +00:00
|
|
|
(ns proto-play
|
2024-03-06 03:49:19 +00:00
|
|
|
(:require [mount.tools.graph :as mg]
|
2016-12-02 22:33:40 +00:00
|
|
|
[proto-repl-charts.graph :as proto]))
|
|
|
|
|
|
|
|
|
|
(defn mount->proto [graph]
|
|
|
|
|
(reduce (fn [g {:keys [name deps]}]
|
|
|
|
|
(-> g
|
|
|
|
|
(update :nodes conj name)
|
|
|
|
|
(update :edges conj (-> deps (conj name) vec))))
|
|
|
|
|
{}
|
|
|
|
|
graph))
|
|
|
|
|
|
2024-03-06 03:49:19 +00:00
|
|
|
(->> (mg/states-with-deps)
|
2016-12-02 22:33:40 +00:00
|
|
|
mount->proto
|
|
|
|
|
(proto/graph "a proto graph of mount states"))
|