Stage desc pentatonic example.

Stage desc pentatonic example.

--- src/african_polyphony_and_polyrhythm/talk.clj
+++ src/african_polyphony_and_polyrhythm/talk.clj
@@ -223,19 +223,19 @@

 ; Descending pentatonic
 (def pentatonic (scale [2 3 2 2 3]))
+
+(comment
+  (->> (phrase (repeat 1/4) (range 0 8))
+       (where :pitch (comp midi->hz A pentatonic))
+       live/play))
+
+
 (def descending -)

 (comment
-  (->> (phrase (repeat 1/4) (range 0 6))
-       (where :pitch (comp midi->hz A pentatonic))
-       live/play)
-
-  (->> (phrase (repeat 1/4) (range 0 6))
+  (->> (phrase (repeat 1/4) (range 0 8))
        (where :pitch (comp midi->hz A descending pentatonic))
        live/play))
-
-
-


A newly introduced destructive update bug in axpy caught by tutorial-native-test fixed.

--- src/clojure/uncomplicate/neanderthal/core.clj
+++ src/clojure/uncomplicate/neanderthal/core.clj
@@ -652,9 +652,11 @@
   ([x y z]
    (if (number? x)
      (axpy! x y (copy z))
-     (axpy! 1.0 x y z)))
+     (axpy! 1.0 x (copy y) z)))
   ([x y z w & ws]
-   (apply axpy! x y (zero y) z w ws)))
+   (if (number? x)
+     (apply axpy! x y (copy z) w ws)
+     (apply axpy! 1.0 x (copy y) z w ws))))

 (defn ax
   "Multiplies container x by a scalar a.


CMR-680: Removed comment

CMR-680: Removed comment

--- src/cmr/system_int_test/utils/ingest_util.clj
+++ src/cmr/system_int_test/utils/ingest_util.clj
@@ -162,4 +162,4 @@
          (create-provider provider-guid provider-id grant-all?))
        (f)
        (finally
-         #_(reset))))))
+         (reset))))))


[CS DC] clarify test names

[CS DC] clarify test names

--- test/vip/data_processor/validation/csv_test.clj
+++ test/vip/data_processor/validation/csv_test.clj
@@ -90,7 +90,7 @@
           (testing "it doesn't match the format, you get an error"
             (let [result-ctx (format-rule ctx {column "asdf"} line-number)]
               (is (get-in result-ctx [:errors filename line-number column])))))))
-    (testing "check that is a list of options"
+    (testing "a check that is a list of options"
       (let [format-rule (create-format-rule filename {:name column :format format/yes-no})]
         (testing "matches"
           (is (= ctx (format-rule ctx {column "yes"} line-number)))
@@ -98,7 +98,7 @@
         (testing "non-matches"
           (is (get-in (format-rule ctx {column "YEP!"} line-number) [:errors filename line-number column]))
           (is (get-in (format-rule ctx {column "no way"} line-number) [:errors filename line-number column])))))
-    (testing "check that is a function"
+    (testing "a check that is a function"
       (let [palindrome? (fn [v] (= v (clojure.string/reverse v)))
             format-rule (create-format-rule filename {:name column :format {:check palindrome? :message "Not a palindrome"}})]
         (testing "matches"


Extract out launch-media-driver!

Extract out launch-media-driver!

This is kinda silly. I wish I could just mock MediaDriver/launch.

--- src/desdemona/launcher/aeron_media_driver.clj
+++ src/desdemona/launcher/aeron_media_driver.clj
@@ -21,11 +21,18 @@
    "incompatibility between versions. Check that no other media driver "
    "has been started and then use -d to delete the directory on startup"))

+(defn ^:private launch-media-driver!
+  "Calls MediaDriver/launch.
+
+  This only exists so the var can be mocked out."
+  [ctx]
+  (MediaDriver/launch ctx))
+
 (defn ^:private run-media-driver!
   [options]
   (let [ctx (doto (MediaDriver$Context.)
               (.dirsDeleteOnStart (options :delete-dirs)))]
-    (try (MediaDriver/launch ctx)
+    (try (launch-media-driver! ctx)
          (catch IllegalStateException ise
            (throw (Exception. aeron-launch-error-message ise))))))


Renaming scroll-to-bottom function.

Renaming scroll-to-bottom function.

--- src-cljs/frontend/components/build_steps.cljs
+++ src-cljs/frontend/components/build_steps.cljs
@@ -52,7 +52,7 @@
          [:span {:dangerouslySetInnerHTML
                  #js {"__html" trailing-out}}])))))

-(defn scroll-to-bottom [element]
+(defn scroll-to-bottom-of [element]
   (.scrollIntoView element false))

 (defn action [action owner {:keys [uses-parallelism?] :as opts}]
@@ -111,7 +111,7 @@
                    [:div.action-log-messages
                     (common/messages (:messages action))
                     [:i.click-to-scroll.fa.fa-arrow-circle-o-down.pull-right
-                     {:on-click #(scroll-to-bottom (.-parentNode (.-currentTarget %)))}]
+                     {:on-click #(scroll-to-bottom-of (.-parentNode (.-currentTarget %)))}]

                     (when (:bash_command action)
                       [:span
@@ -193,7 +193,7 @@
     om/IDidUpdate
     (did-update [_ _ _]
       (when (om/get-state owner [:autoscroll?])
-        (scroll-to-bottom (.querySelector js/document ".main-foot"))))
+        (scroll-to-bottom-of (.querySelector js/document ".main-foot"))))
     om/IRender
     (render [_]
       (let [non-parallel-actions (->> containers
@@ -298,7 +298,7 @@
                    [:div.action-log-messages
                     (common/messages (:messages action))
                     [:i.click-to-scroll.fa.fa-arrow-circle-o-down.pull-right
-                     {:on-click #(scroll-to-bottom (.-parentNode (.-currentTarget %)))}]
+                     {:on-click #(scroll-to-bottom-of (.-parentNode (.-currentTarget %)))}]
                     (when (:bash_command action)
                       [:span
                        (when (:exit_code action)
@@ -347,7 +347,7 @@
     om/IDidUpdate
     (did-update [_ _ _]
       (when (om/get-state owner [:autoscroll?])
-        (scroll-to-bottom (.querySelector js/document ".main-foot"))))
+        (scroll-to-bottom-of (.querySelector js/document ".main-foot"))))
     om/IRender
     (render [_]
       (let [non-parallel-actions (->> containers


add launchdarkly feature flag for :merge-pull-request

--- src-cljs/frontend/components/pages/build.cljs
+++ src-cljs/frontend/components/pages/build.cljs
@@ -109,7 +109,8 @@
                 "cancel build"]))
            (when can-trigger-builds?
              (om/build rebuild-actions {:build build :project project}))
-           (when (build-model/can-merge-at-least-one-pr? build)
+           (when (and (feature/enabled? :merge-pull-request)
+                      (build-model/can-merge-at-least-one-pr? build))
              (om/build merge-actions {:build build}))
            (when can-write-settings?
              [:div.build-settings


:bug: Fix circle shape rotation behavior.

--- frontend/src/uxbox/main/ui/workspace/selection.cljs
+++ frontend/src/uxbox/main/ui/workspace/selection.cljs
@@ -122,7 +122,7 @@

 (mf/defc controls
   [{:keys [shape zoom on-resize on-rotate] :as props}]
-  (let [{:keys [x y width height rotation]} (geom/shape->rect-shape shape)
+  (let [{:keys [x y width height rotation] :as shape} (geom/shape->rect-shape shape)
         radius (if (> (max width height) handler-size-threshold) 6.0 4.0)
         transform (geom/rotation-matrix shape)]
     [:g.controls {:transform transform}


Because, I think, we have required and inherited from BaseMV, which declares it as a method, we can now use the dot syntax with notifyUpdate.

--- dada-core/src/main/clojure/org/dada/core/SimpleModelView.clj
+++ dada-core/src/main/clojure/org/dada/core/SimpleModelView.clj
@@ -181,6 +181,6 @@
 	[_ _ views] @mutable
 	[#^Collection i #^Collection a #^Collection d] (update-fn inputs)]
     (if (not (and (empty? i) (empty? a) (empty? d)))
-      (-notifyUpdate this i a d))
+      (.notifyUpdate this i a d))
     ))


Fix seq generation for single url requests in runner

--- src/engulf/formulas/http_benchmark_runner.clj
+++ src/engulf/formulas/http_benchmark_runner.clj
@@ -44,8 +44,8 @@
     (when (not ((:method refined) valid-methods))
         (throw (Exception. (str "Invalid method: " (:method params) " "
                                 "expected one of " valid-methods))))
-
-    (into {} (filter (fn [[k v]] (req-pkeys k)) refined))))
+    (req-seq
+     (into {} (filter (fn [[k v]] (req-pkeys k)) refined)))))

 ;; TODO Clean this all up, it's a bit of a hairbal
 (defn clean-params [str-params]


Location plugin, marker tooltips

Location plugin, marker tooltips


add userconnections stats to dashboard

add userconnections stats to dashboard


Use find-first

Use find-first

--- dungeon-crawler/desktop/src-common/dungeon_crawler/utils.clj
+++ dungeon-crawler/desktop/src-common/dungeon_crawler/utils.clj
@@ -168,9 +168,8 @@
 (defn get-entity-at-cursor
   [screen entities input-x input-y]
   (let [cursor-pos (input->screen screen input-x input-y)]
-    (some (fn [{:keys [x y width height npc? health] :as entity}]
-            (-> (rectangle x y width height)
-                (rectangle! :contains (:x cursor-pos) (:y cursor-pos))
-                (and npc? (> health 0))
-                (when entity)))
-          entities)))
+    (find-first (fn [{:keys [x y width height npc? health] :as entity}]
+                  (-> (rectangle x y width height)
+                      (rectangle! :contains (:x cursor-pos) (:y cursor-pos))
+                      (and npc? (> health 0))))
+                entities)))


fixing test after `(comment ...` alteration.

--- contrib/tools.reader/src/test/clojure/clojure/tools/common_tests.clj
+++ contrib/tools.reader/src/test/clojure/clojure/tools/common_tests.clj
@@ -2,7 +2,7 @@
   (:refer-clojure :exclude [read-string *default-data-reader-fn* read])
   (:use [clojure.tools.reader :only [read *default-data-reader-fn* read-string]]
         [clojure.test :only [deftest is]])
-  (:require [clojure.tools.reader.reader-types
+  (:require [clojure.tools.reader.reader-types
     :refer [string-push-back-reader]])
   (:import clojure.lang.BigInt))

@@ -259,5 +259,5 @@

 (deftest read-comment
   (is (thrown? Exception (read-string ";; foo\n")))
-  (is (= ";; foo"
+  (is (= '(comment "; foo")
          (read (string-push-back-reader ";; foo\n") true nil false true))))


CMR-1848: Minor refactoring and documentation changes.

--- umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/parser.clj
+++ umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/parser.clj
@@ -87,10 +87,9 @@
                    :let [match (re-matches regex (-> element :content first))]
                    :when match
                    :let [nil-if-empty (fn [s] (if (empty? s) nil s))]]
-               ;; A string response implies there is no group in the regular expression and the
-               ;; entire matching string is returned and if there is a group in the regular
-               ;; expression, the first group of the matching string is returned.
-               (if (string? match) match (nil-if-empty (second match))))))))
+               ;; The entire string at the xpath is returned if there are no groups in the regular
+               ;; expression otherwise the substring corresponding to first group is returned.
+               (nil-if-empty (if (string? match) match (second match))))))))

 (defmethod process-xml-mapping :constant
   [_ {:keys [value]}]


Add test for ordered past and future conferences

--- test/clj/conference_rating/db_handler_test.clj
+++ test/clj/conference_rating/db_handler_test.clj
@@ -1,8 +1,14 @@
 (ns conference-rating.db-handler-test
   (:require [monger.collection :as mc]
             [clojure.test :refer :all]
-            [conference-rating.db-handler :as dh :refer [delete-conference-by-id get-all-conferences update-conference-by-id]]
-            [conference-rating.testdata :refer :all])
+            [conference-rating.db-handler :as dh :refer [
+                                                         delete-conference-by-id
+                                                         get-all-conferences
+                                                         update-conference-by-id
+                                                         get-future-conferences
+                                                         get-past-conferences]]
+            [conference-rating.testdata :refer :all]
+            [java-time :as jtime])
   (:import (com.github.fakemongo Fongo)
            (org.bson.types ObjectId)))

@@ -98,3 +104,43 @@
       (testing "that it should get a list of not deleted conferences"
         (is (= [(.toHexString id)] ids))))))

+(defn- insert-conference [db id today-modificator amount-modificator]
+  (let [today (jtime/local-date-time)
+        from (jtime/format :iso-date-time (today-modificator today amount-modificator))
+        to (jtime/format :iso-date-time (today-modificator today amount-modificator))]
+    (mc/insert db "conferences" {:_id id :score 1 :from from :to to})))
+
+(deftest get-future-and-past-conferences-test
+  (let [fake-db (create-mock-db)
+        id-future-1 (ObjectId.)
+        id-future-2 (ObjectId.)
+        id-future-3 (ObjectId.)
+        id-future-4 (ObjectId.)
+        id-past-1 (ObjectId.)
+        id-past-2 (ObjectId.)
+        id-past-3 (ObjectId.)]
+
+    (insert-conference fake-db id-future-1 jtime/plus (jtime/days 1))
+    (insert-conference fake-db id-future-2 jtime/plus (jtime/days 2))
+    (insert-conference fake-db id-future-3 jtime/plus (jtime/days 3))
+    (insert-conference fake-db id-future-4 jtime/plus (jtime/days 4))
+
+    (insert-conference fake-db id-past-1 jtime/minus (jtime/days 1))
+    (insert-conference fake-db id-past-2 jtime/minus (jtime/days 2))
+    (insert-conference fake-db id-past-3 jtime/minus (jtime/days 3))
+
+    (testing "should return only future conferences"
+      (let [conference-list (get-future-conferences fake-db 1 10)
+            ids (map :_id conference-list)]
+        (is (= [(.toHexString id-future-1)
+                (.toHexString id-future-2)
+                (.toHexString id-future-3)
+                (.toHexString id-future-4)]
+               ids))))
+    (testing "should return only past conferences"
+      (let [conference-list (get-past-conferences fake-db 1 10)
+            ids (map :_id conference-list)]
+        (is (= [(.toHexString id-past-1)
+                (.toHexString id-past-2)
+                (.toHexString id-past-3)]
+               ids))))))


Reset page number when creating a new search

--- src/cljs/cglossa/search_views/cwb/shared.cljs
+++ src/cljs/cglossa/search_views/cwb/shared.cljs
@@ -70,9 +70,9 @@
             (reset! searching? false)
             (search-step2 url params total searching?)))))))

-(defn- search! [{{queries :queries}                    :search-view
-                 {:keys [show? results total sort-by]} :results-view
-                 searching?                            :searching?}
+(defn- search! [{{queries :queries}                            :search-view
+                 {:keys [show? results total page-no sort-by]} :results-view
+                 searching?                                    :searching?}
                 {:keys [corpus]}]
   (let [queries*    @queries
         corpus*     @corpus
@@ -93,8 +93,10 @@
                     :queries   q
                     :sort-by   @sort-by}]
         (reset! show? true)
+        (reset! results nil)
         (reset! searching? true)
         (reset! total 0)
+        (reset! page-no 1)
         (search-step1 url params total searching? results)))))

 (defn on-key-down [event a m]


Support for :paredit-wrap-quote command

Support for :paredit-wrap-quote command

--- ccw.core/src/ccw/editors/clojure/PareditAutoEditStrategy.clj
+++ ccw.core/src/ccw/editors/clojure/PareditAutoEditStrategy.clj
@@ -20,7 +20,8 @@
 ; TODO move this into paredit itself ...
 ;  each command : trigger-str  [:paredit-command-name only-one-char-command?]
 (def *commands*
-  {"(" [:paredit-open-round true]
+  {"'" [:paredit-wrap-quote true]
+   "(" [:paredit-open-round true]
    "[" [:paredit-open-square true]
    "{" [:paredit-open-curly true]
    ")" [:paredit-close-round true]


First implementation of collecting file facts.

--- src/dda/pallet/crate/servertest/fact/file.clj
+++ src/dda/pallet/crate/servertest/fact/file.clj
@@ -14,9 +14,11 @@
 ; See the License for the specific language governing permissions and
 ; limitations under the License.

+
 (ns dda.pallet.servertest.fact.file
   (:require
-    [dda.pallet.servertest.core.fact :refer :all]))
+   [dda.pallet.servertest.core.fact :refer :all]
+   [schema.core :as s]))

 ; todo: create crate boundary & schema for configuration & result

@@ -34,20 +36,26 @@
                                 :modified s/Str
                                 :accessed s/Str}})

-(defn parse-find
-  [file-resource]
-  ;todo create parse function
-  (map #(zipmap
-          [:name :size-in-bytes :user :group :mod :type :created :modified :accessed]
-          (clojure.string/split (clojure.string/trim %) #"\s+|/"))
-     (drop-while #(not (re-matches #"\s*(tcp|udp).*" %))
-       (clojure.string/split netstat-resource #"\n"))))
+(defn build-find-string
+  "Builds the string for executing the find commands."
+  [path]
+  (let [p (clojure.string/join "/" (drop-last (clojure.string/split path #"/")))
+        file (last (clojure.string/split path #"/"))]
+     ["find"
+      p
+      "-name"
+      file
+      "-prune"
+      "-printf \"%f'%s'%u'%g'%m'%y'%c'%t'%a\n\""]))

-(s/defn collect-file-fact
-  "Defines the netstat resource.
-   This is automatically done serverstate crate is used.
-   See also: https://unix.stackexchange.com/questions/128985/why-not-parse-ls, http://man7.org/linux/man-pages/man1/find.1.html"
-  [files-to-inspect :- FileFactConfig]
-  ;find linked-entry -prune -printf "'%f' '%s' '%u' '%g' '%m' '%y' '%c' '%t' '%a'\n"
-  ;todo: iterate over files-to-inspect & create one script
-  (collect-fact fact-id-netstat '("find" ~path "-prune" "-printf \"'%f' '%s' '%u' '%g' '%m' '%y' '%c' '%t' '%a'\n\"") :transform-fn parse-find))
+(defn collect-file-fact
+  "Collects the file facts."
+  [files-to-inspect]
+  (let [paths (:file-paths files-to-inspect)]
+    (collect-fact
+     fact-id-netstat
+     (flatten
+      (interpose
+       "&&"
+       (map #(build-find-string %) paths)))
+     :transform-fn "parse-find")))


add tokeninfo to request information

add tokeninfo to request information

--- src/io/sarnowski/swagger1st/util/security.clj
+++ src/io/sarnowski/swagger1st/util/security.clj
@@ -9,7 +9,7 @@
 (defn- deny-response
   "Send forbidden response."
   [reason]
-  (log/warnf "ACCESS DENIED on because %s." reason)
+  (log/warnf "ACCESS DENIED because %s." reason)
   (api/error 403 "Forbidden"))

 (defn allow-all
@@ -73,7 +73,7 @@
           (if-let [tokeninfo (resolve-access-token tokeninfo-url access-token)]
             ; check scopes
             (if (check-scopes-fn tokeninfo requirements)
-              request
+              (assoc request :tokeninfo tokeninfo)
               (deny-response "scopes not granted"))
             (deny-response "invalid access token"))
           (api/error 503 "token info misconfigured")))


Made JSON-generation test more robust.

Made JSON-generation test more robust.

--- test/com/lemondronor/leaflet_gorilla_test.clj
+++ test/com/lemondronor/leaflet_gorilla_test.clj
@@ -1,5 +1,6 @@
 (ns com.lemondronor.leaflet-gorilla-test
-  (:require [clojure.test :refer :all]
+  (:require [clojure.data.json :as json]
+            [clojure.test :refer :all]
             [com.lemondronor.leaflet-gorilla :as lg]
             [gorilla-renderable.core :as render]))

@@ -90,5 +91,6 @@

 (deftest test-geojson
   (testing "1 geometry"
-    (is (= "{\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\":[[2,1]]}}]}"
-           (geojson [[[1 2]]])))))
+    (is (= (json/read-str
+            "{\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\":[[2,1]]}}]}")
+           (json/read-str (geojson [[[1 2]]]))))))


Cosmetics.

Cosmetics.


CMR-2291: Removed spurious line

CMR-2291: Removed spurious line

--- ingest-app/src/cmr/ingest/api/routes.clj
+++ ingest-app/src/cmr/ingest/api/routes.clj
@@ -79,7 +79,6 @@
       api-errors/invalid-url-encoding-handler
       mp/wrap-multipart-params
       (api-errors/exception-handler default-error-format-fn)
-      common-routes/add-request-id-response-handler
       common-routes/pretty-print-response-handler
       params/wrap-params))


Fix incorrect base path (now rooted in BOOT_HOME)

- We simply no longer try to resolve a relative path.

--- boot/core/src/boot/main.clj
+++ boot/core/src/boot/main.clj
@@ -139,9 +139,7 @@
             (try (doto tmpf (spit scriptstr) (load-file))
                  (catch clojure.lang.Compiler$CompilerException cx
                    (let [l (.-line cx)
-                         s (->> (io/file (.-source cx))
-                             (file/relative-to (io/file "."))
-                             .getPath)
+                         s (->> (io/file (.-source cx)) .getPath)
                          c (.getCause cx)
                          m (.getMessage (or c cx))
                          x (or c cx)]


fix formatting

fix formatting

--- app/views/viz/plot.cljs
+++ app/views/viz/plot.cljs
@@ -79,29 +79,29 @@
             (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts)))
             (v (x-scale (:x-cen vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts)))
             (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts)))
-            ;; (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
-            ;; (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
-            ;; (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts)))
-            ;; (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts)))
-            ;; (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
-            ;; (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts)))
+            (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
+            (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
+            (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-cen vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-cen vpts)))
+            (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-max vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-min vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-max vpts)) (y-scale (:y-cen vpts)) (z-scale (:z-max vpts)))
+            (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-max vpts)) (z-scale (:z-min vpts)))
+            (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-min vpts))) (v (x-scale (:x-cen vpts)) (y-scale (:y-min vpts)) (z-scale (:z-max vpts)))
             ]]
     (println vpts)
     (println (x-scale (:x-max vpts)))
@@ -113,7 +113,6 @@
                                                             line-material
                                                             (.-Lines js/THREE)))
                        )]
-      (.log js/console new-line)
       (. (aget new-line "material" "color") (set 0x000000))
       (. scatter-plot (add new-line))
       (om/set-state! owner :line new-line))
@@ -156,7 +155,7 @@
       :line (js/THREE.Line. line-geo line-material)
       :points (js/THREE.PointCloud.)
       :p-mat (js/THREE.PointCloudMaterial. (clj->js {:vertexColors true
-                                                       :size 10}))
+                                                     :size 10}))
       :w w
       :h h
       :datoms []
@@ -226,7 +225,7 @@
      (render owner (om/get-state owner :datoms))
      (animate renderer camera scene (.getTime (js/Date.))))

-  )
+   )
   (render
    [_]
    (html [:div.plot-view {:ref "plot"}])))


Add date/time to posts

Add date/time to posts

--- android/src/clojure/net/nightweb/views.clj
+++ android/src/clojure/net/nightweb/views.clj
@@ -248,7 +248,16 @@
             total-results (vec (concat [user action] pics))]
         (if (nil? (get post :body))
           (show-lost-post-dialog context)
-          (on-ui (.setText text-view (get post :body))
+          (on-ui (.setText text-view
+                           (str
+                             (get post :body)
+                             "\n\n"
+                              (->> (get post :time)
+                                   (java.util.Date.)
+                                   (.format
+                                     (java.text.DateFormat/getDateTimeInstance
+                                       java.text.DateFormat/MEDIUM
+                                       java.text.DateFormat/SHORT)))))
                  (set-grid-view-tiles context total-results grid-view)))))
     view))


Add schema for metadata-category

Add schema for metadata-category

--- src/clj/cglossa/models/core.clj
+++ src/clj/cglossa/models/core.clj
@@ -1,7 +1,31 @@
 (ns cglossa.models.core
-  (:require [datomic.api :as d]))
+  (:require [datomic.api :as d]
+            [datomic-schema.schema :refer [part schema fields]]))

 (def db-uri "datomic:free://localhost:4334/glossa")
+
+(defn dbparts []
+  [(part "glossa")])
+
+(defn dbschema []
+  [(schema corpus
+           (fields
+             [name :string]
+             [short-name :string :unique-identity]))
+
+   (schema metadata-category
+           (fields
+             [short-nane :string]
+             [widget-type :enum [:list :range]]
+             [values :ref :many "One or more text-values, bool-values or numeric-values"]
+             [text-value :string]
+             [bool-value :boolean]
+             [numeric-value :long]))
+
+   (schema search
+           (fields
+             [corpus :ref :one]
+             [queries :string :many]))])

 (defn current-db []
   (d/db (d/connect db-uri)))


[#1239] Option to not make mandatory some ENV vars while running the CI tests

--- backend/src/akvo/lumen/config.clj
+++ backend/src/akvo/lumen/config.clj
@@ -6,16 +6,17 @@

 (defn assert-bindings []
   (assert (:lumen-db-url env) (error-msg "LUMEN_DB_URL"))
-  (assert (:lumen-email-password env) (error-msg "LUMEN_EMAIL_PASSWORD"))
-  (assert (:lumen-email-user env) (error-msg "LUMEN_EMAIL_USER"))
   (assert (:lumen-encryption-key env) (error-msg "LUMEN_ENCRYPTION_KEY"))
   (assert (:lumen-keycloak-client-secret env)
           (error-msg "LUMEN_KEYCLOAK_CLIENT_SECRET"))
   (assert (:lumen-keycloak-url env) (error-msg "LUMEN_KEYCLOAK_URL"))
   (assert (:lumen-file-upload-path env) (error-msg "LUMEN_FILE_UPLOAD_PATH"))
-  (assert (:lumen-sentry-backend-dsn env) (error-msg "LUMEN_SENTRY_BACKEND_DSN"))
-  (assert (:lumen-sentry-client-dsn env) (error-msg "LUMEN_SENTRY_CLIENT_DSN"))
-  (assert (:lumen-flow-api-url env) (error-msg "LUMEN_FLOW_API_URL")))
+  (when-not (= "yes" (:ci-build env))
+    (assert (:lumen-email-password env) (error-msg "LUMEN_EMAIL_PASSWORD"))
+    (assert (:lumen-email-user env) (error-msg "LUMEN_EMAIL_USER"))
+    (assert (:lumen-sentry-backend-dsn env) (error-msg "LUMEN_SENTRY_BACKEND_DSN"))
+    (assert (:lumen-sentry-client-dsn env) (error-msg "LUMEN_SENTRY_CLIENT_DSN"))
+    (assert (:lumen-flow-api-url env) (error-msg "LUMEN_FLOW_API_URL"))))

 (defn bindings []
   {'db-uri (:lumen-db-url env)


Fix buggy refactoring.

Fix buggy refactoring.

--- clojure/src/advent/core.clj
+++ clojure/src/advent/core.clj
@@ -1,14 +1,13 @@
 (ns advent.core)

 (defn read-puzzle [year]
-  (fn
+  (fn read-puzzle'
     ([name]
-     (read-puzzle name identity))
+     (read-puzzle' name identity))
     ([name xform]
-     (fn [year]
-       (-> (clojure.java.io/file (format "../%s/%s" year name))
-           (slurp)
-           xform)))))
+     (-> (clojure.java.io/file (format "../%s/%s" year name))
+         (slurp)
+         xform))))

 (defn enumerate [xs]
   (map vector (range) xs))


removing debug code

removing debug code

--- 02-Medium/Glitter_Paths/Clojure/greedy-raven.clj
+++ 02-Medium/Glitter_Paths/Clojure/greedy-raven.clj
@@ -41,9 +41,6 @@
 (defn bfs
   [orig-maze pos]
   (loop [states (list [orig-maze pos \A])] ; initially seeking \A anything
-    (doseq [row (first (first states))]
-      (println (apply str row)))
-    (println)
     (when-let [[maze [x y] seeking :as state] (first states)]
       (if (= (get-in maze [x y]) \G)
         (assoc-in maze [x y] \X)


Return a map no even when no config found (affects archive deployments).

--- modules/core/src/main/clojure/immutant/runtime/bootstrap.clj
+++ modules/core/src/main/clojure/immutant/runtime/bootstrap.clj
@@ -118,9 +118,9 @@
 nil if neither are available."
   [descriptor-file app-root]
   (let [from-descriptor (and descriptor-file
-                          (read-descriptor descriptor-file))
+                             (read-descriptor descriptor-file))
         from-project (:immutant (read-project app-root (:lein-profiles from-descriptor)))]
-    (merge from-project from-descriptor)))
+    (merge {} from-project from-descriptor)))

 (defn ^{:internal true} read-and-stringify-full-app-config
   "Loads the full app config and stringifies the keys."


Frontend option redesign

Frontend option redesign

--- resources/leiningen/new/lambone/common/build.boot
+++ resources/leiningen/new/lambone/common/build.boot
@@ -34,7 +34,8 @@
                          [adzerk/boot-cljs-repl "0.3.0" :scope "test"]
                          [com.cemerick/piggieback "0.2.1" :scope "test"]
                          [weasel "0.7.0" :scope "test"]
-                         [org.clojure/tools.nrepl "0.2.12" :scope "test"]])
+                         [org.clojure/tools.nrepl "0.2.12" :scope "test"]
+                         [org.slf4j/slf4j-nop "1.7.21"]])

 ;; All the deps are "test" because they are only need for compiling to
 ;; JavaScript, not "real" project dependencies.
@@ -114,6 +115,11 @@
 ;;  FRONTEND OPTIONS  ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;

+(def optimizations
+  {:prod {:optimizations :advanced}
+   :dev {:optimizations :none}
+   :test {:optimizations :none}})
+
 (def foreign-libs
   "Specify ClojureScript foreign libs as a vector of {:file ... :provides []} maps.
   See https://github.com/clojure/clojurescript/wiki/Compiler-Options#foreign-libs"
@@ -136,52 +142,48 @@
           :closure-defines {"goog.DEBUG" true}}))

 (def frontend-options
-  {:env {:source-paths #{"sass" "src/frontend"}
+  {:env {:source-paths #{"src/frontend"}
          :asset-paths #{"assets"}
          :dependencies (vec (concat frontend-dev-deps frontend-deps))}
    :reload {:on-jsload '<<name>>.app/init}
    :cljs-repl {:nrepl-opts {:port 5088}}
-   :sass {:sass-file "app.scss"
-          :output-dir "."
-          :line-numbers true
-          :source-maps true}
-   :test-cljs {:optimizations :simple
-               :suite-ns '<<name>>.suite}})
+   :test-cljs {:suite-ns '<<project-ns>>.suite}})

 (defmethod boot/options [:frontend :dev]
   [selection]
-  (-> frontend-options
-      (merge {:props {"CLJS_LOG_LEVEL" "DEBUG"}
-              :cljs {:source-map true
-                     :optimizations :simple
-                     :compiler-options dev-compiler-options}})
-      (update-in [:env :source-paths] conj "env/dev/src")
-      (assoc :cljs {:source-map true
-                    :optimizations :simple
-                    :compiler-options dev-compiler-options})
-      (assoc-in [:test-cljs :cljs-opts] dev-compiler-options)))
+  (let [optimizations (:dev optimizations)]
+    (-> frontend-options
+        (assoc :props {"CLJS_LOG_LEVEL" "DEBUG"})
+        (update-in [:env :source-paths] conj "env/dev/src")
+        (assoc :cljs (merge (:dev optimizations)
+                            {:source-map true
+                             :compiler-options dev-compiler-options}))
+        (assoc :test-cljs (merge (:dev optimizations)
+                                 {:cljs-opts dev-compiler-options})))))

 (defmethod boot/options [:frontend :prod]
   [selection]
-  (-> frontend-options
-      (merge {:props {"CLJS_LOG_LEVEL" "INFO"}
-              :cljs {:source-map true
-                     :optimizations :advanced
-                     :compiler-options prod-compiler-options}})
-      (update-in [:env :source-paths] conj "env/prod/src")
-      (assoc :cljs {:source-map true
-                    :optimizations :advanced
-                    :compiler-options prod-compiler-options})
-      (assoc-in [:test-cljs :cljs-opts] prod-compiler-options)))
+  (let [optimizations (:prod optimizations)]
+    (-> frontend-options
+        (assoc :props {"CLJS_LOG_LEVEL" "INFO"})
+        (update-in [:env :source-paths] conj "env/prod/src")
+        (assoc :cljs (merge optimizations
+                            {:source-map false
+                             :compiler-options prod-compiler-options}))
+        (assoc :test-cljs (merge optimizations
+                                 {:cljs-opts prod-compiler-options})))))

 (defmethod boot/options [:frontend :test]
   [selection]
-  (-> frontend-options
-      (merge {:props {"CLJS_LOG_LEVEL" "DEBUG"}
-              :cljs {:source-map true
-                     :optimizations :simple
-                     :compiler-options dev-compiler-options}})
-      (update-in [:env :source-paths] conj "test/frontend")))
+  (let [optimizations (:test optimizations)]
+    (-> frontend-options
+        (assoc :props {"CLJS_LOG_LEVEL" "DEBUG"})
+        (update-in [:env :source-paths] conj "env/dev/src" "test/frontend")
+        (assoc :cljs (merge optimizations
+                            {:source-map true
+                             :compiler-options dev-compiler-options}))
+        (assoc :test-cljs (merge optimizations
+                                 {:cljs-opts dev-compiler-options})))))

 <% endif %>
 ;;;;;;;;;;;;;;;;;;


mbrainz sample: remove cardinality.many from release/label attribute

--- datomic_helpers_sample.clj
+++ datomic_helpers_sample.clj
@@ -126,50 +126,50 @@

    ;; The label on which the recording was released.
    ;; An issue exists: https://github.com/Datomic/mbrainz-sample/pull/2
-   :release/label [ {
-                     ;; The globally unique MusicBrainz ID for the record label
-                     :label/gid (ext {:db/unique :db.unique/identity
-                                      :db/index true}
-                                     :db.type/uuid)
-
-                     ;; The name of the record label
-                     :label/name (ext {:db/fulltext true
-                                       :db/index true}
-                                      :db.type/string)
-
-                     ;; The name of the record label for use in alphabetical sorting
-                     :label/sortName (ext {:db/index true}
-                                          :db.type/string)
-
-                     :label/type #{:label.type/distributor
-                                   :label.type/holding
-                                   :label.type/production
-                                   :label.type/originalProduction
-                                   :label.type/bootlegProduction
-                                   :label.type/reissueProduction
-                                   :label.type/publisher}
-
-                     ;; The country where the record label is located
-                     :label/country :db.type/ref ; country entity, see above
-
-                     ;; The year the label started business
-                     :label/startYear (ext {:db/index true}
-                                           :db.type/long)
-
-                     ;; The month the label started business
-                     :label/startMonth :db.type/long
-
-                     ;; The day the label started business
-                     :label/startDay :db.type/long
-
-                     ;; The year the label stopped business
-                     :label/endYear :db.type/long
-
-                     ;; The month the label stopped business
-                     :label/endMonth :db.type/long
-
-                     ;; The day the label stopped business
-                     :label/endDay :db.type/long} ]
+   :release/label {
+                   ;; The globally unique MusicBrainz ID for the record label
+                   :label/gid (ext {:db/unique :db.unique/identity
+                                    :db/index true}
+                                   :db.type/uuid)
+
+                   ;; The name of the record label
+                   :label/name (ext {:db/fulltext true
+                                     :db/index true}
+                                    :db.type/string)
+
+                   ;; The name of the record label for use in alphabetical sorting
+                   :label/sortName (ext {:db/index true}
+                                        :db.type/string)
+
+                   :label/type #{:label.type/distributor
+                                 :label.type/holding
+                                 :label.type/production
+                                 :label.type/originalProduction
+                                 :label.type/bootlegProduction
+                                 :label.type/reissueProduction
+                                 :label.type/publisher}
+
+                   ;; The country where the record label is located
+                   :label/country :db.type/ref ; country entity, see above
+
+                   ;; The year the label started business
+                   :label/startYear (ext {:db/index true}
+                                         :db.type/long)
+
+                   ;; The month the label started business
+                   :label/startMonth :db.type/long
+
+                   ;; The day the label started business
+                   :label/startDay :db.type/long
+
+                   ;; The year the label stopped business
+                   :label/endYear :db.type/long
+
+                   ;; The month the label stopped business
+                   :label/endMonth :db.type/long
+
+                   ;; The day the label stopped business
+                   :label/endDay :db.type/long}

    ;; The script used in the release
    :release/script {:db/ident :db.type/keyword


Bump commons-fileupload to 1.3.3

Bump commons-fileupload to 1.3.3

Version 1.3.3 patches a code execution exploit:
http://www.cvedetails.com/cve/CVE-2016-1000031/

The release notes for 1.3.3. states that no client code will need
changing to accommodate this bugfix.

--- ring-core/project.clj
+++ ring-core/project.clj
@@ -7,7 +7,7 @@
   :dependencies [[org.clojure/clojure "1.5.1"]
                  [ring/ring-codec "1.0.1"]
                  [commons-io "2.5"]
-                 [commons-fileupload "1.3.2"]
+                 [commons-fileupload "1.3.3"]
                  [clj-time "0.11.0"]
                  [crypto-random "1.2.0"]
                  [crypto-equality "1.0.0"]]


Adding mailing lib

Adding mailing lib

--- apoya-app/project.clj
+++ apoya-app/project.clj
@@ -34,6 +34,7 @@
                   :exclusions [org.bouncycastle/bctsp-jdk14]]
                  [clj-http "0.7.7"]
                  [clojurewerkz/elastisch "1.3.0-beta5"]
+                 [com.draines/postal "1.11.1"]
                  [pallet-fsm "0.2.0"]
                  ;; Java libs
                  [ch.qos.logback/logback-core "1.0.13"]


remove nils before saving to datascript

remove nils before saving to datascript


streaming search working

streaming search working

--- src/edu/berkeley/ai/angelic/hierarchies/offline_algorithms.clj
+++ src/edu/berkeley/ai/angelic/hierarchies/offline_algorithms.clj
@@ -168,11 +168,13 @@
 		       (recur false threshold))))))))))))

 (defn ahss-decomposed-search
-  [node]
-  (if-let [result (ahss-et-search node)]
+  ([node] (ahss-decomposed-search node (- Double/MAX_VALUE)))
+  ([node threshold] (ahss-decomposed-search node threshold alts/icaps-priority-fn))
+  ([node threshold priority-fn]
+  (if-let [result (ahss-et-search node threshold priority-fn)]
     (if (isa? (:class result) ::search/Node)
         (if (> (alts/alt-node-hla-count result) 1)
-	    (concat-solutions (map #(ahss-decomposed-search % (search/lower-reward-bound %))
+	    (concat-solutions (map #(ahss-decomposed-search % (search/lower-reward-bound %) priority-fn)
 				   (alts/decompose-plan result)))
 	  (recur (search/reroot-at-node node))))))

@@ -229,16 +231,16 @@

 (defn streaming-search
   "Refine provided plan (node) using AHSS.
-   Returns a lazy seq of result actions, which will be populated as eagerly as possible.
-   Does not return a final cost."
-  [node]
-  (apply concat
+   Returns a lazy seq of result actions, but no final cost.
+   The user may want to call seque on the resulting sequence, to realize it in the background."
+  ([node]
+    (apply concat
     (for [result (alts/decompose-plan node)]
       (let [next (ahss-et-search result (search/lower-reward-bound result))]
 	(if (isa? (:class next) ::search/Node)
  	    (streaming-search next)
-	  (first next))))))
-; TODO: seque!
+	  (first next)))))))
+

 (comment


Remove fetch-and-draw.

Remove fetch-and-draw.

--- metlog-vault/src-client/metlog_client/metlog.cljs
+++ metlog-vault/src-client/metlog_client/metlog.cljs
@@ -41,11 +41,6 @@
 (defn tsplot-draw [ canvas width series-data ]
   (let [ ctx (.getContext canvas "2d")]
     (tsplot/draw ctx width 180 series-data)))
-
-(defn tsplot-fetch-and-draw [ canvas width series-name ]
-  (go
-    (tsplot-draw canvas width
-                 (<! (<<< fetch-series-data series-name @query-window-secs)))))

 (defn dom-width [ node ]
   (if node


Made make-context validate it's input

Made make-context validate it's input

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- conexp/fca/contexts.clj
+++ conexp/fca/contexts.clj
@@ -48,21 +48,25 @@
        (= (attributes this) (attributes other))
        (= (incidence this) (incidence other))))

-(defn type-of-incidence [_ _ in]
+(defn type-of [thing]
   (cond
-    (set? in) ::set
-    (fn? in) ::fn
+    (set? thing) ::set
+    (fn? thing) ::fn
+    (seq? thing) ::seq
     :else :invalid))

-(defmulti make-context type-of-incidence)
+(defmulti make-context (fn [o a i] [(type-of o) (type-of a) (type-of i)]))

-(defmethod make-context ::set [objects attributes incidence]
-  (conexp.fca.Context. (set objects) (set attributes) (set incidence)))
+(defmethod make-context [::set ::set ::set] [objects attributes incidence]
+  (conexp.fca.Context. objects attributes (set incidence)))

-(defmethod make-context ::fn [objects attributes incidence]
+(defmethod make-context [::set ::set ::fn] [objects attributes incidence]
   (make-context (set objects) (set attributes) (set-of [x y] [x objects
 							      y attributes
 							      :when (incidence x y)])))
+
+(defmethod make-context :default [obj att inz]
+  (throw (IllegalArgumentException. (str "The arguments " obj ", " att " and " inz " are not valid"))))

 (defn object-derivation [ctx objects]
   (let [{:keys [incidence attributes]} (.state ctx)]


allow twiddling the SVG attributes

allow twiddling the SVG attributes

--- cljs/sledge/core.cljs
+++ cljs/sledge/core.cljs
@@ -223,15 +223,17 @@
                   :onEnded #(put! command-chan [:next-track])
                   }])))))

-(defn svg [& elements]
+(defn svg [attrs & elements]
   (into
-   [:svg {:xmlns "http://www.w3.org/2000/svg"
-          :version "1.1"
-          :width "24px"
-          :height "20px"
-          :viewBox "-10 -10 120 120"
-          :xmlnsXlink "http://www.w3.org/1999/xlink"
-          }]
+   [:svg (merge
+          {:xmlns "http://www.w3.org/2000/svg"
+           :version "1.1"
+           :width "24px"
+           :height "20px"
+           :viewBox "-10 -10 120 120"
+           :xmlnsXlink "http://www.w3.org/1999/xlink"
+           }
+          attrs)]
    elements))

 (defn polygon [& points]
@@ -240,24 +242,28 @@
              :fill "#006765"}])

 (defn svg-play []
-  (svg [:g {:transform "translate(15 0)"}
+  (svg {}
+       [:g {:transform "translate(15 0)"}
         (polygon 0,0 80,50 0,100 0,0)]))

 (defn svg-pause []
-  (svg [:g {:transform "translate(15 0)"}
+  (svg {}
+       [:g {:transform "translate(15 0)"}
         (polygon 0,0 25,0 25,100 0,100 0,0)
         (polygon 40,0 65,0 65,100 40,100 40,0)]))

 (defn svg-spinner []
   [:div {:className "spinning"}
    (svg
+    {}
     [:circle {:cx 50 :cy 20 :r 11 :fill "#006765"}]
     [:circle {:cx 50 :cy 80 :r 11 :fill "#006765"}]
     [:circle {:cx 20 :cy 50 :r 11 :fill "#006765"}]
     [:circle {:cx 80 :cy 50 :r 11 :fill "#006765"}])])

 (defn svg-skip-track [ & [backward?]]
-  (svg [:g {:transform (if backward? "rotate(180 50 50)" "translate(0 0)")}
+  (svg {}
+       [:g {:transform (if backward? "rotate(180 50 50)" "translate(0 0)")}
         (polygon 0,0 35,50 0,100 0,0)
         (polygon 40,0 80,50 40,100 40,0)
         (polygon 85,0 95,0 95,100 85,100 85,0)]))


File and URL primitives and coercions

File and URL primitives and coercions

Former-commit-id: d4300b5950f44fda321cd3c62b37c4da8e46b6ca

--- planck-cljs/src/planck/io.cljs
+++ planck-cljs/src/planck/io.cljs
@@ -1,4 +1,42 @@
-(ns planck.io)
+(ns planck.io
+  (:import goog.Uri))
+
+(defrecord File [path])
+
+(defn build-uri
+  "Builds a URI"
+  [scheme server-name server-port uri query-string]
+  (doto (Uri.)
+    (.setScheme (name (or scheme "http")))
+    (.setDomain server-name)
+    (.setPort server-port)
+    (.setPath uri)
+    (.setQuery query-string true)))
+
+(defprotocol Coercions
+  "Coerce between various 'resource-namish' things."
+  (^File as-file [x] "Coerce argument to a File.")
+  (^js/goog.Uri as-url [x] "Coerce argument to a goog.Uri."))
+
+(extend-protocol Coercions
+  nil
+  (as-file [_] nil)
+  (as-url [_] nil)
+
+  string
+  (as-file [s] (File. s))
+  (as-url [s] (Uri. s))
+
+  File
+  (as-file [f] f)
+  (as-url [f] (build-uri :file nil nil (:path f) nil))
+
+  js/goog.Uri
+  (as-url [u] u)
+  (as-file [u] u
+    (if (= "file" (.getScheme u))
+      (as-file (.getPath u))
+      (throw (js/Error. (str "Not a file: " u))))))

 (defprotocol IReader
   (-read [this] "Returns available characters as a string or nil of EOF."))


Bumps version to 1.42.1-SNAPSHOT

Bumps version to 1.42.1-SNAPSHOT

--- scheduler/project.clj
+++ scheduler/project.clj
@@ -13,7 +13,7 @@
 ;; See the License for the specific language governing permissions and
 ;; limitations under the License.
 ;;
-(defproject cook "1.42.0"
+(defproject cook "1.42.1-SNAPSHOT"
   :description "This launches jobs on a Mesos cluster with fair sharing and preemption"
   :license {:name "Apache License, Version 2.0"}
   :dependencies [[org.clojure/clojure "1.8.0"]


Refactors :dependencies for easier replacement via profiles (#692)

--- scheduler/project.clj
+++ scheduler/project.clj
@@ -20,7 +20,7 @@

                  ;;Data marshalling
                  [org.clojure/data.codec "0.1.0"]
-                 [cheshire "5.3.1"]
+                 ^:displace [cheshire "5.3.1"]
                  [byte-streams "0.1.4"]
                  [org.clojure/data.json "0.2.2"]
                  [com.taoensso/nippy "2.8.0"
@@ -45,11 +45,11 @@
                  [org.clojure/data.priority-map "0.0.5"]
                  [swiss-arrows "1.0.0"]
                  [riddley "0.1.10"]
-                 [com.netflix.fenzo/fenzo-core "0.10.0"
-                  :exclusions [org.apache.mesos/mesos
-                               com.fasterxml.jackson.core/jackson-core
-                               org.slf4j/slf4j-api
-                               org.slf4j/slf4j-simple]]
+                 ^:displace [com.netflix.fenzo/fenzo-core "0.10.0"
+                             :exclusions [org.apache.mesos/mesos
+                                          com.fasterxml.jackson.core/jackson-core
+                                          org.slf4j/slf4j-api
+                                          org.slf4j/slf4j-simple]]

                  ;;Logging
                  [org.clojure/tools.logging "0.2.6"]
@@ -89,7 +89,6 @@

                  ;;External system integrations
                  [me.raynes/conch "0.5.2"]
-                 [wyegelwe/mesomatic "1.0.1-r0-SNAPSHOT"]
                  [org.clojure/tools.nrepl "0.2.3"]

                  ;;Ring
@@ -104,21 +103,12 @@
                  [liberator "0.15.0"]

                  ;;Databases
-                 [com.datomic/datomic-free "0.9.5206"
-                  :exclusions [org.slf4j/slf4j-api
-                               com.fasterxml.jackson.core/jackson-core
-                               org.slf4j/jcl-over-slf4j
-                               org.slf4j/jul-to-slf4j
-                               org.slf4j/log4j-over-slf4j
-                               org.slf4j/slf4j-nop
-                               joda-time]]
                  [org.apache.curator/curator-framework "2.7.1"
                   :exclusions [io.netty/netty]]
                  [org.apache.curator/curator-recipes "2.7.1"
                   :exclusions [org.slf4j/slf4j-log4j12
                                org.slf4j/log4j
-                               log4j
-                               ]]
+                               log4j]]
                  [org.apache.curator/curator-test "2.7.1"]]

   :repositories {"maven2" {:url "https://files.couchbase.com/maven2/"}
@@ -139,7 +129,32 @@
   :java-source-paths ["java"]

   :profiles
-  {:uberjar
+  {
+   ; By default, activate the :oss profile (explained below)
+   :default [:base :system :user :provided :dev :oss]
+
+   ; The :oss profile exists so that Cook can be built with a more
+   ; appropriate set of dependencies for a specific environment than
+   ; the ones defined here (by using `lein with-profile -oss` ...)
+   :oss
+   {:dependencies [
+                   ; For example, one could drop in the datomic-pro
+                   ; library instead of the datomic-free library, by
+                   ; using a profiles.clj file that defines a profile
+                   ; which pulls in datomic-pro
+                   [com.datomic/datomic-free "0.9.5206"
+                    :exclusions [org.slf4j/slf4j-api
+                                 com.fasterxml.jackson.core/jackson-core
+                                 org.slf4j/jcl-over-slf4j
+                                 org.slf4j/jul-to-slf4j
+                                 org.slf4j/log4j-over-slf4j
+                                 org.slf4j/slf4j-nop
+                                 joda-time]]
+                   ; Similarly, one could use an older version of the
+                   ; mesomatic library in environments that require it
+                   [wyegelwe/mesomatic "1.0.1-r0-SNAPSHOT"]]}
+
+   :uberjar
    {:aot [cook.components]}

    :dev
@@ -190,5 +205,4 @@
              "-XX:NumberOfGCLogFiles=20"
              "-XX:GCLogFileSize=128M"
              "-XX:+PrintGCDateStamps"
-             "-XX:+HeapDumpOnOutOfMemoryError"
-             ])
+             "-XX:+HeapDumpOnOutOfMemoryError"])


Работа над внешним видом

Работа над внешним видом

--- radiolamp-6P3S/src/r6p3s/cpt/d3/chart_2.cljs
+++ radiolamp-6P3S/src/r6p3s/cpt/d3/chart_2.cljs
@@ -132,18 +132,28 @@
             (-> paths
                 (.style "stroke" (fn [srow] (:stroke srow)))
                 (.style "stroke-width" "1.5px")
-                (.style "fill" "none")
+                (.style "fill" (fn [srow] (:stroke srow)))
+                (.style "fill-opacity" "0.25")
                 (.datum (fn [{:keys [y-value-fn filter-fn] :as srow}]
-                          (->> data
-                               (reduce
-                                (fn [a row]
-                                  (let [next-row [(x-scale (x-value-fn row)),
-                                                  (y-scale (y-value-fn row))]]
-                                    (if (nil? filter-fn) (conj a next-row)
-                                        (if (filter-fn row) (conj a next-row)
-                                            a))))
-                                [])
-                               into-array)))
+                          (let [data (->> data
+                                          (reduce
+                                           (fn [a row]
+                                             (let [next-row [(x-scale (x-value-fn row)),
+                                                             (y-scale (y-value-fn row))]]
+                                               (if (nil? filter-fn)
+                                                 (conj a next-row)
+                                                 (if (filter-fn row)
+                                                   (conj a next-row)
+                                                   a))))
+                                           []))
+                                data (if-let [[x _] (last data)]
+                                       (conj data [x, (y-scale 0)])
+                                       data)
+                                data (if-let [[x _] (first data)]
+                                       (concat [[x (y-scale 0)]] data)
+                                       data)
+                                ]
+                            (into-array data))))
                 (.attr "d" (-> js/d3
                                .-svg
                                .line
@@ -246,9 +256,9 @@

                          ;; TEXT ----------------------------------------------------------------
                          (let [texts (-> chart-pano
-                                           (.select "g.charting.pathes")
-                                           (.selectAll "text")
-                                           (.data data-2))]
+                                         (.select "g.charting.pathes")
+                                         (.selectAll "text")
+                                         (.data data-2))]

                            (-> texts
                                .enter
@@ -315,13 +325,15 @@

          (dom/svg #js {:width main-width :height main-height}
                   (dom/g #js {:id chart-pano-id :transform (str "translate(" left "," top ")")}
-                         (dom/g #js {:className "y axis"}
-                                (dom/text #js {:transform "rotate(-90)"
-                                               :y         "6" :dy ".71em" :style #js {:textAnchor "end"}}
-                                          y-label))
-                         (dom/g #js {:className "x axis" :transform (str "translate(0," chart-height ")")})
+
                          (dom/g #js {:className "charting pathes"})
                          (dom/g #js {:className "x brush" :width chart-width :height chart-height})
                          (dom/g #js {:className "lines brush"}
                                 (dom/line #js {:className "brush-line-left"})
-                                (dom/line #js {:className "brush-line-right"})))))))))
+                                (dom/line #js {:className "brush-line-right"}))
+
+                         (dom/g #js {:className "x axis" :transform (str "translate(0," chart-height ")")})
+                         (dom/g #js {:className "y axis"}
+                                (dom/text #js {:transform "rotate(-90)"
+                                               :y         "6" :dy ".71em" :style #js {:textAnchor "end"}}
+                                          y-label)))))))))


upgrade clojurescript

upgrade clojurescript

--- cljs/puzzle/project.clj
+++ cljs/puzzle/project.clj
@@ -1,11 +1,11 @@
 (defproject pcg "1.0"
   :description "lichess.org puzzle solver"
   :source-paths ["src-clj"]
-  :dependencies [[org.clojure/clojure "1.5.1"]
-                 [org.clojure/clojurescript "0.0-2156" :exclusions [org.apache.ant/ant]]
-                 [org.clojure/core.async "0.1.267.0-0d7780-alpha"]
+  :dependencies [[org.clojure/clojure "1.6.0"]
+                 [org.clojure/clojurescript "0.0-2202" :exclusions [org.apache.ant/ant]]
+                 [org.clojure/core.async "0.1.278.0-76b25b-alpha"]
                  [jayq "2.5.0"]]
-  :plugins [[lein-cljsbuild "1.0.2"]]
+  :plugins [[lein-cljsbuild "1.0.3"]]
   :cljsbuild {
               :builds {
                        :dev {


reformat

reformat


[#2254] Fix engine/columns-used defmethod for core/extract-multiple

--- backend/src/akvo/lumen/lib/transformation/multiple_column.clj
+++ backend/src/akvo/lumen/lib/transformation/multiple_column.clj
@@ -28,6 +28,6 @@
   (-> (apply-operation deps table-name columns op-spec)
       (update :columns walk/stringify-keys)))

-(defmethod t.engine/columns-used "core/combine"
+(defmethod t.engine/columns-used "core/extract-multiple"
   [applied-transformation columns]
   [(:columnName (:selectedColumn (:args applied-transformation)))])


Only show Merge button if user has :write-settings permissions

--- src-cljs/frontend/components/pages/build.cljs
+++ src-cljs/frontend/components/pages/build.cljs
@@ -105,6 +105,7 @@
            (when can-trigger-builds?
              (om/build rebuild-actions {:build build :project project}))
            (when (and (feature/enabled? :merge-pull-request)
+                      can-write-settings?
                       (build-model/can-merge-at-least-one-pr? build))
              (om/build merge-actions {:build build}))
            (when can-write-settings?


CLJS-1388: Stacktrace element handling for :output-dir w/o file/line/column

--- src/main/cljs/cljs/stacktrace.cljc
+++ src/main/cljs/cljs/stacktrace.cljc
@@ -58,23 +58,25 @@
   [repl-env st err opts] st)

 (defn parse-file-line-column [flc]
-  (let [xs (string/split flc #":")
-        [pre [line column]]
-        (reduce
-          (fn [[pre post] [x i]]
-            (if (<= i 2)
-              [pre (conj post x)]
-              [(conj pre x) post]))
-          [[] []] (map vector xs (range (count xs) 0 -1)))
-        file (string/join ":" pre)]
-    [(cond-> file
-       (starts-with? file "(") (string/replace "(" ""))
-     (parse-int
-       (cond-> line
-         (ends-with? line ")") (string/replace ")" "")))
-     (parse-int
-       (cond-> column
-         (ends-with? column ")") (string/replace ")" "")))]))
+  (if-not (re-find #":" flc)
+    [flc nil nil]
+    (let [xs (string/split flc #":")
+          [pre [line column]]
+          (reduce
+            (fn [[pre post] [x i]]
+              (if (<= i 2)
+                [pre (conj post x)]
+                [(conj pre x) post]))
+            [[] []] (map vector xs (range (count xs) 0 -1)))
+          file (string/join ":" pre)]
+      [(cond-> file
+         (starts-with? file "(") (string/replace "(" ""))
+       (parse-int
+         (cond-> line
+           (ends-with? line ")") (string/replace ")" "")))
+       (parse-int
+         (cond-> column
+           (ends-with? column ")") (string/replace ")" "")))])))

 (defn parse-file
   "Given a browser file url convert it into a relative path that can be used
@@ -215,7 +217,7 @@
         [file line column] (parse-file-line-column flc)]
     (if (and file function line column)
       {:file (parse-file repl-env file opts)
-       :function function
+       :function (string/trim function)
        :line line
        :column column}
       (when-not (string/blank? function)
@@ -244,6 +246,14 @@
     vec))

 (comment
+  (parse-stacktrace {}
+    "cljs$core$seq@out/cljs/core.js:3999:17
+    cljs$core$first@out/cljs/core.js:4018:22
+    cljs$core$ffirst@out/cljs/core.js:5161:39
+    global code"
+    {:ua-product :safari}
+    {:output-dir "out"})
+
   (parse-stacktrace {:host "localhost" :port 9000}
     "cljs$core$seq@http://localhost:9000/out/cljs/core.js:4259:17
 cljs$core$first@http://localhost:9000/out/cljs/core.js:4289:22


Make age-mediated-parent-selection invertable

--- src/clojush/pushgp/selection/preselection.clj
+++ src/clojush/pushgp/selection/preselection.clj
@@ -26,20 +26,26 @@
   "If age-mediated-parent-selection is falsy, returns pop. Otherwise,
   age-mediated-parent-selection should be a vector of [pmin pmax] with pmin and pmax both
   being between 0 and 1 (inclusive) with pmin + pmax <= 1.0. Then, with probability pmin,
-  returns individuals in pop with age @min-age; with probability pmax, returns all of pop;
+  returns individuals in pop with the minimum age; with probability pmax, returns all of pop;
   with probability (- 1.0 pmin pmax), selects an age cutoff uniformly from those present
-  in the population and returns individuals with the cutoff age or lower."
+  in the population and returns individuals with the cutoff age or lower. If a third
+  element of :invert is included in age-mediated-parent-selection then with probability
+  pmin, returns individuals in pop with the maximum age; with probability pmax, returns
+  all of pop; with probability (- 1.0 pmin pmax), selects an age cutoff uniformly from
+  those present in the population and returns individuals with the cutoff age or higher."
   [pop {:keys [age-mediated-parent-selection]}]
   (if (not age-mediated-parent-selection)
     pop
-    (let [rand-val (lrand)]
-      (if (<= rand-val (first age-mediated-parent-selection))
-        (let [min-age (reduce min (map :age pop))]
-          (filter #(= (:age %) min-age) pop))
-        (if (<= rand-val (apply + age-mediated-parent-selection))
+    (let [rand-val (lrand)
+          amps age-mediated-parent-selection ;; just abbreviate
+          invert (> (count amps) 2)] ;; assume any more args are just :invert
+      (if (<= rand-val (first amps))
+        (let [extreme-age (reduce (if invert max min) (map :age pop))]
+          (filter #(= (:age %) extreme-age) pop))
+        (if (<= rand-val (+ (first amps) (second amps)))
           pop
           (let [age-limit (lrand-nth (distinct (map :age pop)))]
-            (filter (fn [ind] (<= (:age ind) age-limit))
+            (filter (fn [ind] ((if invert >= <=) (:age ind) age-limit))
                     pop)))))))

 (defn screen
@@ -70,4 +76,3 @@
       (screen argmap)
       (one-individual-per-error-vector-for-lexicase argmap)))

-


Fixing build issue.

Fixing build issue.

--- src/cmr/indexer/services/concepts/granule.clj
+++ src/cmr/indexer/services/concepts/granule.clj
@@ -23,12 +23,13 @@

 (defn spatial->elastic
   [parent-collection granule]
-  (let [gsr (get-in parent-collection [:spatial-coverage :granule-spatial-representation])]
-    (if (= gsr :geodetic)
-      (spatial/spatial->elastic-docs gsr granule)
-      (errors/internal-error!
-        (format "Only geodetic is supported for granule spatial representation not [%s]"
-                gsr)))))
+  (when (get-in granule [:spatial-coverage :geometries])
+    (let [gsr (get-in parent-collection [:spatial-coverage :granule-spatial-representation])]
+      (if (= gsr :geodetic)
+        (spatial/spatial->elastic-docs gsr granule)
+        (errors/internal-error!
+          (format "Only geodetic is supported for granule spatial representation not [%s]"
+                  gsr))))))

 (defmethod idx/concept->elastic-doc :granule


Added method for safely parsing the error response in XML.

--- src/cmr/system_int_test/utils/search_util.clj
+++ src/cmr/system_int_test/utils/search_util.clj
@@ -78,6 +78,14 @@
              errors# (:errors (json/decode body# true))]
          {:status status# :errors errors#}))))

+(defn safe-parse-error-xml
+  [xml]
+  (try
+    (cx/strings-at-path (x/parse-str xml) [:error])
+    (catch Exception e
+      (.printStackTrace e)
+      [xml])))
+
 (defmacro get-search-failure-xml-data
   "Executes a search and returns error data that was caught, parsing the body as an xml string.
   Tests should verify the results this returns."
@@ -86,7 +94,7 @@
      ~@body
      (catch clojure.lang.ExceptionInfo e#
        (let [{{status# :status body# :body} :object} (ex-data e#)
-             errors# (cx/strings-at-path (x/parse-str body#) [:error])]
+             errors# (safe-parse-error-xml body#)]
          {:status status# :errors errors#}))))

 (defn find-concepts-in-format


fixed error

fixed error

--- src/server/socketio-interface.cljs
+++ src/server/socketio-interface.cljs
@@ -50,7 +50,7 @@
         (fn [user-id]
           (user/get-room-id user-id
             (fn [room-id]
-              (server/new-hash user-id room-id
+              (server-interface/new-hash user-id room-id
                 (fn [upload-id uploads-order]
                   (.emit (.to io room-id) "uploads-order" uploads-order)
                   (.emit socket "start-hashing" client-id upload-id))))))))))


RP + RS | 167 | breaking journey tests in order to test drive retrieving public key from stonecutter dynamically

--- src/stonecutter_client/handler.clj
+++ src/stonecutter_client/handler.clj
@@ -43,8 +43,7 @@
                                                       (get-env :client-id)
                                                       (get-env :client-secret)
                                                       (str (base-url) "/openid/callback")
-                                                      :protocol :openid
-                                                      :public-key (public-key))})
+                                                      :protocol :openid)})

 (defn html-response [s]
   (-> s


fix broken rgb32 snap

fix broken rgb32 snap

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

--- acqEngine/src/org/micromanager/acq_engine.clj
+++ acqEngine/src/org/micromanager/acq_engine.clj
@@ -313,19 +313,15 @@
     (Thread/sleep 5)))

 (defn collect-snap-image [event out-queue]
-  (log "collect-snap-image")
-  (doall
-    (for [event1 (make-multicamera-events event)]
-      (let [image
-            {:pix (core getImage (event1 :camera-channel-index))
-             :tags nil}]
-        (log "collect-snap-image: "
-             (select-keys event [:position-index :frame-index
-                                 :slice-index :channel-index]))
-        (when out-queue
-          (.put out-queue
-                (make-TaggedImage (annotate-image image event1 @state (elapsed-time @state)))))
-        image))))
+  (let [image
+        {:pix (core getImage)
+         :tags nil}]
+    (select-keys event [:position-index :frame-index
+                        :slice-index :channel-index])
+    (when out-queue
+      (.put out-queue
+            (make-TaggedImage (annotate-image image event @state (elapsed-time @state)))))
+    image))

 (defn return-config []
   (dorun (map set-property


CMR-688: Removed unused def.

CMR-688: Removed unused def.

--- search-app/src/cmr/search/services/url_helper.clj
+++ search-app/src/cmr/search/services/url_helper.clj
@@ -19,7 +19,4 @@
   [context concept-type result-format]
   (let [{:keys [query-string]} context
         query-string (if (empty? query-string) "" (str "?" query-string))]
-    (format "%s%ss.%s%s" (search-root context) (name concept-type) (name result-format) query-string)))
-
-;; Needed to construct opendata fields
-(def public-reverb-root (cfg/config-value :public-reverb-root "http://localhost:10000/reverb"))+    (format "%s%ss.%s%s" (search-root context) (name concept-type) (name result-format) query-string)))


[bug] check if account is new by checking accounts

previous behavior was using context (which screen we were on) to
determine if account was new or not.

in order to be able to have more straightforward automation this
commit now checks the list of accounts to get that information
which is more accurate and allows to login without navigating screens.

--- src/status_im/ui/screens/accounts/login/events.cljs
+++ src/status_im/ui/screens/accounts/login/events.cljs
@@ -97,22 +97,27 @@
                         wrap-with-stop-node-fx)]
       (wrap-fn db' address password))))

+(defn is-new-account?
+  "checks if the account is in the accounts in the db"
+  [{:accounts/keys [accounts]} address]
+  (let [present? (set (keys accounts))]
+    (not (present? address))))
+
 (register-handler-fx
   :login-handler
-  (fn [{db :db} [_ result address]]
-    (let [data    (json->clj result)
+  (fn [{db :db} [_ login-result address]]
+    (let [data    (json->clj login-result)
           error   (:error data)
           success (zero? (count error))
           db'     (assoc-in db [:accounts/login :processing] false)]
-      (log/debug "Logged in account: " result)
+      (log/debug "Logging result: " login-result)
       (merge
-        {:db (if success db' (assoc-in db' [:accounts/login :error] error))}
-        (when success
-          (let [is-login-screen? (= (:view-id db) :login)
-                new-account?     (not is-login-screen?)]
-            (log/debug "Logged in: " (:view-id db) is-login-screen? new-account?)
-            {::clear-web-data nil
-             ::change-account [address new-account?]}))))))
+       {:db (if success db' (assoc-in db' [:accounts/login :error] error))}
+       (when success
+         (let [new-account? (is-new-account? db address)]
+           (log/debug "Logged in" (when new-account? " new account") ":" address)
+           {::clear-web-data nil
+            ::change-account [address new-account?]}))))))

 (register-handler-fx
   :change-account-handler


CLJ-2395 Improve names in core macro specs

Signed-off-by: Alex Miller <99328387f8334f68433c424d2dfd83062f62754b@cognitect.com>

--- src/main/clojure/clojure/core/specs/alpha.clj
+++ src/main/clojure/clojure/core/specs/alpha.clj
@@ -6,17 +6,17 @@
 (s/def ::local-name (s/and simple-symbol? #(not= '& %)))

 (s/def ::binding-form
-  (s/or :sym ::local-name
-        :seq ::seq-binding-form
-        :map ::map-binding-form))
+  (s/or :local-symbol ::local-name
+        :seq-destructure ::seq-binding-form
+        :map-destructure ::map-binding-form))

 ;; sequential destructuring

 (s/def ::seq-binding-form
   (s/and vector?
-         (s/cat :elems (s/* ::binding-form)
-                :rest (s/? (s/cat :amp #{'&} :form ::binding-form))
-                :as (s/? (s/cat :as #{:as} :sym ::local-name)))))
+         (s/cat :forms (s/* ::binding-form)
+                :rest-forms (s/? (s/cat :ampersand #{'&} :form ::binding-form))
+                :as-form (s/? (s/cat :as #{:as} :as-sym ::local-name)))))

 ;; map destructuring

@@ -37,16 +37,21 @@
     (s/coll-of simple-symbol? :kind vector?)))

 (s/def ::map-bindings
-  (s/every (s/or :mb ::map-binding
-                 :nsk ::ns-keys
-                 :msb (s/tuple #{:as :or :keys :syms :strs} any?)) :kind map?))
+  (s/every (s/or :map-binding ::map-binding
+                 :qualified-keys-or-syms ::ns-keys
+                 :special-binding (s/tuple #{:as :or :keys :syms :strs} any?)) :kind map?))

 (s/def ::map-binding-form (s/merge ::map-bindings ::map-special-binding))

 ;; bindings

-(s/def ::binding (s/cat :binding ::binding-form :init-expr any?))
-(s/def ::bindings (s/and vector? (s/* ::binding)))
+(defn even-number-of-forms?
+  "Returns true if there are an even number of forms in a binding vector"
+  [forms]
+  (even? (count forms)))
+
+(s/def ::binding (s/cat :form ::binding-form :init-expr any?))
+(s/def ::bindings (s/and vector? even-number-of-forms? (s/* ::binding)))

 ;; let, if-let, when-let

@@ -65,25 +70,25 @@

 ;; defn, defn-, fn

-(s/def ::arg-list
+(s/def ::param-list
   (s/and
     vector?
-    (s/cat :args (s/* ::binding-form)
-           :varargs (s/? (s/cat :amp #{'&} :form ::binding-form)))))
-
-(s/def ::args+body
-  (s/cat :args ::arg-list
+    (s/cat :params (s/* ::binding-form)
+           :var-params (s/? (s/cat :ampersand #{'&} :var-form ::binding-form)))))
+
+(s/def ::params+body
+  (s/cat :params ::param-list
          :body (s/alt :prepost+body (s/cat :prepost map?
                                            :body (s/+ any?))
                       :body (s/* any?))))

 (s/def ::defn-args
-  (s/cat :name simple-symbol?
+  (s/cat :fn-name simple-symbol?
          :docstring (s/? string?)
          :meta (s/? map?)
-         :bs (s/alt :arity-1 ::args+body
-                    :arity-n (s/cat :bodies (s/+ (s/spec ::args+body))
-                                    :attr (s/? map?)))))
+         :fn-tail (s/alt :arity-1 ::params+body
+                         :arity-n (s/cat :bodies (s/+ (s/spec ::params+body))
+                                         :attr-map (s/? map?)))))

 (s/fdef clojure.core/defn
   :args ::defn-args
@@ -94,9 +99,9 @@
   :ret any?)

 (s/fdef clojure.core/fn
-  :args (s/cat :name (s/? simple-symbol?)
-               :bs (s/alt :arity-1 ::args+body
-                          :arity-n (s/+ (s/spec ::args+body))))
+  :args (s/cat :fn-name (s/? simple-symbol?)
+               :fn-tail (s/alt :arity-1 ::params+body
+                               :arity-n (s/+ (s/spec ::params+body))))
   :ret any?)

 ;;;; ns
@@ -108,7 +113,7 @@

 (s/def ::ns-refer-clojure
   (s/spec (s/cat :clause #{:refer-clojure}
-                 :filters ::filters)))
+                 :refer-filters ::filters)))

 (s/def ::refer (s/or :all #{:all}
                      :syms (s/coll-of simple-symbol?)))
@@ -132,7 +137,7 @@
 (s/def ::package-list
   (s/spec
     (s/cat :package simple-symbol?
-           :classes (s/* simple-symbol?))))
+           :classes (s/+ simple-symbol?))))

 (s/def ::import-list
   (s/* (s/alt :class simple-symbol?
@@ -146,7 +151,7 @@
 (s/def ::ns-refer
   (s/spec (s/cat :clause #{:refer}
                  :lib simple-symbol?
-                 :filters ::filters)))
+                 :refer-filters ::filters)))

 ;; same as ::prefix-list, but with ::use-libspec instead
 (s/def ::use-prefix-list
@@ -179,7 +184,7 @@
 (s/def ::constructors (s/map-of ::signature ::signature))
 (s/def ::post-init symbol?)
 (s/def ::method (s/and vector?
-                  (s/cat :name simple-symbol?
+                  (s/cat :method-name simple-symbol?
                          :param-types ::signature
                          :return-type ::class-ident)))
 (s/def ::methods (s/coll-of ::method :kind vector?))
@@ -211,10 +216,10 @@
               :gen-class ::ns-gen-class)))

 (s/def ::ns-form
-  (s/cat :name simple-symbol?
+  (s/cat :ns-name simple-symbol?
          :docstring (s/? string?)
          :attr-map (s/? map?)
-         :clauses ::ns-clauses))
+         :ns-clauses ::ns-clauses))

 (s/fdef clojure.core/ns
   :args ::ns-form)


JC | Save activities to both coracle and database for time being

--- src/objective8/back_end/domain/activities.clj
+++ src/objective8/back_end/domain/activities.clj
@@ -3,7 +3,8 @@
             [objective8.back-end.storage.storage :as storage]
             [objective8.utils :as utils]
             [objective8.back-end.domain.objectives :as objectives]
-            [clojure.tools.logging :as log]))
+            [clojure.tools.logging :as log]
+            [objective8.config :as config]))

 (defn objective->activity [objective]
   {"@context"  "http://www.w3.org/ns/activitystreams"
@@ -54,8 +55,11 @@
       (catch Exception e
         (log/error (format "Error posting activity %s to coracle" activity-json) e)))))

-(defn new-coracle-activity-storage [bearer-token url]
-  (CoracleActivityStorage. bearer-token url))
+(defn new-coracle-activity-storage
+  ([bearer-token url]
+   (CoracleActivityStorage. bearer-token url))
+  ([]
+   (new-coracle-activity-storage (:coracle-bearer-token config/environment) (:coracle-post-uri config/environment))))

 (defrecord DBActivityStorage []
   ActivityStorage
@@ -64,6 +68,12 @@
        (assoc :entity :activity)
         storage/pg-store!)))

+(defn new-db-activity-storage []
+  (DBActivityStorage. ))
+
+(def coracle-activity-storage (new-coracle-activity-storage))
+(def db-activity-storage (new-db-activity-storage))
+
 (defn store-activity!
   ([activity-storage entity]
    (let [entity-to-activity-mapping-fn (get-mapping entity)]
@@ -71,7 +81,8 @@
           entity-to-activity-mapping-fn
           (store-activity activity-storage))))
   ([entity]
-   (store-activity! (DBActivityStorage.) entity)))
+   (store-activity! coracle-activity-storage entity)
+   (store-activity! db-activity-storage entity)))      ;; TODO remove db storage when mooncake has been repointed

 (defn retrieve-activities [query]
   (storage/pg-retrieve-activities (assoc query :entity :activity)))


Fix a comment.

Fix a comment.

--- test/clojure_the_language/clojure_numerics_test.clj
+++ test/clojure_the_language/clojure_numerics_test.clj
@@ -141,10 +141,10 @@
   (fact (= 1.25 5/4) => false))

 ;;; From /Clojure Programming/:
-;;;   Clojure’s = could obviate these type differences (as Ruby and Python do),
-;;;   but doing so would impose some runtime cost that would be unappreciated by
-;;;   those who need to maximize the performance of programs that work with
-;;;   homogeneous numeric data.
+;;;   Clojure’s `=` could obviate these type differences (as Ruby and Python
+;;;   do), but doing so would impose some runtime cost that would be
+;;;   unappreciated by those who need to maximize the performance of programs
+;;;   that work with homogeneous numeric data.

 ;;;; ---------------------------------------------------------------------------
 ;;;; ---- My playing ----


Fixing system integration tests.

Fixing system integration tests.

--- test/cmr/system_int_test/data/collection_helper.clj
+++ test/cmr/system_int_test/data/collection_helper.clj
@@ -4,7 +4,7 @@
             [clojure.test.check.generators :as gen]
             [cmr.umm.collection :as c]
             [cmr.common.date-time-parser :as p]
-            [cmr.umm.temporal-coverage :as tc]))
+            [cmr.umm.collection.temporal-coverage :as tc]))

 (defn- fill-in-value
   "Fill the value if present in the given field of the collection, returns the collection"


update tests to stop using with-connection (removed from dbspec)

--- src/test/clj/org/bituf/fountain/test_jdbc.clj
+++ src/test/clj/org/bituf/fountain/test_jdbc.clj
@@ -22,9 +22,10 @@

 (defmacro with-stmt
   [st & body]
-  `(sp/with-connection
-     (with-open [~st (.createStatement ^Connection (:connection sp/*dbspec*))]
-       ~@body)))
+  `((sp/wrap-connection
+      (fn []
+        (with-open [~st (.createStatement ^Connection (:connection sp/*dbspec*))]
+          ~@body)))))

 (defn setup
@@ -159,8 +160,7 @@
       (let [sji (jd/make-sji :sample :gencols :sample-id)]
         (is (= [1 1]
               (jd/insert-batch sji [{:name "Hello" :age 20}
-                                    {:name "World" :age 30}])))
-        ))))
+                                    {:name "World" :age 30}])))))))

 (defn test-ns-hook []


Update element_visuals cards examples

Update element_visuals cards examples

--- src/visuals/untangled/ui/element_visuals.cljs
+++ src/visuals/untangled/ui/element_visuals.cljs
@@ -64,13 +64,12 @@
          (e/ui-card {:title "Card Test" :color color :size size :actions actions}
           (dom/div nil
             (dom/p nil (str "Color: " (name color)))
-            (dom/p nil (str "Size: " (name size)))
-            (dom/p nil (str "Actions: " (object? actions)))))))
-
-
-     (l/row {}
-       (for [image          ["" "img/bubbles.png" "img/welcome_card.jpg"]
-             image-position [:none :top-left :top-right :bottom-left :bottom-right]]
+            (dom/p nil (str "Size: " (name size)))))))
+
+
+     (l/row {}
+       (for [image          ["img/bubbles.png" "img/welcome_card.jpg"]
+             image-position [:top-left :top-right :bottom-left :bottom-right]]
          (l/col {:width 6 :key (str image image-position (rand-int 256))}
            (e/ui-card {:title "Card Test" :color :primary :image image :image-position image-position}
             (dom/div nil
@@ -93,13 +92,12 @@
          (e/ui-card {:type :bordered :title "Card Test" :color color :size size :actions actions}
           (dom/div nil
             (dom/p nil (str "Color: " (name color)))
-            (dom/p nil (str "Size: " (name size)))
-            (dom/p nil (str "Actions: " (object? actions)))))))
-
-
-     (l/row {}
-       (for [image          ["" "img/bubbles.png" "img/welcome_card.jpg"]
-             image-position [:none :top-left :top-right :bottom-left :bottom-right]]
+            (dom/p nil (str "Size: " (name size)))))))
+
+
+     (l/row {}
+       (for [image          ["img/bubbles.png" "img/welcome_card.jpg"]
+             image-position [:top-left :top-right :bottom-left :bottom-right]]
          (l/col {:width 6 :key (str image image-position (rand-int 256))}
            (e/ui-card {:type :bordered :title "Card Test" :color :primary :image image :image-position image-position}
             (dom/div nil
@@ -109,19 +107,16 @@
 (defcard card-transparent-visual-regressions
   (l/row {}
      (for [color [:neutral :primary :accent]
-           size [:normal :expand :wide]
            actions ["" (e/ui-flat-button {:color :primary} "Action")]]
-       (l/col {:width 6 :key (str color size actions (rand-int 256))}
-         (e/ui-card {:type :transparent :title "Card Test" :color color :size size :actions actions}
-          (dom/div nil
-            (dom/p nil (str "Color: " (name color)))
-            (dom/p nil (str "Size: " (name size)))
-            (dom/p nil (str "Actions: " (object? actions)))))))
-
-
-     (l/row {}
-       (for [image          ["" "img/bubbles.png" "img/welcome_card.jpg"]
-             image-position [:none :top-left :top-right :bottom-left :bottom-right]]
+       (l/col {:width 6 :key (str color actions (rand-int 256))}
+         (e/ui-card {:type :transparent :title "Card Test" :color color :actions actions}
+          (dom/div nil
+            (dom/p nil (str "Color: " (name color)))))))
+
+
+     (l/row {}
+       (for [image          ["img/bubbles.png" "img/welcome_card.jpg"]
+             image-position [:top-left :top-right :bottom-left :bottom-right]]
          (l/col {:width 6 :key (str image image-position (rand-int 256))}
            (e/ui-card {:type :transparent :title "Card Test" :color :primary :image image :image-position image-position}
             (dom/div nil
@@ -130,25 +125,11 @@

 (defcard card-square-visual-regressions
   (l/row {}
-    (for [color [:neutral :primary :accent]
-          size [:normal :expand :wide]
-          actions ["" (e/ui-flat-button {:color :primary} "Action")]]
-      (l/col {:width 6 :key (str color size actions (rand-int 256))}
-        (e/ui-card {:type :square :title "Card Test" :color color :size size :actions actions}
-          (dom/div nil
-            (dom/p nil (str "Color: " (name color)))
-            (dom/p nil (str "Size: " (name size)))
-            (dom/p nil (str "Actions: " (object? actions)))))))
-
-
-    (l/row {}
-      (for [image          ["" "img/bubbles.png" "img/welcome_card.jpg"]
-            image-position [:none :top-left :top-right :bottom-left :bottom-right]]
-        (l/col {:width 6 :key (str image image-position (rand-int 256))}
-          (e/ui-card {:type :square :title "Card Test" :color :primary :image image :image-position image-position}
-            (dom/div nil
-              (dom/p nil (str "Image: " image))
-              (dom/p nil (str "Image position: " (name image-position))))))))))
+    (for [size [:normal :expand :wide]]
+      (l/col {:width 6 :key (str size (rand-int 256))}
+        (e/ui-card {:type :square :title "Card Test" :size size}
+          (dom/div nil
+            (dom/p nil (str "Size: " (name size)))))))))

 (defcard labels-visual-regressions
@@ -211,21 +192,11 @@

 (defcard notifications-visual-regressions
   (dom/div nil
-    (for [kind [:normal :informative :success :warning :error]]
+    (for [kind [:normal :informative :success :warning :error]
+          width [:normal :wide]]
       (dom/div nil
-        (e/ui-notification
-         {:kind kind :key kind}
+        (e/ui-notification {:kind kind :key (str kind width) :width width}
          ;; TODO Warning key prop needed on NotificationTitle but simply setting one doesn't suppress the error.
-         (e/ui-notification-title {:key (str "nvr-title-" kind)} (str (str/capitalize (name kind))))
+         (e/ui-notification-title {:key (str "nvr-title-" kind width)} (str (when (= width :wide) (str/capitalize (name width))) " " (str/capitalize (name kind))))
          (e/ui-notification-body {} "Your message here..."))
         (dom/p nil " ")))))
-
-(defcard notifications-wide-visual-regressions
-  (dom/div nil
-    (for [kind [:normal :informative :success :warning :error]]
-      (dom/div nil
-        (e/ui-notification
-         {:kind kind :key (str kind "-wide") :width :wide}
-         (e/ui-notification-title {:key (str "nvr-wide-title-" kind)} (str (str/capitalize (name kind))))
-         (e/ui-notification-body {} "Your message here..."))
-        (dom/p nil " ")))))


Fix tests

Fix tests

--- test/day8/re_frame/trace/metamorphic_test.clj
+++ test/day8/re_frame/trace/metamorphic_test.clj
@@ -9,8 +9,8 @@
        (sort-by :id)))

 (deftest parse-app-trace1-test
-  (let [rt      (m/parse-traces (trace-events "app-trace1.edn"))
-        matches (:matches rt)
+  (let [rt      (m/parse-traces m/initial-parse-state (trace-events "app-trace1.edn"))
+        matches (:partitions rt)
         [m1 m2 m3 m4 m5 m6] matches]
     (is (= (count matches) 6))


(PDB-3043) Fix admin-cleanup-test race condition

Travis seems to be particularly good at exposing this test race
condition. The symptom is a noisy but passing
`puppetlabs.puppetdb.admin-clean-test/admin-clean-competition`. The test
finishes, but the database connection pool is shutdown before
the cleanup finishes. This then causes the next test
`puppetlabs.puppetdb.admin-clean-test/admin-clean-status` to fail.

--- test/puppetlabs/puppetdb/admin_clean_test.clj
+++ test/puppetlabs/puppetdb/admin_clean_test.clj
@@ -66,17 +66,22 @@
     (let [pdb (get-service *server* :PuppetDBServer)
           orig-clean cli-svc/clean-up
           in-clean (CyclicBarrier. 2)
-          test-finished (CyclicBarrier. 2)]
+          test-finished (CyclicBarrier. 2)
+          cleanup-result (promise)]
       (with-redefs [cli-svc/clean-up (fn [& args]
                                        (.await in-clean)
                                        (.await test-finished)
-                                       (apply orig-clean args))]
+                                       (let [result (apply orig-clean args)]
+                                            (deliver cleanup-result result)
+                                            result))]
         (utils/noisy-future (checked-admin-post "cmd" (clean-cmd [])))
         (try
           (.await in-clean)
           (is (= http/status-conflict (:status (post-clean []))))
           (finally
-            (.await test-finished)))))))
+            (.await test-finished)
+            (is (not= ::timed-out
+                      (deref cleanup-result 10000 ::timed-out)))))))))

 (defn- clean-status []
   (gauges/value (:cleaning cli-svc/admin-metrics)))


More debug-- following #44

More debug-- following #44

--- lib/shin/cljs/cljs/core.cljs
+++ lib/shin/cljs/cljs/core.cljs
@@ -203,7 +203,6 @@
          (recur (inc i) (f (-nth i cicoll)))
          v)))))

-;; TODO: IReduce
 (defn reduce
   ([f coll]
    (let [[x & xs] coll] (reduce f x xs)))
@@ -477,7 +476,7 @@
                       s)))]
        (step pred coll))))

-;; TODO: implement.
+;; TODO: IndexedSeq, cf. #73
 (defn seq
   "Returns a seq on the collection. If the collection is
   empty, returns nil.  (seq nil) returns nil. seq also works on
@@ -747,9 +746,8 @@
   (-peek [coll])
   (-pop [coll]))

-;; TODO: multiple dispatch for protocols
 (defprotocol IReduce
-  (-reduce [coll f start]))
+  (-reduce [coll f] [coll f start]))

 (defprotocol IPrintable
   (-pr-str [o]))
@@ -762,12 +760,8 @@
 (defprotocol IDeref
   (-deref  [o]))

-; TODO: multiple dispatch for protocols
-; (defprotocol ISwap
-;     (-swap!  [o f]  [o f a]  [o f a b]  [o f a b xs]))
-
 (defprotocol ISwap
-  (-swap!  [o f & xs]))
+  (-swap!  [o f]  [o f a]  [o f a b]  [o f a b xs]))

 (defprotocol IEquiv
   (-equiv [x other]))
@@ -1382,7 +1376,6 @@
   ;; TODO: IKVReduce, etc.

   IFn
-  ;; TODO: multiple arity protocols
   (-invoke [coll k]
     (-nth coll k))

@@ -1473,7 +1466,6 @@
     (PersistentArrayMap. (hamt/remove k h)))

   IFn
-  ; TODO multiple arity protocols
   (-invoke [coll k]
     (-lookup coll k))


Renaming build-time-viz url anchor to build-timing.

--- src-cljs/frontend/components/build_head.cljs
+++ src-cljs/frontend/components/build_head.cljs
@@ -872,8 +872,8 @@
                     [:span {:class "fail-count"} fail-count]))]])

             (when (and admin? (build-model/finished? build))
-              [:li {:class (when (= :build-time-viz selected-tab) "active")}
-               [tab-link {:href "#build-time-viz"} "Build Timing"]])
+              [:li {:class (when (= :build-timing selected-tab) "active")}
+               [tab-link {:href "#build-timing"} "Build Timing"]])

             ;; artifacts don't get uploaded until the end of the build (TODO: stream artifacts!)
             (when (and logged-in? (build-model/finished? build))
@@ -886,7 +886,7 @@

              :tests (om/build build-tests-list build-data)

-             :build-time-viz (om/build build-time-visualization build)
+             :build-timing (om/build build-time-visualization build)

              :artifacts (om/build build-artifacts-list
                                   {:artifacts-data (get build-data :artifacts-data) :user user
@@ -1263,8 +1263,8 @@
              [tab-link-v2 {:href "#config"} "circle.yml"]]

             (when (and admin? (build-model/finished? build))
-              [tab-tag {:class (when (= :build-time-viz selected-tab) "active")}
-               [tab-link-v2 {:href "#build-time-viz"}
+              [tab-tag {:class (when (= :build-timing selected-tab) "active")}
+               [tab-link-v2 {:href "#build-timing"}
                 "Build Timing"]])

             (when (seq build-params)
@@ -1276,7 +1276,7 @@

              :tests (om/build build-tests-list-v2 build-data)

-             :build-time-viz (om/build build-timings/build-timings build)
+             :build-timing (om/build build-timings/build-timings build)

              :artifacts (om/build build-artifacts-list-v2
                                   {:artifacts-data (get build-data :artifacts-data) :user user


cleanup

cleanup

--- Clojure-Websockets/MainApp/src/cljs/birdwatch/communicator.cljs
+++ Clojure-Websockets/MainApp/src/cljs/birdwatch/communicator.cljs
@@ -39,7 +39,7 @@
   "Start communicator by wiring channels."
   [cmd-chan data-chan stats-chan qry-chan]
   (let [ws (sente/make-channel-socket! "/chsk" {:packer packer :type :auto})
-        {:keys [chsk ch-recv send-fn state]} ws
+        {:keys [ch-recv send-fn state]} ws
         handler (make-handler cmd-chan data-chan stats-chan)
         chsk-router (sente/start-chsk-router! ch-recv handler)]
     (query-loop qry-chan send-fn state)))


Tweak blackrain metadata.

Tweak blackrain metadata.

--- src/overtone/sc/machinery/ugen/metadata/extras/blackrain.clj
+++ src/overtone/sc/machinery/ugen/metadata/extras/blackrain.clj
@@ -98,8 +98,6 @@
             :default 0.0
             :doc "Notch filter output level 0.0 - 1.0"}]
     :rates #{:ar :kr}
-    :doc "Total, 100% Plastic..."
-   }
+    :doc "Total, 100% Plastic..."}

-
 ])


CMR-688: Began support for personell with ECHO10.

--- umm-lib/src/cmr/umm/echo10/collection/personnel.clj
+++ umm-lib/src/cmr/umm/echo10/collection/personnel.clj
@@ -44,6 +44,21 @@
                      :state-province state-province
                      :street-address-lines street-address-lines})))

+(defn- xml-elem->personnel
+  "Return a list of ContactPersons for the parsed xml structure."
+  [collection-element]
+  (for [contact-element (cx/elements-at-path contact-element [:Contacts])]
+        (let [role (cx/string-at-path contact-element [:Role])
+        first-name (cx/string-at-path contact-element [:ContactPersons :ContactPerson :FirstName])
+        last-name (cx/string-at-path contact-element [:ContactPersons :ContactPerson :LastName])
+        middle-name (cx/string-at-path contact-element [:ContactPersons :ContactPerson :MiddleName])
+        addresses (xml-elem->addresses contact-element)
+        emails (xml-elem->emails contact-element)
+        phones (xml-elem->phones contact-element)]
+          (c/map->ContactPerson {
+
+
+

  roles

@@ -66,9 +81,9 @@
    phones

-(defn xml-elem->personnel
+(defn xml-elem->personnels
   [collection-element]
-  (let [contacts (cx/element-at-path collection-element [:Contacts])
+  (let [pe (cx/element-at-path collection-element [:Personnel])
         roles (cx/strings-at-path pe [:Role])
         first-name (cx/string-at-path pe [:First_Name])
         middle-name (cx/string-at-path pe [:Middle_Name])