use only first connected runtime for REPL when multiple are connected

otherwise it errors out since it doesn't know which to eval in. not
a perfect behavior either but since no client knows how to pick a
runtime its a better default.

--- src/main/shadow/cljs/devtools/server/worker/impl.clj
+++ src/main/shadow/cljs/devtools/server/worker/impl.clj
@@ -313,11 +313,52 @@
                         (update :repl-sources repl-sources-as-client-resources build-state))})

   ;; (>!!output worker-state {:type :repl/runtime-connect :runtime-id runtime-id :runtime-info runtime-info})
-  (update worker-state :runtimes assoc runtime-id
-    {:runtime-id runtime-id
-     :runtime-out runtime-out
-     :runtime-info runtime-info
-     :init-sent true}))
+  (-> worker-state
+      (cond->
+        (zero? (count (:runtimes worker-state)))
+        (assoc :default-runtime-id runtime-id))
+      (update :runtimes assoc runtime-id
+        {:runtime-id runtime-id
+         :runtime-out runtime-out
+         :runtime-info runtime-info
+         :connected-since (System/currentTimeMillis)
+         :init-sent true})))
+
+(defn maybe-pick-different-default-runtime [{:keys [runtimes default-runtime-id] :as worker-state} runtime-id]
+  (cond
+    (not= default-runtime-id runtime-id)
+    worker-state
+
+    (empty? runtimes)
+    (dissoc worker-state :default-runtime-id)
+
+    :else
+    (assoc worker-state :default-runtime-id
+                        (->> (vals runtimes)
+                             (sort-by :connected-since)
+                             (first)
+                             :runtime-id))))
+
+(comment
+  ;; when a runtime disconnects and it was the default
+  ;; pick a new one if there are any
+  (maybe-pick-different-default-runtime
+    {:default-runtime-id 1
+     :runtimes {2 {:runtime-id 2 :connected-since 2}
+                3 {:runtime-id 3 :connected-since 3}}}
+    1)
+
+  ;; if there aren't any remove the default
+  (maybe-pick-different-default-runtime
+    {:default-runtime-id 1
+     :runtimes {}}
+    1)
+
+  ;; if it wasn't the default do nothing
+  (maybe-pick-different-default-runtime
+    {:default-runtime-id 2
+     :runtimes {}}
+    1))

 (defmethod do-proc-control :runtime-disconnect
   [worker-state {:keys [runtime-id]}]
@@ -325,6 +366,7 @@
   ;; (>!!output worker-state {:type :repl/runtime-disconnect :runtime-id runtime-id})
   (-> worker-state
       (update :runtimes dissoc runtime-id)
+      (maybe-pick-different-default-runtime runtime-id)
       ;; clean all sessions for that runtime
       (update :repl-sessions (fn [sessions]
                                (reduce-kv
@@ -655,10 +697,13 @@
       worker-state)))

 (defmethod do-proc-control :repl-eval
-  [{:keys [build-state runtimes] :as worker-state}
+  [{:keys [build-state runtimes default-runtime-id] :as worker-state}
    {:keys [result-chan input session-id runtime-id] :as msg}]
   (log/debug ::repl-eval {:session-id session-id :runtime-id runtime-id})
-  (let [runtime-count (count runtimes)]
+  (let [runtime-count (count runtimes)
+
+        runtime-id
+        (or runtime-id default-runtime-id)]

     (cond
       (nil? build-state)


try-proof fixed (quoted answer)

try-proof fixed (quoted answer)

--- src/latte/core.clj
+++ src/latte/core.clj
@@ -333,9 +333,10 @@
       (let [[status proof-term]
             (p/check-proof def-env (reverse (:params thm)) (:type thm) method steps)]
         (if (= status :ko)
-          [:ko {:msg (str "Proof failed: " (:msg proof-term))
-                :theorem thm-name
-                :error (dissoc proof-term :msg)}]
+          (let [res [:ko {:msg (str "Proof failed: " (:msg proof-term))
+                         :theorem thm-name
+                          :error (dissoc proof-term :msg)}]]
+            (list 'quote res))
           `(do
              [:ok {:proof-of (quote ~thm-name)}]))))))


apply small fix to badge grid element

apply small fix to badge grid element

--- src/cljs/salava/core/ui/badge_grid.cljs
+++ src/cljs/salava/core/ui/badge_grid.cljs
@@ -79,15 +79,14 @@
                                 [:div {:class (str "media-content " (if expired? "media-expired") (if revoked " media-revoked"))}
                                  [:a {:href "#" :on-click #(do
                                                              (.preventDefault %)
-                                                             (mo/open-modal [:badge :info] {:badge-id id} {
-                                                                                :shown (fn [] (.replaceState js/history {} "Badge modal" (path-for (str "/badge?id=" id))))
-                                                                                :hidden (fn []
-                                                                                (do
-                                                                                (if (clojure.string/includes? (str js/window.location.href) (path-for (str "/badge?id=" id)))
-                                                                                (.replaceState js/history {} "Badge modal" (path-for "/badge"))
-                                                                                (navigate-to (current-route-path)))
-                                                                                (init-data state)))
-                                                                                }))}
+                                                             (mo/open-modal [:badge :info] {:badge-id id} {:shown (fn [] (.replaceState js/history {} "Badge modal" (path-for (str "/badge?id=" id))))
+                                                                                :hidden (fn []
+                                                                                (do
+                                                                                (if (clojure.string/includes? (str js/window.location.href) (path-for (str "/badge?id=" id)))
+                                                                                (.replaceState js/history {} "Badge modal" (path-for "/badge"))
+                                                                                (navigate-to (current-route-path)))
+                                                                                (init-data state)))
+                                                                                }))}
                                   [:div.icons
                                    [:div.visibility-icon.inline
                                     (case visibility
@@ -96,9 +95,7 @@
                                       "public" [:i {:class "fa fa-globe"}]
                                       nil)
                                     (if metabadge-icon-fn [:div.pull-right [metabadge-icon-fn id]])
-                                    (when (or (pos? user_endorsements_count) (pos? endorsement_count)) [:span.badge-view [:i.fa.fa-handshake-o]])
-
-                                    ]
+                                    (when (or (pos? user_endorsements_count) (pos? endorsement_count)) [:span.badge-view [:i.fa.fa-handshake-o]])]

                                    (if expires_on
                                      [:div.righticon
@@ -118,9 +115,11 @@
                                     [:p issuer_content_name]]]
                                   ]])

-       (= "profile" badge-type) [:div.media-content
+       (= "profile" badge-type) [:div
                                  [:a {:href "#" :on-click #(mo/open-modal [:badge :info] {:badge-id id})}
-                                  [:div.icons.col-xs-12 {:style {:min-height "15px"}}
+                                 [:div.media-content
+
+                                  [:div.icons.col-xs-12 {:style {:min-height "15px" :padding "0px"}}
                                    [:div.visibility-icon.inline
                                     ;(if metabadge-icon-fn [:div.pull-right [metabadge-icon-fn id]])
                                     (when (or (pos? user_endorsements_count) (pos? endorsement_count)) [:span.badge-view [:i.fa.fa-handshake-o]])
@@ -131,7 +130,7 @@
                                    [:div.media-body
                                     [:div.media-heading name]
                                     [:div.media-issuer [:p issuer_content_name]]]
-                                   ]]]
+                                   ]]]]

        (= "gallery" badge-type) [:div
                                  [:a {:href "#" :on-click #(mo/open-modal [:gallery :badges] {:badge-id badge_id})


user label corretly shown for user

user label corretly shown for user

--- src/cljs/swarmpit/component/header.cljs
+++ src/cljs/swarmpit/component/header.cljs
@@ -5,7 +5,11 @@
             [swarmpit.storage :as storage]
             [swarmpit.routes :as routes]
             [swarmpit.component.state :as state]
-            [rum.core :as rum]))
+            [clojure.string :as string]
+            [rum.core :as rum]
+            [goog.crypt :as crypt])
+  (:import
+    [goog.crypt Md5]))

 (enable-console-print!)

@@ -28,10 +32,17 @@
   {:position "fixed"
    :right    20})

+(defn user-gravatar-hash [email]
+  (let [md5 (Md5.)]
+    (.update md5 (string/trim email))
+    (crypt/byteArrayToHex (.digest md5))))
+
 (defn- user-avatar []
   (comp/avatar
     {:style user-avatar-style
-     :src   "https://www.gravatar.com/avatar/6e6fd910c0594f4f2b448e3530eb5abd"}))
+     :src   (->> (storage/email)
+                 (user-gravatar-hash)
+                 (str "https://www.gravatar.com/avatar/"))}))

 (defn- user-menu-button []
   (comp/icon-button
@@ -61,7 +72,7 @@
 (rum/defc userbar < rum/static []
   [:div.user-bar
    (user-avatar)
-   [:span "admin"]
+   [:span (storage/user)]
    (user-menu)])

 (rum/defc appbar < rum/reactive []


fix spec

fix spec

--- src/cljs/triboard/logic/transition.cljs
+++ src/cljs/triboard/logic/transition.cljs
@@ -95,8 +95,8 @@
 ;; Public API
 ;; -----------------------------------------

-(s/fdef available-transitions
-  :args (s/tuple ::board/board)
+(s/fdef all-transitions
+  :args (s/cat :board ::board/board)
   :ret ::all-transitions)

 (defn all-transitions


Fix unexpected exception on cors handler (introduced in prev commit).

--- src/clojure/catacumba/handlers/misc.clj
+++ src/clojure/catacumba/handlers/misc.clj
@@ -76,8 +76,8 @@
       (when max-age
         (ct/set-headers! context {:access-control-max-age max-age}))
       (when allow-headers
-        (ct/set-headers! context {:access-control-allow-headers (normalize-headers allow-headers)}))
-    (hs/send! context ""))))
+        (ct/set-headers! context {:access-control-allow-headers (normalize-headers allow-headers)})))
+    (hs/send! context "")))

 (defn- handle-response
   [context headers {:keys [allow-headers expose-headers origin] :as opts}]


fix formatting

fix formatting

--- src/clj/lambdacd/internal/execution.clj
+++ src/clj/lambdacd/internal/execution.clj
@@ -276,7 +276,8 @@
   (let [build-number (pipeline-state/next-build-number (:pipeline-state-component context))]
     (let [runnable-pipeline (map eval pipeline)]
       (execute-steps runnable-pipeline {} (merge context {:result-channel (async/chan (async/dropping-buffer 0))
-                                                          :step-id [] :build-number build-number})))))
+                                                          :step-id []
+                                                          :build-number build-number})))))

 (defn retrigger [pipeline context build-number step-id-to-run next-build-number]
   (let [executable-pipeline (map eval pipeline) ]


declined badge modal

declined badge modal

--- src/cljs/salava/metabadge/ui/modal.cljs
+++ src/cljs/salava/metabadge/ui/modal.cljs
@@ -7,7 +7,9 @@
             [salava.core.i18n :refer [t]]
             [salava.metabadge.ui.metabadge :as mb]
             [salava.core.ui.modal :as mo]
-            [salava.core.time :refer [date-from-unix-time]]))
+            [salava.core.time :refer [date-from-unix-time]]
+            [salava.core.ui.error :as err]
+            [salava.badge.ui.modal :refer []]))

 (defn current-badge [metabadge]
   (let [{:keys [milestone? required_badges badge]} (-> metabadge first)]
@@ -18,6 +20,19 @@

 (defn completed? [req gotten]
   (>= gotten req))
+
+(defn init-user-badge [data-atom]
+  (ajax/GET
+    (path-for (str "/obpv1/badge/info/" (:id @data-atom)))
+    {:handler (fn [data]
+                (reset! data-atom data))}))
+
+(defn change-declined-badge-status [id]
+  (ajax/POST
+    (path-for (str "/obpv1/metabadge/update_status/" id))
+    {:handler (fn []
+                (mo/open-modal [:badge :info] {:badge-id id}))
+     :error-handler (fn [{:keys [status status-text]}])}))

 (defn dummy-badge [badge]
   (fn []
@@ -28,15 +43,40 @@
         [:div.image-container
          [:img.opaque {:src image :title "dummy badge"}]]]
        [:div.col-md-9
-        [:div.row
-         [:div.col-md-12
-          [:h1.uppercase-header name]
-          [:div.description description]
-          [:div {:class "row criteria-html"}
-           [:div.col-md-12
-            [:h2.uppercase-header (t :badge/Criteria)]
-            [:div {:dangerouslySetInnerHTML {:__html criteria}}]]]
-          ]]]])))
+        [:div.col-md-12
+         [:h1.uppercase-header name]
+         [:div.description description]
+         [:div {:class "row criteria-html"}
+          [:div.col-md-12
+           [:h2.uppercase-header (t :badge/Criteria)]
+           [:div {:dangerouslySetInnerHTML {:__html criteria}}]]]]]])))
+
+(defn declined-badge [badge]
+  (let [data-atom (atom {:id (-> badge :user_badge :id)})]
+    (init-user-badge data-atom)
+    (fn []
+      (let [{:keys [badge-info user_badge]} badge
+            {:keys [image name]} badge-info
+            {:keys [owner? user-logged-in?]} @data-atom]
+        (if (and user-logged-in? owner?)
+          [:div#metabadgegrid {:class "row"}
+           [:div.col-md-3.badge-image
+            [:div.image-container
+             [:img {:src image :title name}]]]
+           [:div.col-md-9
+            [:div.col-md-12
+             [:h1.uppercase-header name]
+             [:div.footer
+              (t :metabadge/Declinedbadgeinfo)
+              [:hr]
+              [:div
+               [:button {:class "btn btn-primary"
+                         :on-click #(change-declined-badge-status (:id @data-atom))}
+                (t :core/Yes)]
+               [:button {:class "btn btn-warning"
+                         :data-dismiss "modal"}
+                (t :core/No)]]]]]]
+          (err/error-content))))))

 (defn view-content [metabadge]
   (let [{:keys [badge required_badges milestone? min_required]} metabadge
@@ -48,8 +88,7 @@
     [:div.row.flip {:id "metabadgegrid"}
      [:div.col-md-3.badge-image
       [:div.image-container
-       [:img {:src (:image badge) :class (if-not is-complete? " opaque")}]
-       #_[:span.veil {:style {:height (if is-complete? "0%" "100%")}} ]]
+       [:img {:src (:image badge) :class (if-not is-complete? " opaque")}]]
       [:div.progress
        [:div.progress-bar.progress-bar-success
         {:class (if  is-complete? "" " progress-bar-striped active")
@@ -60,36 +99,33 @@
          :aria-valuemax "100"}
         (str completed "%")]]]
      [:div.col-md-9
-      ;[:div.row
-       [:div.col-md-12
-        [:h1.uppercase-header (:name metabadge)]
-        [:div.description (:description badge)]
-        [:div {:style {:margin-top "10px"}}[:label (str (t :metabadge/Minimumrequired) ": ")] min_required]
-        [:div [:label (str (t :metabadge/Amountearned)": ")] amount_received]
-
-        [:div.panel
-         [:div.panel-body
-          [:div.panel-heading [:span [:i {:class "fa fa-puzzle-piece"}] (if (empty? (rest required_badges)) (t :metabadge/Requiredbadge) (t :metabadge/Requiredbadges))]]
-          [:hr]
-          [:div.icons
-           (reduce (fn [result badge]
-                     (let [{:keys [badge-info received current user_badge]} badge
-                           {:keys [name image criteria]} badge-info
-                           {:keys [id issued_on status]} user_badge]
-                       (conj result
-                             (if received
-                               [:a {:href "#" :on-click #(mo/open-modal [:badge :info] {:badge-id id})} [:img.img-circle {:src image :alt name :title name :class (if current "img-thumbnail" "")}]]
-                               [:a {:href "#" :on-click #(mo/open-modal [:metabadge :dummy] badge)}
-                                [:img.not-received.img-circle {:src image :alt name :title name} ]]))
-                       )) [:div] (sort-by :received required_badges))]]]
-        [:div {:class "row criteria-html"}
-         [:div.col-md-12
-          [:h2.uppercase-header (t :badge/Criteria)]
-          [:div {:dangerouslySetInnerHTML {:__html (:criteria badge)}}]]]
-        ]]]
-
-    ; ]
-    ))
+      [:div.col-md-12
+       [:h1.uppercase-header (:name metabadge)]
+       [:div.description (:description badge)]
+       [:div {:style {:margin-top "10px"}}[:label (str (t :metabadge/Minimumrequired) ": ")] min_required]
+       [:div [:label (str (t :metabadge/Amountearned)": ")] amount_received]
+       [:div.panel
+        [:div.panel-body
+         [:div.panel-heading [:span [:i {:class "fa fa-puzzle-piece"}] (if (empty? (rest required_badges)) (t :metabadge/Requiredbadge) (t :metabadge/Requiredbadges))]]
+         [:hr]
+         [:div.icons
+          (reduce (fn [result badge]
+                    (let [{:keys [badge-info received current user_badge]} badge
+                          {:keys [name image criteria]} badge-info
+                          {:keys [id issued_on status]} user_badge]
+                      (conj result
+                            (if received
+                              (if (= "declined" status)
+                                [:a {:href "#" :on-click #(mo/open-modal [:metabadge :declined] badge)} [:img.img-circle {:src image :alt name :title name :class (if current "img-thumbnail" "")}]]
+                                [:a {:href "#" :on-click #(mo/open-modal [:badge :info] {:badge-id id})} [:img.img-circle {:src image :alt name :title name :class (if current "img-thumbnail" "")}]])
+                              [:a {:href "#" :on-click #(mo/open-modal [:metabadge :dummy] badge)}
+                               [:img.not-received.img-circle {:src image :alt name :title name} ]]))
+                      )) [:div] (sort-by :received required_badges))]]]
+       [:div {:class "row criteria-html"}
+        [:div.col-md-12
+         [:h2.uppercase-header (t :badge/Criteria)]
+         [:div {:dangerouslySetInnerHTML {:__html (:criteria badge)}}]]]
+       ]]]))

 (defn history [metabadge]
   (let [{:keys [badge required_badges milestone? min_required]} metabadge
@@ -111,28 +147,33 @@
          :aria-valuemax "100"}
         (str completed "%")]]]
      [:div.col-md-9 {:id "badge-stats"}
-       [:div.panel
-        [:div.panel-body
-         [:div.row.header
-          [:div.flip-table
-           [:div.col-md-6]
-           [:div.col-md-2 (t :metabadge/Dateissued)]
-           [:div.col-md-4 (t :metabadge/Badgestatus)]]]
-         (reduce (fn [r badge]
-                   (let [{:keys [badge-info received current user_badge]} badge
-                         {:keys [name image criteria]} badge-info
-                         {:keys [id issued_on status]} user_badge
-                         image-class (if-not received " opaque")]
-                     (conj r [:div.col-md-12
-                              [:div.flip-table
-                               [:div.col-md-1 [:img.badge-icon {:src image :class image-class}]]
-                               [:div.col-md-5 (if received [:a {:href "#" :on-click #(mo/open-modal [:badge :info] {:badge-id id})} name]
-                                                [:a {:href "#" :on-click #(mo/open-modal [:metabadge :dummy] badge)} name]
-                                                )]
-
-                               [:div.col-md-2 [:label (t :metabadge/Dateissued)] (if issued_on (date-from-unix-time (* 1000 issued_on)) "-")]
-                               [:div.col-md-4 [:label (t :metabadge/Badgestatus)] status]]]))) [:div.row.body] (sort-by #(-> % :user_badge :issued_on) (->> required_badges (filter :received))))]]]];]
-    ))
+      [:div.panel
+       [:div.panel-body
+        [:div.row.header
+         [:div.flip-table
+          [:div.col-md-6]
+          [:div.col-md-2 (t :metabadge/Dateissued)]
+          [:div.col-md-4 (t :metabadge/Badgestatus)]]]
+        (reduce (fn [r badge]
+                  (let [{:keys [badge-info received current user_badge]} badge
+                        {:keys [name image criteria]} badge-info
+                        {:keys [id issued_on status]} user_badge
+                        image-class (if-not received " opaque")]
+                    (conj r [:div.col-md-12
+                             [:div.flip-table
+                              [:div.col-md-1 [:img.badge-icon {:src image :class image-class}]]
+                              [:div.col-md-5 (if received
+                                               (if (= status "declined")
+                                                 [:a {:href "#" :on-click #(mo/open-modal [:metabadge :declined] badge)} name]
+                                                 [:a {:href "#" :on-click #(mo/open-modal [:badge :info] {:badge-id id})} name])
+                                               [:a {:href "#" :on-click #(mo/open-modal [:metabadge :dummy] badge)} name]
+                                               )]
+                              [:div.col-md-2 [:label (t :metabadge/Dateissued)] (if issued_on (date-from-unix-time (* 1000 issued_on)) "-")]
+                              [:div.col-md-4 [:label (t :metabadge/Badgestatus)] (case status
+                                                                                "accepted" (t :social/accepted)
+                                                                                "declined" (t :social/declined)
+                                                                                "pending" (t :social/pending)
+                                                                                "-")]]]))) [:div.row.body] (sort-by #(-> % :user_badge :issued_on) (->> required_badges (filter :received))))]]]]))

 (defn modal-navi [metabadge state]
   [:div.row.flip
@@ -180,4 +221,5 @@
 (def ^:export modalroutes
   {:metabadge {:metadata handler
                :multiblock multi-block
-               :dummy dummy-badge}})
+               :dummy dummy-badge
+               :declined declined-badge}})


Enter key press same as clicking Track button.

--- samples/twitterbuzz/src/twitterbuzz/core.cljs
+++ samples/twitterbuzz/src/twitterbuzz/core.cljs
@@ -10,6 +10,7 @@
   (:require [goog.net.Jsonp :as jsonp]
             [goog.Timer :as timer]
             [goog.events :as events]
+            [goog.events.EventType :as event-type]
             [goog.dom :as dom]))

 (def initial-state {:max-id 1
@@ -135,6 +136,9 @@
   (do (poll)
       (events/listen (dom/getElement "twitter-search-button")
                      "click"
+                     do-track-button-clicked)
+      (events/listen (dom/getElement "twitter-search-tag")
+                     event-type/CHANGE
                      do-track-button-clicked)))

 (start-app)


Fix regex in twitterbuzz.core to work with Safari.

--- samples/twitterbuzz/src/twitterbuzz/core.cljs
+++ samples/twitterbuzz/src/twitterbuzz/core.cljs
@@ -32,8 +32,11 @@
   (doseq [f fns]
     (f tweets)))

+(defn matches [p s]
+  (seq (js* "~{s}.match(new RegExp(~{p}, 'g'))")))
+
 (defn parse-mentions [tweet]
-  (map second (re-seq (re-pattern "@(\\w*)") (:text tweet))))
+  (map #(apply str (drop 1 %)) (matches "@\\w*" (:text tweet))))

 (defn add-mentions
   "Add the user to the mentions map for each user she mentions."
@@ -108,7 +111,7 @@

 (comment

-  (parse-mentions {:text "What's up @sue and @larry"})
+  (parse-mentions {:text "What's up @sue: and @larry"})

   (add-mentions {} "jim" ["sue"])
   (add-mentions {"sue" {}} "jim" ["sue"])


Added clearer test for weird reference behavior with Error vs. Exception

--- test/midje/checkers/t_simple.clj
+++ test/midje/checkers/t_simple.clj
@@ -152,3 +152,20 @@
    (throw-exception "throws Error") => truthy)
  (fact
    @reported => (three-of checker-fails)))
+
+;; Strange issue with validations that throw Exception does not happen
+;; with error. Here's the expected behavior:
+
+
+(def ^{:dynamic true} *with-error-validator*)
+(set-validator! #'*with-error-validator* (fn [v] (if (pos? v) true (throw (Error. "gorp")))))
+(fact (binding [*with-error-validator* -1]) => (throws Error))
+(fact (binding [*with-error-validator* -1]) => (throws "gorp"))
+
+
+(def ^{:dynamic true} *with-exception-validator*)
+(set-validator! #'*with-exception-validator* (fn [v] (if (pos? v) true (throw (Exception. "gorp")))))
+(fact (binding [*with-exception-validator* -1]) => (throws Exception))
+(fact (binding [*with-exception-validator* -1]) =not=> (throws "gorp"))   ;; !
+
+


Added filter to exclude fully qualified blank node URIs

--- kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/pre-identifier-merge/step_a-ontology_to_ice/step_a/root_concept_identifier_gen.clj
+++ kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/pre-identifier-merge/step_a-ontology_to_ice/step_a/root_concept_identifier_gen.clj
@@ -10,6 +10,7 @@
   :sparql-string "select ?root {
 		  ?root rdf:type owl:Class .
 		  minus{?root rdfs:subClassOf ?class}
-		minus{?root owl:deprecated true}
+		  minus{?root owl:deprecated true}
+		  filter(!contains(str(?root), "/bnode/"))
 		}"
 }


Whitespace cleanup.

Whitespace cleanup.

--- test/poky/protocol/http_test.clj
+++ test/poky/protocol/http_test.clj
@@ -75,7 +75,7 @@
          (kv/delete* ..store.. ..bucket.. ..key..) => false))

 (defn create-system
- []
+ []
   (when-let [dsn (env :database-url)] (system/create-system (kv.jdbc/create dsn) #'http/start-server)))

 (defn end-point-url
@@ -92,33 +92,33 @@
   (facts :integration :put
          (client/put (end-point-url default-port bucket "set-me")
                       {:body "with-a-value"}) => (contains {:status 200})
-         (client/get (end-point-url default-port bucket "set-me")) => (contains {:status 200
+         (client/get (end-point-url default-port bucket "set-me")) => (contains {:status 200
                                                                                :body "with-a-value"}))

   (facts :integration :put :multi-byte
          (client/put (end-point-url default-port bucket "put-multi-byte")
                       {:body "讓我們吃的點心"}) => (contains {:status 200})
-         (client/get (end-point-url default-port bucket "put-multi-byte")) => (contains {:status 200
+         (client/get (end-point-url default-port bucket "put-multi-byte")) => (contains {:status 200
                                                                                :body "讓我們吃的點心"}))
   (facts :integration :post
          (client/post (end-point-url default-port bucket "set-me")
                       {:body "with-a-value"}) => (contains {:status 200})
-         (client/get (end-point-url default-port bucket "set-me")) => (contains {:status 200
+         (client/get (end-point-url default-port bucket "set-me")) => (contains {:status 200
                                                                                :body "with-a-value"}))

   (facts :integration :post :multi-byte
          (client/post (end-point-url default-port bucket "post-multi-byte")
                       {:body "你想去哪兒吃"}) => (contains {:status 200})
-         (client/get (end-point-url default-port bucket "post-multi-byte")) => (contains {:status 200
+         (client/get (end-point-url default-port bucket "post-multi-byte")) => (contains {:status 200
                                                                                :body "你想去哪兒吃"}))

   (facts :integration :delete
-         (client/delete (end-point-url default-port bucket "delete-me")
+         (client/delete (end-point-url default-port bucket "delete-me")
                         {:throw-exceptions false}) => (contains {:status 404})
          (client/post (end-point-url default-port bucket "delete-me")
                       {:body "with-a-value"}) => (contains {:status 200})
          (client/delete (end-point-url default-port bucket "delete-me")
                         {:throw-exceptions false}) => (contains {:status 200})
-         (client/delete (end-point-url default-port bucket "delete-me")
+         (client/delete (end-point-url default-port bucket "delete-me")
                         {:throw-exceptions false}) => (contains {:status 404})))


Fix show rest parts in pay action.

Fix show rest parts in pay action.

--- src/ombs/dbold.clj
+++ src/ombs/dbold.clj
@@ -106,7 +106,7 @@
   ; Some events haven't parts, and after join it's have nil parts. So we need
   ; fix before substract.
   (map
-    #(update % :parts
+    #(update % :rest
              (comp (partial subtract-feesed-parts (:id %)) f/nil-fix))
     ; First of all, we select events from it table and join for each
     ; rest(actual) parts.


Sort (print-instances)

Sort (print-instances)

--- src/circle/backend/ec2.clj
+++ src/circle/backend/ec2.clj
@@ -347,7 +347,7 @@
                (assoc :state-name (-> inst :state :name))
                (assoc :security-groups (str/join "," (for [g (:securityGroups inst)]
                                                        (.getGroupName g))))
-               (assoc :tags (into {} (for [t (map bean (-> inst :tags))] [(:key t) (:value t)]))))))
+               (assoc :tags (into (sorted-map) (for [t (map bean (-> inst :tags))] [(:key t) (:value t)]))))))
        (table [:instanceId :state-name :publicIpAddress :imageId :security-groups :tags])
        (println)))


Move the timeout

Move the timeout

Had the right idea, but in the wrong place.  This moves the timeout to
the input-reading side.  Upon timeout, check to see if the process
still lives, and if so, keep waiting, else close all of the channels
and return.

--- src/clj/runbld/process.clj
+++ src/clj/runbld/process.clj
@@ -97,14 +97,22 @@

 (s/defn start-input-multiplexer!
   ([in-ch   :- ManyToManyChannel
-    out-chs :- [ManyToManyChannel]]
-   (go-loop [x (<! in-ch)]
-     (if x
-       (do (doseq [ch out-chs]
-             (>! ch x))
-           (recur (<! in-ch)))
-       (doseq [c out-chs]
-         (close! c))))))
+    out-chs :- [ManyToManyChannel]
+    proc]
+   (go-loop []
+     ;; wait 5 minutes for input
+     (let [[x] (async/alts! [in-ch (async/timeout (* 1000 60 5))])]
+       (if x
+         ;; process input when found
+         (do (doseq [ch out-chs]
+               (>! ch x))
+             (recur))
+         ;; if no input or timeout, check if process is done and wait
+         ;; for more input, if not
+         (if (.isAlive proc)
+           (recur)
+           (doseq [c out-chs]
+             (close! c))))))))

 (s/defn exec-pb :-
   {:exit-code      s/Num
@@ -120,7 +128,7 @@
    log-extra :- {s/Any s/Any}
    timeout   :- (s/maybe s/Str)]
   (let [{:keys [start proc out bytes threads]} (start pb log-extra)
-        multi (start-input-multiplexer! out listeners)
+        multi (start-input-multiplexer! out listeners proc)
         timeout-provided? (not (empty? timeout))
         exit-code (if timeout-provided?
                     (.waitFor proc
@@ -239,13 +247,9 @@
         listeners [file-ch es-ch stdout-ch stderr-ch]
         result (exec program args scriptfile cwd
                      env listeners log-extra timeout)
-        ;; The process has exited, wait for these channels to close
         _ (doall (map <!!
-                      [file-process es-process]))
-        ;; stdout and stderr channels might hang on bad input.
-        ;; Waiting indefinitely is a bad idea
-        _ (doall (map #(alts!! [% (async/timeout (* 1000 60 5))])
-                      [stderr-process stdout-process]))
+                      [stderr-process stdout-process
+                       file-process es-process]))
         out-bytes (@(:bytes result) :stdout)
         err-bytes (@(:bytes result) :stderr)
         total-bytes (@(:bytes result) :total)]


change type hint in message

change type hint in message

--- src/clj_kafka/producer.clj
+++ src/clj_kafka/producer.clj
@@ -14,7 +14,7 @@
 (defn message
   "Creates a message with the specified payload.
    payload : bytes for the message payload. e.g. (.getBytes \"hello, world\")"
-  [^:bytes payload]
+  [#^bytes payload]
   (Message. payload))

 (defn send-messages


Mark child component as private

Mark child component as private

This is mainly to more clearly show the "entry point" component(s) of a namespace, i.e., the ones that are used as children of components in other namespaces.

--- src/cljs/cglossa/core.cljs
+++ src/cljs/cglossa/core.cljs
@@ -23,7 +23,7 @@
 (defonce app-state (into {} (map-vals atom state)))
 (defonce app-data (into {} (map-vals atom data)))

-(defn header []
+(defn- header []
   [:div.navbar.navbar-fixed-top [:div.navbar-inner [:div.container [:span.brand "Glossa"]]]])

 (defn app [{:keys [showing-results?] :as s} {:keys [corpus] :as d}]


debug println on render

debug println on render

--- src/cljs/html2om/core.cljs
+++ src/cljs/html2om/core.cljs
@@ -29,6 +29,9 @@

   Object
   (render [this]
+          (println "render called"
+                   (om/props this)
+                   )
     (dom/div #js {:className "container"}
              "Enter HTML:"
              (dom/textarea #js {:className "form-control"


fixing imports

fixing imports

--- src/cljs/ohds/backend.cljs
+++ src/cljs/ohds/backend.cljs
@@ -1,4 +1,7 @@
-(ns ohds.backend)
+(ns ohds.backend
+  (:require-macros [cljs.core.async.macros :refer [go]])
+  (:require [cljs-http.client :as http]
+            [cljs.core.async :refer [<!]]))

 (defn fieldworker-uuid [username password]
   (go (let [result (->> {:form-params {:username @username :password @password}}


Fix some FileSystem/IO issues; NB -- need more tests.

--- src/clojure/parkour/fs.clj
+++ src/clojure/parkour/fs.clj
@@ -67,13 +67,14 @@
     (let [uri (URI. x)]
       (condp = (.getScheme uri)
         "file" (.toURI (io/file uri))
-        nil    (let [p (Path. x)]
-                 (.toUri (.makeQualified p (path-fs p))))
+        nil    (-uri (-path x))
         ,,,,,, uri)))

   Path
   (-path [x] x)
-  (-uri [x] (.toUri (.makeQualified x (path-fs x))))
+  (-uri [x]
+    (let [fs (ignore-errors (path-fs x))]
+      (-> x (cond-> fs (.makeQualified fs)) .toUri)))

   URI
   (-path [x] (Path. x))
@@ -141,14 +142,16 @@
 (extend Path
   io/IOFactory
   (assoc io/default-streams-impl
-    :make-input-stream (fn [p opts]
-                         (if-let [fs (or (:fs opts) (path-fs p))]
-                           (io/make-input-stream (path-open fs p) opts)
-                           (io/input-stream (io/as-url p))))
-    :make-output-stream (fn [p opts]
-                          (if-let [fs (or (:fs opts) (path-fs p))]
-                            (io/make-output-stream (path-open fs p) opts)
-                            (io/output-stream (io/as-url p))))))
+    :make-input-stream
+    , (fn [p opts]
+        (if-let [fs (or (:fs opts) (ignore-errors (path-fs p)))]
+          (io/make-input-stream (path-open fs p) opts)
+          (io/make-input-stream (io/as-url p) opts)))
+    :make-output-stream
+    , (fn [p opts]
+        (if-let [fs (or (:fs opts) (ignore-errors (path-fs p)))]
+          (io/make-output-stream (path-create fs p) opts)
+          (io/make-output-stream (io/as-url p) opts)))))

 ;; Private for some reason, so copy internally
 (def ^:private do-copy @#'io/do-copy)


matcher-combinators: Improve "Explicit matchers" section

--- test/com/nomistech/clojure_the_language/c_800_libraries/s_106_matcher_combinators/matcher_generators_test.clj
+++ test/com/nomistech/clojure_the_language/c_800_libraries/s_106_matcher_combinators/matcher_generators_test.clj
@@ -130,34 +130,33 @@
 ;;;; ___________________________________________________________________________
 ;;;; ---- Explicit matchers ----

-(deftest match-with-explicit-matchers-test
-  ;; TODO: When is this useful? Just /eg/ `(is (match? 37 (+ 29 8)))`
-  ;;       works fine.
-  (is (match? (m/equals 37)
-              (+ 29 8)))
-  (is (match? (m/regex #"fox")
-              "The quick brown fox jumps over the lazy dog"))
-  (is (match? (m/pred even?)
-              1234)) ; TODO: I guess we need this in contexts where `even?` would not be treated as a pred -- but what are those contexts?
-  )
+(deftest explicit-matchers-test
+  (testing "Some examples that I think are never needed -- these are the defaults for the data types (TODO: Are there contexts where you would need these?)"
+    (is (match? (m/equals 37)
+                (+ 29 8)))
+    (is (match? (m/regex #"fox")
+                "The quick brown fox jumps over the lazy dog"))
+    (is (match? (m/pred even?)
+                1234))))

-(deftest equals-overrides-predicate-test
-  (is (match? (m/equals even?)
-              even?)))
+(deftest explicit-use-of-equals-test

-(deftest equals-overrides-map-embeds-test
-  (testing "Use m/equals for exact match"
+  (testing "`m/equals` overrides default treatment of functions as predicates"
+    (is (match? (m/equals even?)
+                even?)))
+
+  (testing "`m/equals` checks that all map entries are present"
     (is (match? (m/equals {:a 1 :b 2})
                 {:a 1 :b 2}))
     (is (match? (m/mismatch ; see ++use-of-mismatch++ at top of file
                  (m/equals {:a 1}))
-                {:a 1 :b 2}))))
+                {:a 1 :b 2})))

-(deftest predicates-within-equals-test
-  (is (match? (m/equals {:a 1 :b even?})
-              {:a 1 :b 1234})))
+  (testing "The overriding does not effect how nested matching works"
+    (is (match? (m/equals {:a 1 :b even?})
+                {:a 1 :b 1234}))))

-(deftest WIP-embeds-test ; TODO
+(deftest explicit-use-of-embeds-test ; TODO
   (is (match? (m/embeds [1 3 5])
               [1 2 3 4 5])))


Fixing cell IDs in cell labeler

Fixing cell IDs in cell labeler

--- src/plugins/Scripts/Funimage/Morphology/Cell_Labeler.clj
+++ src/plugins/Scripts/Funimage/Morphology/Cell_Labeler.clj
@@ -249,7 +249,7 @@
  (doseq [cell-res cell-results]
    (let [cell (second cell-res)
          idx (.getCounter rt)]
-     (.setValue rt "CellID" idx (double idx))
+     (.setValue rt "CellID" idx (double (first cell-res)))
      (doseq [k (keys cell)]
        (.setValue rt (name k) (int idx) (double (get cell k))))))
  (.show rt "Cell Labeler Results"))


TCLI-91 cljc exceptions

TCLI-91 cljc exceptions

--- src/main/clojure/clojure/tools/cli.cljc
+++ src/main/clojure/clojure/tools/cli.cljc
@@ -357,7 +357,7 @@
   (let [{:keys [validate-fn validate-msg]} spec]
     (or (loop [[vfn & vfns] validate-fn [msg & msgs] validate-msg]
           (when vfn
-            (if (try (vfn value) (catch Throwable e))
+            (if (try (vfn value) (catch #?(:clj Throwable :cljs :default) e))
               (recur vfns msgs)
               [::error (validation-error opt optarg msg)])))
         [value nil])))
@@ -367,7 +367,7 @@
         [value error] (if parse-fn
                         (try
                           [(parse-fn value) nil]
-                          (catch Throwable e
+                          (catch #?(:clj Throwable :cljs :default) e
                             [nil (parse-error opt optarg (str e))]))
                         [value nil])]
     (if error


Use current time zone to display the times. Use 24h format.

--- src/lunch_time/screens/main_screen.cljs
+++ src/lunch_time/screens/main_screen.cljs
@@ -15,7 +15,7 @@

 (def logo-img (js/require "./images/cljs.png"))

-(def format (time-format/formatter "hh:mm"))
+(def format (time-format/formatter "HH:mm"))

 (defn- lunch-complete? [start-time end-time]
   (and (not= @start-time nil) (not= @end-time nil)))
@@ -26,9 +26,9 @@
     (fn []
       [view {:style {:flex-direction "column" :margin 40 :align-items "center"}}
        (when @start-time
-         [text {:style {:font-size 30 :font-weight "100" :margin-bottom 20 :text-align "center"}} "Went to lunch at " (time-format/unparse format @start-time)])
+         [text {:style {:font-size 30 :font-weight "100" :margin-bottom 20 :text-align "center"}} "Went to lunch at " (time-format/unparse format (time/to-default-time-zone @start-time))])
        (when @end-time
-         [text {:style {:font-size 30 :font-weight "100" :margin-bottom 20 :text-align "center"}} "Came back from lunch at " (time-format/unparse format @end-time)])
+         [text {:style {:font-size 30 :font-weight "100" :margin-bottom 20 :text-align "center"}} "Came back from lunch at " (time-format/unparse format (time/to-default-time-zone @end-time))])
        (when (lunch-complete? start-time end-time)
          [text {:style {:font-size 30 :font-weight "100" :margin-bottom 20 :text-align "center"}} "You were at lunch for " (time/in-minutes (time/interval @start-time @end-time)) " minutes"])
        [image {:source logo-img


Capture REPL-entered source

Capture REPL-entered source


(PDB-5141) call-with-lock-timeout: don't use "show lock_timeout"

It produces "human readable" values (e.g. "300ms"), and we expect
integer milliseconds.  Read the integer ms value from pg_settings
instead.

--- src/puppetlabs/puppetdb/scf/storage.clj
+++ src/puppetlabs/puppetdb/scf/storage.clj
@@ -1589,8 +1589,8 @@
   (let [set-timeout #(->> (format "set local lock_timeout = %d" %)
                           (sql/execute! jdbc/*db*))]
     ;; FIXME: possibly too crude...
-    (let [orig (-> "show lock_timeout"
-                   query-to-vec first :lock_timeout Long/parseLong)]
+    (let [orig (-> "select setting from pg_settings where name = 'lock_timeout'"
+                   query-to-vec first :setting Long/parseLong)]
       (set-timeout timeout-ms)
       (let [result (f)]
         ;; FIXME: For now we assume that when there's an exception,


Too much unicode? nah...

Too much unicode? nah...

--- src/gpx/geo.clj
+++ src/gpx/geo.clj
@@ -13,7 +13,7 @@
   "Uses the haversine formula to calculate the distance between two points

   Haversine formula:
-    a = sin²(Δφ/2) + cos φ1 * cos φ2 * sin²(Δλ/2)
+    a = sin²(Δφ/2) + cos φ₁ * cos φ₂ * sin²(Δλ/2)
     c = 2 * atan2( √a, √(1−a) )
     d = R * c

@@ -23,17 +23,17 @@
   "
   [point1 point2]

-  (let [φ1 (-> point1 :lat deg-rad)
-        λ1 (-> point1 :lon deg-rad)
-        φ2 (-> point2 :lat deg-rad)
-        λ2 (-> point2 :lon deg-rad)
-        Δφ (- φ2 φ1)
-        Δλ (- λ2 λ1)
+  (let [φ₁ (-> point1 :lat deg-rad)
+        λ₁ (-> point1 :lon deg-rad)
+        φ₂ (-> point2 :lat deg-rad)
+        λ₂ (-> point2 :lon deg-rad)
+        Δφ (- φ₂ φ₁)
+        Δλ (- λ₂ λ₁)

         a (+ (math/expt (Math/sin (/ Δφ 2)) 2)
              (*
-               (Math/cos φ1)
-               (Math/cos φ2)
+               (Math/cos φ₁)
+               (Math/cos φ₂)
                (math/expt (Math/sin (/ Δλ 2)) 2)))

         c (* 2 (Math/atan2 (math/sqrt a)


Added Attrs record type to represent tag attributes

Attrs also implments IFn, in the same way as Css

--- src/hyjinks.clj
+++ src/hyjinks.clj
@@ -41,8 +41,14 @@

 ;; Core types

-(defn- str-attrs [attrs]
-	(str-join (map (fn [[k v]] [" " k "=\"" (html-escape v) "\""]) attrs)))
+(defrecord Attrs []
+	java.lang.Object
+	(toString [this]
+		(str-join (map (fn [[k v]] [" " k "=\"" (html-escape v) "\""]) this)))
+	clojure.lang.IFn
+	(invoke [this] this)
+	(invoke [this x] (.applyTo this (list x)))
+	(applyTo [this args] (let [t (first args)] (t this))))

 (defrecord Css []
 	java.lang.Object
@@ -51,14 +57,14 @@
 	clojure.lang.IFn
 	(invoke [this] this)
 	(invoke [this x] (.applyTo this (list x)))
-	(applyTo [this args] (let [tag (first args)] (tag this))))
+	(applyTo [this args] (let [t (first args)] (t this))))

 (defrecord-ifn Tag [tag-name attrs css items]
 	java.lang.Object
 	(toString [_]
 		(let [attrs-with-css (if (empty? css) attrs (assoc attrs :style (str css)))]
 			(str-join
-				"<" tag-name (str-attrs attrs-with-css)
+				"<" tag-name attrs-with-css
 				(if (empty? items)
 					" />"
 					[">" (map html-escape items) "</" tag-name ">"]))))
@@ -67,6 +73,8 @@

 (defrecord Literal [s] java.lang.Object (toString [_] s))

+(defmethod print-method Attrs [a ^java.io.Writer w] (.write w (str a)))
+
 (defmethod print-method Css [c ^java.io.Writer w] (.write w (str c)))

 (defmethod print-method Tag [t ^java.io.Writer w] (.write w (str t)))
@@ -75,6 +83,8 @@

 ;; Builder functions

+(def empty-attrs (Attrs.))
+
 (def empty-css (Css.))

 (def literal? (partial instance? Literal))
@@ -83,9 +93,11 @@

 (def css? (partial instance? Css))

-(defn attrs? [x] (and (map? x) (not (css? x)) (not (tag? x)) (not (literal? x))))
-
-(defn child-item? [x] (not (or (attrs? x) (css? x) (nil? x) (= "" x))))
+(def attrs? (partial instance? Attrs))
+
+(defn attrs-or-map? [x] (or (attrs? x) (and (map? x) (not (css? x)) (not (tag? x)) (not (literal? x)))))
+
+(defn child-item? [x] (not (or (attrs-or-map? x) (css? x) (nil? x) (= "" x))))

 (defn assoc-attrs [t & key-vals]
 	(assoc t :attrs (merge (:attrs t) (apply hash-map key-vals))))
@@ -96,7 +108,7 @@
 (defn css [& key-vals] (merge empty-css (apply hash-map key-vals)))

 (defn tag [tag-name & stuff]
-	(let [attrs (apply merge {} (filter attrs? stuff))
+	(let [attrs (apply merge empty-attrs (filter attrs-or-map? stuff))
 	      css (apply merge empty-css (filter css? stuff))
 	      items (flatten (filter child-item? stuff))]
 		(Tag. tag-name attrs css items)))
@@ -104,7 +116,7 @@
 (defn extend-tag [t & stuff]
 	(if (empty? stuff)
 		t
-		(let [attrs (apply merge (:attrs t) (filter attrs? stuff))
+		(let [attrs (apply merge (:attrs t) (filter attrs-or-map? stuff))
 		      css (apply merge (:css t) (filter css? stuff))
 		      items (concat (:items t) (flatten (filter child-item? stuff)))]
 			(Tag. (:tag-name t) attrs css items))))
@@ -153,13 +165,15 @@
 (defn radio-list [param & opts]
 	(mapcat (fn [[t v]] [(label v {:for t}) (input {:id v :value v :name param :type "radio"})]) opts))

-;; CSS Value Builders
+;; CSS Units

 (defmacro defunit [suffix] `(defn ~suffix [~'x] (if (number? ~'x) (str ~'x ~(name suffix)) (str-k ~'x))))

 (defunit px)
 (defunit deg)
 (defunit %)
+
+;; CSS Value Builders

 (defmacro defcssval [id & args]
 	(let [prepare-arg (fn [arg] (if (.contains (name arg) "angle") `(deg ~arg) `(str-k ~arg)))


Less aggressive grace period on ssl deployment error tests (#1466)

--- waiter/integration/waiter/deployment_errors_test.clj
+++ waiter/integration/waiter/deployment_errors_test.clj
@@ -106,7 +106,7 @@
     (let [headers {:x-waiter-name (rand-name)
                    ; wrong backend-proto
                    :x-waiter-backend-proto "https"
-                   :x-waiter-grace-period-secs 15
+                   :x-waiter-grace-period-secs 45
                    :x-waiter-health-check-interval-secs 5
                    :x-waiter-health-check-max-consecutive-failures 1
                    :x-waiter-queue-timeout 600000}
@@ -124,7 +124,7 @@
                    ; wrong backend-proto
                    :x-waiter-backend-proto "http"
                    :x-waiter-cmd (kitchen-cmd "--port $PORT0 --ssl-self-signed")
-                   :x-waiter-grace-period-secs 15
+                   :x-waiter-grace-period-secs 45
                    :x-waiter-health-check-interval-secs 5
                    :x-waiter-health-check-max-consecutive-failures 1
                    :x-waiter-queue-timeout 600000}


:tada: Copy and paste to cursor position

--- frontend/src/uxbox/main/data/workspace.cljs
+++ frontend/src/uxbox/main/data/workspace.cljs
@@ -2051,43 +2051,51 @@

 (defn- paste-impl
   [{:keys [selected objects] :as data}]
-  (letfn [(prepare-change [id]
+  (letfn [(prepare-change [delta id]
             (let [obj (get objects id)]
-              ;; (prn "prepare-change" id obj)
               (if (= :frame (:type obj))
-                (prepare-frame-change obj)
-                (prepare-shape-change obj uuid/zero))))
-
-          (prepare-shape-change [obj frame-id]
-            (let [id (uuid/next)]
+                (prepare-frame-change obj delta)
+                (prepare-shape-change obj delta uuid/zero))))
+
+          (prepare-shape-change [obj delta frame-id]
+            (let [id (uuid/next)
+                  renamed-obj (assoc obj :id id :frame-id frame-id)
+                  moved-obj (geom/move renamed-obj delta)]
               {:type :add-obj
                :id id
                :frame-id frame-id
-               :obj (assoc obj :id id :frame-id frame-id)}))
-
-          (prepare-frame-change [obj]
+               :obj moved-obj}))
+
+          (prepare-frame-change [obj delta]
             (let [frame-id (uuid/next)
                   sch (->> (map #(get objects %) (:shapes obj))
-                           (map #(prepare-shape-change % frame-id)))
+                           (map #(prepare-shape-change % delta frame-id)))
+                  renamed-frame (-> obj
+                                    (assoc :id frame-id)
+                                    (assoc :frame-id uuid/zero)
+                                    (assoc :shapes (mapv :id sch)))
+                  moved-frame (geom/move renamed-frame delta)
                   fch {:type :add-obj
                        :id frame-id
                        :frame-id uuid/zero
-                       :obj (-> obj
-                                (assoc :id frame-id)
-                                (assoc :frame-id uuid/zero)
-                                (assoc :shapes (mapv :id sch)))}]
+                       :obj moved-frame}]
               (d/concat [fch] sch)))]

   (ptk/reify ::paste-impl
     ptk/WatchEvent
     (watch [_ state stream]
-      (let [rchanges (->> (map prepare-change selected)
+      (let [selected-objs (map #(get objects %) selected)
+            orig-pos (geom/selection-rect selected-objs)
+            mouse-pos @ms/mouse-position
+            delta {:x (- (:x mouse-pos) (:x orig-pos))
+                   :y (- (:y mouse-pos) (:y orig-pos))}
+
+            rchanges (->> (map (partial prepare-change delta) selected)
                           (flatten))
             uchanges (map (fn [ch]
                             {:type :del-obj
                              :id (:id ch)})
                           rchanges)]
-        (cljs.pprint/pprint rchanges)
         (rx/of (commit-changes (vec rchanges)
                                (vec (reverse uchanges))
                                {:commit-local? true})))))))


add cache to init

add cache to init

--- src/pc/init.clj
+++ src/pc/init.clj
@@ -1,18 +1,19 @@
 (ns pc.init
   (:require pc.assets
+            pc.cache
             pc.datomic
+            pc.datomic.admin-db
             pc.datomic.migrations
             pc.datomic.schema
             pc.email
+            pc.http.admin
             pc.less
             pc.logging
             pc.models.chat-bot
             pc.nrepl
+            pc.repl
             pc.server
-            pc.statsd
-            pc.repl
-            pc.datomic.admin-db
-            pc.http.admin)
+            pc.statsd)
   (:gen-class))

 (defn init-fns []
@@ -26,6 +27,7 @@
    #'pc.models.chat-bot/init
    #'pc.assets/init
    #'pc.email/init
+   #'pc.cache/init
    #'pc.server/init
    #'pc.datomic.admin-db/init
    #'pc.http.admin/init])


Add 'config dump' command to show config map.

--- src/vault/tool.clj
+++ src/vault/tool.clj
@@ -1,10 +1,8 @@
 (ns vault.tool
   (:require (clojure
-              [edn :as edn]
-              [pprint :refer [pprint]])
+              [edn :as edn])
             [vault.cli :refer [command execute]]
-            (vault.store
-              [file :refer [file-store]])
+            [vault.data.print :refer [pprint cprint]]
             (vault.tool
               [config :as config]
               [blob :as blob-tool]))
@@ -15,8 +13,8 @@

 (defn- debug-command
   [opts args]
-  (pprint opts)
-  (pprint args))
+  (cprint opts)
+  (cprint args))

 (defn- not-yet-implemented
@@ -45,6 +43,17 @@

     (command "config <type>"
       "Show configuration information."
+
+      (command "dump"
+        "Prints out a raw version of the configuration map."
+
+        ["--pretty" "Formats the info over multiple lines for easier viewing."
+         :flag true :default false]
+
+        (action [opts args]
+          (if (:pretty opts)
+            (cprint opts)
+            (prn opts))))

       (command "stores"
         "List the available blob stores."


Reapplied the tiling-sprite fix.

Reapplied the tiling-sprite fix.

--- src/divergence/system.cljs
+++ src/divergence/system.cljs
@@ -188,7 +188,7 @@
 (defn create-tiling-ref [entities]
   (doseq [e entities]
     (. js/console (log (-> @e :tiling-sprite :texture)))
-    (swap! e assoc :ref (js/PIXI.TilingSprite. (-> @e :tiling-sprite :texture) level-width (* level-height 2)))))
+    (swap! e assoc :ref (js/PIXI.TilingSprite. (-> @e :tiling-sprite :texture textures/textures) level-width (* level-height 2)))))

 (defn add-camera [camera container]
   (.addChild camera container))


Maps don't have guaranteed order -- which I knew, but forgot. Without guaranteed order, there's a decent chance this will try to create the mappings table before one or both parent tables. Glee.

--- src/doctopus/db/schema.clj
+++ src/doctopus/db/schema.clj
@@ -70,14 +70,14 @@
                                (cons (keyword table-name) table-schema))
                         db-name))

-(def table-name->schema {"heads" head-schema
-                         "tentacles" tentacle-schema
-                         "head_tentacle_mappings" head-tentacle-schema})
+(def table-name-schema-pairs [["heads" head-schema]
+                              ["tentacles" tentacle-schema]
+                              ["head_tentacle_mappings" head-tentacle-schema]])

 (defn bootstrap
   "checks for the presence of tables and creates them if necessary"
   ([] (bootstrap :main))
   ([db-name]
-   (doseq [[table-name schema] table-name->schema]
+   (doseq [[table-name schema] table-name-schema-pairs]
      (when (not (table-created? db-name table-name))
        (create-table! db-name table-name schema)))))


comment

comment

--- src/flatgui/usagestats.clj
+++ src/flatgui/usagestats.clj
@@ -22,7 +22,6 @@
                    MouseEvent/MOUSE_MOVED :mouse-moved
                    MouseEvent/MOUSE_DRAGGED :mouse-dragged
                    nil)
-                 ;(str :mouse (.getID reason))

                  (instance? KeyEvent reason)
                  (condp = (.getID reason)


(PDB-5548) Have the gc bulldozer clear the way 5 times/sec

Previously it was running at one attempt per second.  Increase that to
five times per second to give it more attempts to unblock the
partition drop, even if competing commands have multiple competing
lock acquisitions (particularly given the fact that no attempt has
been made to order pdb's lock acquisitions).

--- src/puppetlabs/puppetdb/scf/storage.clj
+++ src/puppetlabs/puppetdb/scf/storage.clj
@@ -1579,7 +1579,7 @@
             (deliver connected true)
             (while (not @gc-finished?)
               (maybe-log-query-termination (bulldoze-blocking-qs gc-pid))
-              (Thread/sleep 1000)))
+              (Thread/sleep 200)))
           (catch InterruptedException _
             true)
           (finally


Fixing autoscroll.

Fixing autoscroll.

--- src-cljs/frontend/components/build_steps.cljs
+++ src-cljs/frontend/components/build_steps.cljs
@@ -193,9 +193,7 @@
     om/IDidUpdate
     (did-update [_ _ _]
       (when (om/get-state owner [:autoscroll?])
-        (let [body (.-body js/document)
-              very-large-numer 10000000]
-          (set! (.-scrollTop body) very-large-numer))))
+        (scroll-to-bottom (.querySelector js/document ".main-foot"))))
     om/IRender
     (render [_]
       (let [non-parallel-actions (->> containers
@@ -349,9 +347,7 @@
     om/IDidUpdate
     (did-update [_ _ _]
       (when (om/get-state owner [:autoscroll?])
-        (let [body (.-body js/document)
-              very-large-numer 10000000]
-          (set! (.-scrollTop body) very-large-numer))))
+        (scroll-to-bottom (.querySelector js/document ".main-foot"))))
     om/IRender
     (render [_]
       (let [non-parallel-actions (->> containers


Increase size of sidebar 2.0 icon

Increase size of sidebar 2.0 icon


add testing TODO

add testing TODO

--- src/test/clojure/trellis/test_sente.clj
+++ src/test/clojure/trellis/test_sente.clj
@@ -11,5 +11,8 @@
 (deftest sente-test
   (let [s (sente/sente-server)]
     (with-component [s s]
-      (is (:ch-recv s)))))
+      (is (:ch-recv s))
+      ;; TODO: figure out how to test with a Clojure client
+      (let []
+        ))))


fix blues example

fix blues example

--- test/example/blues.clj
+++ test/example/blues.clj
@@ -10,7 +10,7 @@

 (def ps (atom []))

-(defn play [instr pitch-classes]
+(defn play-blues [instr pitch-classes]
   (doseq [pitch pitch-classes]
     (swap! ps conj pitch)
     (instr pitch)))
@@ -36,7 +36,7 @@
           (when (= 2 count)
             (kick))

-          (play instr pitch))
+          (play-blues instr pitch))
       (at (+ time (* 0.5 dur))
           (c-hat 0.1))
       (apply-at n-time #'play-seq
@@ -63,7 +63,7 @@

 (defn progression [chord-seq key-note octave scale]
   (for [[roman-numeral chord-type] (partition 2 chord-seq)]
-    (chord (+ (resolve-note (str (name key-note) octave))
+    (chord (+ (note (str (name key-note) octave))
               (degree->interval roman-numeral scale))
            chord-type)))

@@ -92,4 +92,6 @@
             (now)
             0.5))

-;(blue-ks1)
+;;(blue-ks1)
+;;(blue-ks1-demo)
+;;(stop)


Fix tests.

Fix tests.

--- test/open_company/integration/company/company_retrieval.clj
+++ test/open_company/integration/company/company_retrieval.clj
@@ -118,8 +118,7 @@
         (:org-id body) => nil ; verify no org-id
         (:categories body) => (map name common/category-names)
         (:sections body) =>
-          {:company ["diversity" "values"], :progress ["help" "update" "team" "finances
-          "]}
+          {:company ["diversity" "values"], :progress ["update" "finances" "team" "help"]}
         ;; verify section contents
         (:update body) => (contains r/text-section-1)
         (:finances body) => (contains r/finances-section-1)
@@ -139,7 +138,7 @@
             body (mock/body-from-response response)]
         (:status response) => 200
         (:sections body) =>
-          {:company ["diversity" "values"], :progress ["help" "update" "team" "finances"]}
+          {:company ["diversity" "values"], :progress ["update" "finances" "team" "help"]}
         ;; verify each section has only a self HATEOAS link
         (doseq [section-key (map keyword (flatten (vals (:sections body))))]
           (count (:links (body section-key))) => 1
@@ -155,7 +154,7 @@
             body (mock/body-from-response response)]
         (:status response) => 200
         (:sections body) =>
-          {:company ["diversity" "values"], :progress ["help" "update" "team" "finances"]}
+          {:company ["diversity" "values"], :progress ["update" "finances" "team" "help"]}
         ;; verify each section has only a self HATEOAS link
         (doseq [section-key (map keyword (flatten (vals (:sections body))))]
           (count (:links (body section-key))) => 1


(SERVER-206) Add https after http test

(SERVER-206) Add https after http test

Add a test to ensure an instance of HttpClient can make https
requests after another instance of the class has made an http
request.

--- test/unit/puppetlabs/puppetserver/ruby/http_client_test.clj
+++ test/unit/puppetlabs/puppetserver/ruby/http_client_test.clj
@@ -277,7 +277,7 @@

 (deftest http-and-https
-  (testing "can make http and https requests without having to use a new scripting container"
+  (testing "can make http calls after https calls without a new scripting container"
     (logutils/with-test-logging
       (jetty9/with-test-webserver ring-app-alternate port
         (with-webserver-with-protocols nil nil
@@ -290,5 +290,20 @@
                                    "response = c.get('/', {})"))
             (is (= "200" (.runScriptlet sc "response.code")))
             (is (= "bye" (.runScriptlet sc "response.body")))
+            (terminate-scripting-container sc))))))
+
+  (testing "can make https calls after http calls without a new scripting container"
+    (logutils/with-test-logging
+      (jetty9/with-test-webserver ring-app-alternate port
+        (with-webserver-with-protocols nil nil
+          (let [sc (create-scripting-container port)]
+            (.runScriptlet sc "response = c.get('/', {})")
+            (is (= "200" (.runScriptlet sc "response.code")))
+            (is (= "bye" (.runScriptlet sc "response.body")))
+            (.runScriptlet sc (str (format "c = Puppet::Server::HttpClient.new('localhost', %d, {:use_ssl => %s});"
+                                           10080 true)
+                                   "response = c.get('/', {})"))
+            (is (= "200" (.runScriptlet sc "response.code")))
+            (is (= "hi" (.runScriptlet sc "response.body")))
             (terminate-scripting-container sc)))))))


Cache the queue regularly

Cache the queue regularly

--- src/emender_jenkins/build_queue_fetcher.clj
+++ src/emender_jenkins/build_queue_fetcher.clj
@@ -15,6 +15,7 @@

 (require '[clojure.tools.logging   :as log])

+(require '[emender-jenkins.results        :as results])
 (require '[emender-jenkins.common-fetcher :as common-fetcher])

 (def status (atom {
@@ -25,7 +26,9 @@
 (defn fetch-data
     "Read job statuses and job results. Stores them in the data structure in result module."
     [configuration]
-    (println "***"))
+    (results/read-currently-building-jobs configuration)
+    (results/read-jobs-in-queue configuration)
+    (results/read-running-jobs configuration))

 (defn run-fetcher-in-thread
     "Run the fetcher (its loop) in a separate thread."


Actually load the source - previously we just pulled empty strings from the maps due to using the wrong key.

--- src/klangmeister/eval.cljs
+++ src/klangmeister/eval.cljs
@@ -11,11 +11,23 @@

 (def dependencies
   (macro/sources
+    leipzig.canon
+    leipzig.chord
+    leipzig.melody
     leipzig.scale
-    leipzig.melody))
+    leipzig.temperament
+    klangmeister.instruments))

 (defn loader [{:keys [name]} callback]
-  (callback {:lang :clj :source (get dependencies name "")}))
+  (let [str-name (.-str name)
+        source (dependencies str-name)
+        source nil]
+    (if source
+      (do (js/console.log (str "Loading " str-name "."))
+          (callback {:lang :clj :source source}))
+      (do
+        (js/console.log (str "Unable to load " str-name "."))
+        (callback {:lang :clj :source ""})))))

 (defonce state (cljs/empty-state))


Fix CLJ tests

Fix CLJ tests


Fixed bug in Unique String data generation.

--- src/clojush/problems/software/benchmarks_v2/unique_string.clj
+++ src/clojush/problems/software/benchmarks_v2/unique_string.clj
@@ -38,10 +38,12 @@
    Each string is of length [0, 10]"
   [len]
   (let [repeated-string (random-string (lrand-int 11))
-        the-vec (vec (repeat len repeated-string))]
+        the-vec (vec (repeat len repeated-string))
+        unique-string (first (filter #(not= % repeated-string)
+                                     (repeatedly #(random-string (lrand-int 11)))))]
     (assoc the-vec
            (lrand-int len)
-           (random-string (lrand-int 11)))))
+           unique-string)))

 ;; A list of data domains. Each domain is a vector containing
 ;; a "set" of inputs and two integers representing how many cases from the set
@@ -79,9 +81,13 @@
                         (second vec-of-str)) (first vec-of-str)
                      (= (first vec-of-str)
                         (nth vec-of-str 2)) (first vec-of-str)
-                     :else (second vec-of-str))]
-    (first (filter #(not= % the-repeat)
-                   vec-of-str))))
+                     :else (second vec-of-str))
+        answer (first (filter #(not= % the-repeat)
+                              vec-of-str))]
+    (if (nil? answer)
+      (throw (Exception. (str "The following input vector to the Unique String
+problem does not seem to have a unique string in it:" vec-of-str)))
+      answer)))

 ; Helper function for error function
 (defn test-cases


fix stupid commit

fix stupid commit

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@9145 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

--- acqEngine/src/org/micromanager/sequence_generator.clj
+++ acqEngine/src/org/micromanager/sequence_generator.clj
@@ -414,44 +414,3 @@
             default-exposure triggers 0)))
       (generate-default-acq-sequence settings runnables))))

-; Testing:
-
-(defn test-z-sequence []
-  (let [cam (core getCameraDevice)
-        z (core getFocusDevice)]
-    (core setProperty cam "TriggerDevice" "D-DA")
-    (core loadStageSequence z (org.micromanager.mm/double-vector (range 0 210 20)))
-    (core startStageSequence z)))
-
-(def my-channels
-  [{"Cy3" 100 0 true 0}
-   {"Cy5"  50 0 false 0}
-   {"DAPI" 50 0 true 0}])
-
-(def default-settings
-  {:frames (range 10) :positions [{:name "a" :x 1 :y 2} {:name "b" :x 4 :y 5}]
-   :channels my-channels :slices (range 5)
-   :slices-first true :time-first true
-   :keep-shutter-open-slices false :keep-shutter-open-channels true
-   :use-autofocus true :autofocus-skip 3 :relative-slices true :exposure 100
-   :interval-ms 1000})
-
-
-(def test-settings
-  {:frames (range 10) :positions [{:name "a" :x 1 :y 2} {:name "b" :x 4 :y 5}]
-   :channels my-channels :slices (range 5)
-   :slices-first true :time-first true
-   :keep-shutter-open-slices false :keep-shutter-open-channels true
-   :use-autofocus true :autofocus-skip 3 :relative-slices true :exposure 100
-   :interval-ms 100})
-
-(def null-settings
-  {:frames (range 96)
-   :positions (range 1536)
-   :channels [(struct channel "Cy3" 100 0 true 0)
-              (struct channel "Cy5"  50 0 true 0)]
-   :slices (range 5)
-   :slices-first true :time-first false
-   :keep-shutter-open-slices false :keep-shutter-open-channels true
-   :use-autofocus true :autofocus-skip 3 :relative-slices true :exposure 100
-   :interval-ms 100})


[#244] Optimize the way of getting answers

* The first attempt was to follow the report generation process: 1)
  get all the form instances 2) get all answers per form instance. We
  know that is inneficient if we can get `QuestionAnswerStore`
  entities in bulk.

* We still need to filter by form instance (`SurveyInstance`) because
  of "orphan data".

* This change introduce to get all the answers for a given question-id
  in bulk, and perform the filtering in the server side (not
  database).

--- api/src/clojure/org/akvo/flow_api/datastore/stats.clj
+++ api/src/clojure/org/akvo/flow_api/datastore/stats.clj
@@ -31,29 +31,20 @@
   (when (nil? (#{"OPTION" "NUMBER"} (.getProperty question "type")))
     (anomaly/bad-request "Not an [Option|Number] question" {})))

-(defn get-answers-by-form-instance-id [ds form-instance-id question-id]
-  (flatten
-   (into []
-         (map #(parse-value (.getProperty ^Entity % "value")))
-         (ds/reducible-gae-query ds
-                                 {:kind "QuestionAnswerStore"
-                                  :filter (q/and
-                                           (q/= "questionID" (str question-id))
-                                           (q/= "surveyInstanceId" form-instance-id))
-                                  :projections {"value" String}}
-                                 {}))))
-
 (defn get-answers
-  "Returns the answers (`QuestionAnswerStore`) filtered
-  by available form instances (`SurveyInstance`).
-  We apply the same approach of raw data report generation"
   [ds form-id question-id]
-  (->> (get-form-instance-ids ds form-id)
-       (reduce (fn [acc form-instance-id]
-                 (into acc (get-answers-by-form-instance-id ds
-                                                            form-instance-id
-                                                            question-id)))
-               [])))
+  (let [form-instance-ids (set (get-form-instance-ids ds form-id))]
+    (flatten
+     (into []
+           (comp
+            (filter #(form-instance-ids (.getProperty ^Entity % "surveyInstanceId")))
+            (map #(parse-value (.getProperty ^Entity % "value"))))
+           (ds/reducible-gae-query ds
+                                   {:kind "QuestionAnswerStore"
+                                    :filter (q/= "questionID" (str question-id))
+                                    :projections {"value" String
+                                                  "surveyInstanceId" Long}}
+                                   {})))))

 (defn question-counts [ds {:keys [formId questionId]}]
   (let [question-id (Long/parseLong questionId)
@@ -73,12 +64,13 @@
         form-id (Long/parseLong formId)
         q (q/entity ds "Question" question-id)]
     (validate-question q form-id question-id)
-    (->> (get-answers ds form-id question-id)
-         (transduce identity (fuse {:sd kixi/standard-deviation
-                                    :max kixi/max
-                                    :min kixi/min
-                                    :mean kixi/mean
-                                    :count kixi/count})))))
+    (->>
+     (get-answers ds form-id question-id)
+     (transduce identity (fuse {:sd kixi/standard-deviation
+                                :max kixi/max
+                                :min kixi/min
+                                :mean kixi/mean
+                                :count kixi/count})))))

 (comment
   (def ds-spec {:hostname "akvoflow-xx.appspot.com"


c.t.n.dependency: replace Exception with ex-info

For ClojureScript compatibility

--- src/main/clojure/clojure/tools/namespace/dependency.cljc
+++ src/main/clojure/clojure/tools/namespace/dependency.cljc
@@ -86,8 +86,11 @@
   DependencyGraphUpdate
   (depend [graph node dep]
     (when (or (= node dep) (depends? graph dep node))
-      (throw (Exception. (str "Circular dependency between "
-                              (pr-str node) " and " (pr-str dep)))))
+      (throw (ex-info (str "Circular dependency between "
+                           (pr-str node) " and " (pr-str dep))
+                      {:reason ::circular-dependency
+                       :node node
+                       :dependency dep})))
     (MapDependencyGraph.
      (update-in dependencies [node] set-conj dep)
      (update-in dependents [dep] set-conj node)))


add oget to helpers

add oget to helpers

--- cljs/src/common/plastic/util/helpers.cljs
+++ cljs/src/common/plastic/util/helpers.cljs
@@ -3,6 +3,7 @@
                    [cljs.core.async.macros :refer [go]])
   (:require [cljs.pprint :as pprint :refer [pprint]]
             [cljs.core.async :refer [put! <! chan timeout close!]]
+            [goog.object :as gobj]
             [clojure.set :as set]
             [cuerdas.core :as str]))

@@ -155,4 +156,12 @@
           (assoc m k newmap)
           (dissoc m k)))
       m)
-    (dissoc m k)))+    (dissoc m k)))
+
+; https://gist.github.com/ptaoussanis/2556c56d93bde4af0415
+(defn oget
+  "Like `aget` for JS objects, Ref. https://goo.gl/eze8hY. Unlike `aget`,
+  returns nil for missing keys instead of throwing."
+  ([o k] (when o (gobj/get o k nil)))
+  ([o k1 k2] (when-let [o (oget o k1)] (gobj/get o k2 nil))) ; Optimized common case
+  ([o k1 k2 & ks] (when-let [o (oget o k1 k2)] (apply oget o ks)))) ; Can also lean on optimized 2-case


make check-consistency in nimbus_test stronger by checking that assigned tasks are identical to topology tasks

--- test/clj/backtype/storm/nimbus_test.clj
+++ test/clj/backtype/storm/nimbus_test.clj
@@ -71,7 +71,7 @@
         assigned-task-ids (mapcat executor-id->tasks (keys executor->node+port))
         all-nodes (set (map first (vals executor->node+port)))]
     (when assigned?
-      (is (= (set task-ids) (set assigned-task-ids)))
+      (is (= (sort task-ids) (sort assigned-task-ids)))
       (doseq [t task-ids]
         (is (not-nil? (task->node+port t)))))
     (doseq [[e s] executor->node+port]


fixed sighting atom store test

fixed sighting atom store test

--- test/ctia/stores/atom/sighting_test.clj
+++ test/ctia/stores/atom/sighting_test.clj
@@ -22,10 +22,12 @@
                      (reduce into {})
                      atom)]
       (testing "Empty search"
-        (is (empty? (sut/handle-list-sightings-by-indicators store []))))
+        (is (empty? (:data  (sut/handle-list-sightings-by-indicators store [] {})))))
       (testing "basic search"
         (is (= (set (vals @store))
-               (set (sut/handle-list-sightings-by-indicators store [indicator]))))))))
+               (-> (sut/handle-list-sightings-by-indicators store [indicator] {})
+                   :data
+                   set)))))))

 (deftest handle-list-sightings-by-observables-atom-test
   (doseq [observable (g/sample 20 Observable)]
@@ -33,13 +35,15 @@
           sightings (->> (g/sample 20 StoredSighting)
                          (map #(update-in % [:id] str "sig-"))
                          (map (fn [x] (into x {:observables (cons observable
-                                                                  random-observables)}))))
+                                                                 random-observables)}))))
           store (->> sightings
                      (map (fn [x] {(:id x) x}))
                      (reduce into {})
                      atom)]
       (testing "Empty search"
-        (is (empty? (sut/handle-list-sightings-by-observables store []))))
+        (is (empty? (:data (sut/handle-list-sightings-by-observables store [] {})))))
       (testing "Basic search"
         (is (= (set (vals @store))
-               (set (sut/handle-list-sightings-by-observables store [observable]))))))))
+               (-> (sut/handle-list-sightings-by-observables store [observable] {})
+                   :data
+                   set)))))))


Include an explicit corner case test for source

--- test/node/replumb/source_node_test.cljs
+++ test/node/replumb/source_node_test.cljs
@@ -129,12 +129,22 @@
 (let [validated-echo-cb (partial repl/validated-call-back! echo-callback)
       target-opts (nodejs-options load/no-resource-load-fn!)
       reset-env! (partial repl/reset-env! target-opts)
-      read-eval-call (partial repl/read-eval-call target-opts validated-echo-cb)]
-  (deftest source-when-read-file-return-nil
-    (let [res (do (read-eval-call "(require 'clojure.string)")
-                  (read-eval-call "(source clojure.string/trim)"))
+      read-eval-call-no-resource (partial repl/read-eval-call target-opts validated-echo-cb)
+      read-eval-call-nil-read-file-fn (partial repl/read-eval-call (assoc target-opts :read-file-fn! nil) validated-echo-cb)]
+
+  (deftest source-corner-cases
+    (let [res (do (read-eval-call-no-resource "(require 'clojure.string)")
+                  (read-eval-call-no-resource "(source clojure.string/trim)"))
           source-string (unwrap-result res)]
-      (is (success? res) "(source clojure.string/trim) should succeed.")
-      (is (valid-eval-result? source-string) "(source clojure.string/trim) should be a valid result")
-      (is (= "nil" source-string) "(source clojure.string/trim) should return nil")
+      (is (success? res) "(source ...) when *load-fn* returns nil should succeed.")
+      (is (valid-eval-result? source-string) "(source ...) when *load-fn* returns nil should be a valid result")
+      (is (= "nil" source-string) "(source ...) when *load-fn* returns nil should return nil")
+      (reset-env! '[clojure.string goog.string goog.string.StringBuffer]))
+
+    (let [res (do (read-eval-call-nil-read-file-fn "(require 'clojure.string)")
+                  (read-eval-call-nil-read-file-fn "(source clojure.string/trim)"))
+          source-string (unwrap-result res)]
+      (is (success? res) "(source ...) when :read-file-fn! is nil should succeed.")
+      (is (valid-eval-result? source-string) "(source ...) when :read-file-fn! is nil should be a valid result")
+      (is (= "nil" source-string) "(source ...) when :read-file-fn! is nil should return nil")
       (reset-env! '[clojure.string goog.string goog.string.StringBuffer]))))


Add new C4 instances

Add new C4 instances

--- src/maestro/validators.clj
+++ src/maestro/validators.clj
@@ -42,6 +42,11 @@
     "c3.8xlarge"
     "c3.large"
     "c3.xlarge"
+    "c4.large"
+    "c4.xlarge"
+    "c4.2xlarge"
+    "c4.4xlarge"
+    "c4.8xlarge"
     "cc2.8xlarge"
     "cg1.4xlarge"
     "cr1.8xlarge"


docstrings wip

docstrings wip

--- src/main/cljs/cljs/js.cljs
+++ src/main/cljs/cljs/js.cljs
@@ -72,10 +72,14 @@
   (fn [js-source]
     (throw (js/Error. "No *eval-fn* set"))))

-(defn js-eval [{:keys [source] :as resource}]
+(defn js-eval
+  "A default JavaScript evaluation function."
+  [{:keys [source] :as resource}]
   (js/eval source))

 (defn empty-state
+  "Construct an empty compiler state. Required to invoke analyze, compile,
+   eval and eval-str."
   ([]
    (env/default-compiler-env))
   ([init]
@@ -178,9 +182,6 @@
          (cb))))))

 (defn analyze-deps
-  "Given a lib, a namespace, deps, its dependencies, env, an analysis environment
-   and opts, compiler options - analyze all of the dependencies. Required to
-   correctly analyze usage of other namespaces."
   ([bound-vars ana-env lib deps cb]
    (analyze-deps bound-vars ana-env lib deps nil cb))
   ([bound-vars ana-env lib deps opts cb]
@@ -274,6 +275,27 @@
      (cb ast))))

 (defn analyze
+  "Analyze ClojureScript source. The compiler state will be populated with
+   the results of analyzes. The parameters:
+
+   state (atom)
+     the compiler state
+
+   source (string)
+     the ClojureScript source
+
+   name (symbol)
+     optional, the name of the source
+
+   opts (map)
+     compilation options.
+
+   :eval-fn - the eval function to invoke, see *eval-fn*
+   :load-fn - library resolution function, see *load-fn*
+
+   cb (function)
+     callback, will be invoked with the evalution result."
+
   ([state source cb]
    (analyze state source nil cb))
   ([state source name cb]
@@ -283,7 +305,9 @@
      {:*compiler*     state
       :*cljs-ns*      'cljs.user
       :*ns*           (create-ns ana/*cljs-ns*)
-      :*data-readers* tags/*cljs-data-readers*}
+      :*data-readers* tags/*cljs-data-readers*
+      :*load-fn*      (or (:load-fn opts) *load-fn*)
+      :*eval-fn*      (or (:eval-fn opts) *eval-fn*)}
      source name opts cb)))

 ;; -----------------------------------------------------------------------------
@@ -313,6 +337,22 @@
                        (comp/emit (ana/analyze ana-env form nil opts)))})))))

 (defn eval
+  "Evaluate a single ClojureScript form. The parameters:
+
+   state (atom)
+     the compiler state
+
+   form (s-expr)
+     the ClojureScript source
+
+   opts (map)
+     compilation options.
+
+     :eval-fn - the eval function to invoke, see *eval-fn*
+     :load-fn - library resolution function, see *load-fn*
+
+   cb (function)
+     callback, will be invoked with the evalution result."
   ([state form cb]
    (eval state form nil cb))
   ([state form opts cb]
@@ -366,6 +406,25 @@
                (cb (.toString sb))))))))))

 (defn compile
+  "Compile ClojureScript source into JavaScript. The parameters:
+
+   state (atom)
+     the compiler state
+
+   source (string)
+     the ClojureScript source
+
+   name (symbol)
+     optional, the name of the source
+
+   opts (map)
+     compilation options.
+
+     :load-fn    - library resolution function, see *load-fn*
+     :source-map - set to true to generate inline source map information
+
+   cb (function)
+     callback, will be invoked with the compilation result (string)."
   ([state source cb]
    (compile state source nil cb))
   ([state source name cb]
@@ -420,6 +479,26 @@
                                :source js-source}))))))))))

 (defn eval-str
+  "Evalute ClojureScript source given as a string. The parameters:
+
+  state (atom)
+    the compiler state
+
+  source (string)
+    the ClojureScript source
+
+  name (symbol)
+    optional, the name of the source
+
+  opts (map)
+    compilation options.
+
+    :eval-fn    - eval function to invoke, see *eval-fn*
+    :load-fn    - library resolution function, see *load-fn*
+    :source-map - set to true to generate inline source map information
+
+  cb (function)
+    callback, will be invoked with result of evalution"
   ([state source cb]
    (eval-str state source nil cb))
   ([state source name cb]


cljs.js/analyze-str also needs to track the current ns

--- src/main/cljs/cljs/js.cljs
+++ src/main/cljs/cljs/js.cljs
@@ -383,10 +383,10 @@
         the-ns     (or (:ns opts) 'cljs.user)
         bound-vars (cond-> (merge bound-vars {:*cljs-ns* the-ns})
                      (:source-map opts) (assoc :*sm-data* (sm-data)))]
-    ((fn analyze-loop [last-ast]
+    ((fn analyze-loop [last-ast ns]
        (binding [env/*compiler*         (:*compiler* bound-vars)
-                 ana/*cljs-ns*          (:*cljs-ns* bound-vars)
-                 *ns*                   (create-ns (:*cljs-ns* bound-vars))
+                 ana/*cljs-ns*          ns
+                 *ns*                   (create-ns ns)
                  ana/*passes*           (:*passes* bound-vars)
                  r/*data-readers*       (:*data-readers* bound-vars)
                  comp/*source-map-data* (:*sm-data* bound-vars)]
@@ -417,9 +417,9 @@
                            (fn [res]
                              (if (:error res)
                                (cb res)
-                               (analyze-loop ast))))
-                         (recur ast)))))
-                 (cb {:value last-ast}))))))) nil)))
+                               (analyze-loop ast (:name ast)))))
+                         (recur ast ns)))))
+                 (cb {:value last-ast}))))))) nil the-ns)))

 (defn analyze-str
   "Analyze ClojureScript source. The compiler state will be populated with


fix cljs.js/analyze*

fix cljs.js/analyze*

--- src/main/cljs/cljs/js.cljs
+++ src/main/cljs/cljs/js.cljs
@@ -32,17 +32,17 @@
 ;; Analyze

 (defn analyze* [env source cb]
-  (let [rdr (rt/string-push-back-reader source)
-        eof (js-obj)
-        env (ana/empty-env)]
+  (let [rdr  (rt/string-push-back-reader source)
+        eof  (js-obj)
+        aenv (ana/empty-env)]
     (env/with-compiler-env env
       (loop []
         (let [form (r/read {:eof eof} rdr)]
           (if-not (identical? eof form)
-            (let [env (assoc env :ns (ana/get-namespace ana/*cljs-ns*))]
-              (ana/analyze env form))
-            (recur))
-          (cb))))))
+            (let [aenv (assoc aenv :ns (ana/get-namespace ana/*cljs-ns*))]
+              (ana/analyze aenv form)
+              (recur))
+            (cb)))))))

 (defn analyze [env source cb]
   (binding [ana/*cljs-ns*    (or (:ns env) 'cljs.user)


CLJS-1352: cljs.js: Allow conditional readers

--- src/main/cljs/cljs/js.cljs
+++ src/main/cljs/cljs/js.cljs
@@ -100,7 +100,7 @@
                  ana/*cljs-ns*    (:*cljs-ns* bound-vars)
                  *ns*             (:*ns* bound-vars)
                  r/*data-readers* (:*data-readers* bound-vars)]
-         (let [form (r/read {:eof eof} rdr)]
+         (let [form (r/read {:eof eof :read-cond :allow :features #{:cljs}} rdr)]
            (if-not (identical? eof form)
              (let [aenv (assoc aenv :ns (ana/get-namespace ana/*cljs-ns*))
                    ast  (ana/analyze aenv form)]
@@ -265,7 +265,7 @@
                  ana/*cljs-ns*    (:*cljs-ns* bound-vars)
                  *ns*             (:*ns* bound-vars)
                  r/*data-readers* (:*data-readers* bound-vars)]
-         (let [form (r/read {:eof eof} rdr)]
+         (let [form (r/read {:eof eof :read-cond :allow :features #{:cljs}} rdr)]
            (if-not (identical? eof form)
              (let [aenv (assoc aenv :ns (ana/get-namespace ana/*cljs-ns*))
                    ast  (ana/analyze aenv form)]
@@ -302,7 +302,7 @@
                  ana/*cljs-ns*    (:*cljs-ns* bound-vars)
                  *ns*             (:*ns* bound-vars)
                  r/*data-readers* (:*data-readers* bound-vars)]
-         (let [form (r/read {:eof eof} rdr)]
+         (let [form (r/read {:eof eof :read-cond :allow :features #{:cljs}} rdr)]
            (if-not (identical? eof form)
              (let [aenv (assoc aenv :ns (ana/get-namespace ana/*cljs-ns*))
                    ast  (ana/analyze aenv form)]


Debug #2097

Debug #2097

--- backend/src/akvo/lumen/lib/visualisation/maps.clj
+++ backend/src/akvo/lumen/lib/visualisation/maps.clj
@@ -4,6 +4,7 @@
             [akvo.lumen.lib.visualisation.map-config :as map-config]
             [akvo.lumen.lib.visualisation.map-metadata :as map-metadata]
             [akvo.lumen.lib.transformation.engine :as engine]
+            [clojure.tools.logging :as log]
             [akvo.lumen.util :as util]
             [cheshire.core :as json]
             [clj-http.client :as client]
@@ -121,9 +122,12 @@
     (conform-create-args layers)
     (let [metadata-array (metadata-layers tenant-conn layers)
           map-config (map-config/build tenant-conn "todo: remove this" layers metadata-array)
+          headers* (headers tenant-conn)
+          _ (log/warn :map-config map-config)
+          _ (log/warn :headers headers)
           layer-group-id (-> (client/post (format "%s/layergroup" windshaft-url)
                                           {:body (json/encode map-config)
-                                           :headers (headers tenant-conn)
+                                           :headers headers*
                                            :content-type :json})
                              :body json/decode (get "layergroupid"))]
       (lib/ok {:layerGroupId layer-group-id


fix: [bug] trans-add: "from" account not getting added in (:trans @app-state) sometimes

--- src/cljs/expense_tracker/transaction/add.cljs
+++ src/cljs/expense_tracker/transaction/add.cljs
@@ -26,7 +26,7 @@
     (if (and (= (:acc @t) "")
              (or (= acc "") (empty? (filter #(= acc %) (a/accs->names @g/accounts)))))
       (u/alert "Non-existent account!")
-      (swap! t assoc :acc acc))))
+      (swap! t assoc :acc (if-not (= acc "") acc (:acc @t))))))

 (defn amt-equal [] (= (:to @app-state) (:from @app-state)))
 (defn amt-of [e t] (reset! tmp (:val @t)))


redeploy form handler #101

redeploy form handler
#101

--- src/cljs/swarmpit/component/service/info.cljs
+++ src/cljs/swarmpit/component/service/info.cljs
@@ -41,13 +41,25 @@
                    (message/error
                      (str "Service removing failed. Reason: " (:error response))))}))

+(defn- redeploy-service-handler
+  [service-id]
+  (handler/post
+    (routes/path-for-backend :service-redeploy {:id service-id})
+    {:on-success (fn [_]
+                   (dispatch!
+                     (routes/path-for-frontend :service-info {:id service-id}))
+                   (message/info
+                     (str "Service " service-id " has been redeployed.")))
+     :on-error   (fn [response]
+                   (message/error
+                     (str "Service redeploy failed. Reason: " (:error response))))}))
+
 (def form-action-menu-style
   {:position   "relative"
    :marginTop  "13px"
    :marginLeft "66px"})

 (defn- form-action-menu [service-id opened?]
-  (print opened?)
   (comp/mui
     (comp/icon-menu
       {:iconButtonElement (comp/icon-button nil nil)
@@ -64,12 +76,12 @@
       (comp/menu-item
         {:key         "action-redeploy"
          :leftIcon    (comp/svg nil icon/redeploy)
+         :onClick     #(redeploy-service-handler service-id)
          :primaryText "Redeploy"})
       (comp/menu-item
         {:key         "action-delete"
          :leftIcon    (comp/svg nil icon/trash)
-         :onClick     (fn []
-                        (delete-service-handler service-id))
+         :onClick     #(delete-service-handler service-id)
          :primaryText "Delete"}))))

 (rum/defc form-tasks < rum/static [tasks]


Added cpu and mem to health check for docker.

--- src/cmr/dev/env/manager/components/docker.clj
+++ src/cmr/dev/env/manager/components/docker.clj
@@ -109,10 +109,18 @@

 (defn get-status
   [this]
-  (let [response (docker/state (:opts this))]
+  (let [response (docker/state (:opts this))
+        cpu (docker/get-cpu (:opts this))
+        mem (docker/get-mem (:opts this))]
     {:docker {
        :status (keyword (:Status response))
-       :details response}}))
+       :details response}
+     :cpu {
+       :status (if (>= cpu 50) :high :ok)
+       :details {:value cpu :type :percent}}
+     :mem {
+       :status (if (>= mem 20) :high :ok)
+       :details {:value mem :type :percent}}}))

 (def healthful-behaviour
   {:get-status get-status})


Simplify layout for entry-row component

Simplify layout for entry-row component

--- src/elfeed_cljsrn/android/scenes/entries.cljs
+++ src/elfeed_cljsrn/android/scenes/entries.cljs
@@ -22,30 +22,26 @@
    [rn/text "Network error. Check your wifi or your elfeed server."]])

 (defn entry-row [entry]
-  (let [styles {:list-wrapper {:flex-direction "row"
-                               :background-color (if (:selected? entry) "#d4d4d4"
+  (let [styles {:list-wrapper {:background-color (if (:selected? entry) "#d4d4d4"
                                                      (if (:unread? entry)
                                                        (:white colors)
                                                        (:grey100 colors)))
-                               :padding-left 16
-                               :padding-right 16
+                               :padding-horizontal 16
                                :height 72
-                               :align-items "center"}
-                :first-line {:flex-direction "row"}
-                :primary-text-wrapper {:flex 1
-                                       :padding-right 16}
-                :primary-text {:font-size 16
-                               :font-weight "400"
-                               :line-height 24}
-                :caption-text-wrapper {:align-self "flex-start"
-                                       :align-items "flex-start"}
-                :caption-text {:font-size 12
-                               :font-weight "400"
-                               :line-height 20}
-                :secondary-text-wrapper {}
-                :secondary-text {:line-height 22
-                                 :font-size 14
-                                 :color "rgba(0,0,0,.54)"}}]
+                               :justify-content "center"}
+                :first-line {:flex-direction "row"
+                             :justify-content "space-between"}
+                :title {:flex-shrink 1
+                        :padding-right 16
+                        :font-size 16
+                        :font-weight "400"
+                        :line-height 24}
+                :date {:font-size 12
+                       :font-weight "400"
+                       :line-height 20}
+                :feed {:line-height 22
+                       :font-size 14
+                       :color "rgba(0,0,0,.54)"}}]
     [rn/touchable {:key (:webid entry)
                    :underlay-color (:grey-100 colors)
                    :on-long-press (fn [_]
@@ -53,17 +49,10 @@
                    :on-press (fn [_]
                                (dispatch [:press-entry-row entry]))}
      [rn/view {:style (:list-wrapper styles)}
-      [rn/view {:style {:flex 1
-                        :justify-content "center"}}
-       [rn/view {:style (:first-line styles)}
-        [rn/view {:style (:primary-text-wrapper styles)}
-         [rn/text {:number-of-lines 1
-                   :style (:primary-text styles)}
-          (:title entry)]]
-        [rn/view {:style (:caption-text-wrapper styles)}
-         [rn/text {:style (:caption-text styles)} (format-entry-date (:date entry))]]]
-       [rn/view
-        [rn/text {:style (:secondary-text styles)} (str "»" (:title (:feed entry)))]]]]]))
+      [rn/view {:style (:first-line styles)}
+       [rn/text {:number-of-lines 1 :style (:title styles)} (:title entry)]
+       [rn/text {:style (:date styles)} (format-entry-date (:date entry))]]
+      [rn/text {:style (:feed styles)} (str "» " (:title (:feed entry)))]]]))

 (defn update-time-info [update-time]
   (let [styles {:wrapper {:background-color (:grey300 colors)


Use -> instead of nesting.

Use -> instead of nesting.

--- src/overtunes/songs/row_row_row_your_boat.clj
+++ src/overtunes/songs/row_row_row_your_boat.clj
@@ -8,8 +8,8 @@
 (def g-major #(-> % major-scale (+ 67)))

 (defn bpm [beats start] #(-> % (/ beats) (* 60) (* 1000) (+ start)))
-(defn after [timing beats] #(timing (+ beats %)))
-(defn syncopate [timing durations] #(timing (sum-n durations %)))
+(defn after [timing beats] #(-> % (+ beats) timing))
+(defn syncopate [timing durations] #(-> (sum-n durations %) timing))

 (def pitches [0 0 0 1 2, 2 1 2 3 4, 7 7 7 4 4 4 2 2 2 0 0 0, 4 3 2 1 0])
 (def durations [1 1 2/3 1/3 1, 2/3 1/3 2/3 1/3 2, 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3, 2/3 1/3 2/3 1/3 2])


Perf: split some computation out of loop. Perform separate group-by for :route and :hash-group to allow reuse of results

--- src/onyx/peer/function.clj
+++ src/onyx/peer/function.clj
@@ -76,13 +76,14 @@
       (let [replica @(:onyx.core/replica event)
             peer-state (:peer-state replica)
             segments (build-segments-to-send leaves)
-            groups (group-by (juxt :route :hash-group) segments)
+            groups (group-by :route segments)
             allocations (get (:allocations replica) job-id)]
-        (doseq [[[route hash-group] segs] groups]
+        (doseq [[route segs] groups]
           (let [peers (get allocations (get egress-tasks route))
                 active-peers (filter #(= (get peer-state %) :active) peers)
-                target (pick-peer id active-peers hash-group max-downstream-links)]
-            (when target
-              (let [link (operation/peer-link event target)]
-                (onyx.extensions/send-messages messenger event link segs)))))
+                groups-hash (group-by :hash-group segs)]
+            (doseq [[hash-group segs*] groups-hash]
+              (when-let [target (pick-peer id active-peers hash-group max-downstream-links)]
+                (let [link (operation/peer-link event target)]
+                  (onyx.extensions/send-messages messenger event link segs*))))))
         {}))))


fixing bug in clarify color

fixing bug in clarify color

--- src/overtone/gui/color.clj
+++ src/overtone/gui/color.clj
@@ -45,9 +45,11 @@

 (defn clarify-color
   "Increase the color transparency in steps of 10."
-  ([color] (clarify-color color 1))
-  ([color factor]
-   (let [r (.getRed color)
-         g (.getGreen color)
-         b (.getBlue color)]
-     (color r g b (- (.getTransparency color) (* factor 10))))))
+  ([col] (clarify-color col 1))
+  ([col factor]
+   (let [r (.getRed col)
+         g (.getGreen col)
+         b (.getBlue col)]
+     (color r g b (- (.getTransparency col) (* factor 10))))))
+
+


derive ::sample from :overtone.sc.buffer/file-buffer.

--- src/overtone/sc/sample.clj
+++ src/overtone/sc/sample.clj
@@ -116,7 +116,7 @@

 ;; Samples are just audio files loaded into a buffer, so buffer
 ;; functions work on samples too.
-(derive ::sample :overtone.sc.buffer/buffer)
+(derive ::sample :overtone.sc.buffer/file-buffer)
 (derive ::playable-sample ::sample)

 (defn- free-loaded-sample


downgrade supervisor cleanup log message to a warning from an error (since it's expected)

--- src/clj/backtype/storm/daemon/supervisor.clj
+++ src/clj/backtype/storm/daemon/supervisor.clj
@@ -144,7 +144,7 @@
     (rmpath (worker-pids-root conf id))
     (rmpath (worker-root conf id))
   (catch RuntimeException e
-    (log-error e "Failed to cleanup worker " id ". Will retry later")
+    (log-warn-error e "Failed to cleanup worker " id ". Will retry later")
     )))

 (defn shutdown-worker [conf supervisor-id id worker-thread-pids-atom]


Add the "recorded" and "split buttons"

Add the "recorded" and "split buttons"

but only show them if the user is authorized and the production has
the right state

--- src/cljs/mdr2/productions/in_production.cljs
+++ src/cljs/mdr2/productions/in_production.cljs
@@ -216,15 +216,37 @@
       {:href (str "/api/productions/" id "/xml")
        :download (str id ".xml")
        ;; allow dtbook download only for state new and structured
-       :disabled (not (#{"new" "structured"} state))}
+       :disabled (not (and admin? (#{"new" "structured"} state)))}
       [:span.icon.is-small
        [:span.material-icons "file_download"]]]
      [:a.button
-      {:disabled (not admin?)
+      {:disabled (not (and admin? (#{"new" "structured"} state)))
        :href (str "#/productions/" id "/upload")
        :on-click (fn [e] (rf/dispatch [::production/set-current production]))}
       [:span.icon.is-small
        [:span.material-icons "file_upload"]]]
+     ;; show the "Recorded" button if the next state is "recorded",
+     ;; the user is authorized, and the production has been imported
+     ;; from the libary, i.e. is not handled via ABACUS or the
+     ;; production has a revision greater than zero as is the case
+     ;; with productions that are repaired
+     (when (and admin? (#{"structured"} state)
+                (or (:library_number production) (> (:revision production) 0)))
+       (if @(rf/subscribe [::notifications/button-loading? uuid :recorded])
+         [:button.button.is-loading]
+         [:button.button
+          {:on-click (fn [e] (rf/dispatch [::recorded-production uuid]))}
+          [:span.icon.is-small
+           [:span.material-icons "mic"]]]))
+     ;; show the "Split" button if the next state is "split" and the user is
+     ;; authorized
+     (when (and admin? (#{"pending-split"} state))
+         (if @(rf/subscribe [::notifications/button-loading? uuid :split])
+           [:button.button.is-loading]
+           [:button.button
+            {:on-click (fn [e] (rf/dispatch [::split-production uuid]))}
+            [:span.icon.is-small
+             [:span.material-icons "call_split"]]]))
      (if @(rf/subscribe [::notifications/button-loading? uuid :delete])
        [:button.button.is-danger.is-loading]
        [:button.button.is-danger


Removing accidentally added line.

Removing accidentally added line.

--- src/cmr/system_int_test/data2/collection.clj
+++ src/cmr/system_int_test/data2/collection.clj
@@ -115,7 +115,6 @@
   ([type]
    (related-url type (d/unique-str "http://example.com/file")))
   ([type url]
-   (c/->RelatedURL type nil url (d/unique-str "description"))))
    (related-url type nil url))
   ([type mime-type url]
    (c/->RelatedURL type nil url (d/unique-str "description") mime-type)))