:tada: Add helper for blocking executuion on vertx.

--- backend/vendor/vertx/src/vertx/core.clj
+++ backend/vendor/vertx/src/vertx/core.clj
@@ -5,16 +5,17 @@
 ;; Copyright (c) 2019 Andrey Antukh <niwi@niwi.nz>

 (ns vertx.core
-  (:require [clojure.spec.alpha :as s]
-            [promesa.core :as p]
-            [vertx.eventbus :as vxe]
-            [vertx.util :as vu])
+  (:require
+   [clojure.spec.alpha :as s]
+   [promesa.core :as p]
+   [vertx.eventbus :as vxe]
+   [vertx.util :as vu])
   (:import
+   io.vertx.core.AsyncResult
    io.vertx.core.Context
    io.vertx.core.DeploymentOptions
-   io.vertx.core.Future
+   io.vertx.core.Handler
    io.vertx.core.Promise
-   io.vertx.core.Handler
    io.vertx.core.Verticle
    io.vertx.core.Vertx
    io.vertx.core.VertxOptions
@@ -51,6 +52,27 @@
 (defn current-context
   []
   (Vertx/currentContext))
+
+(defn wrap-blocking
+  ([f] (wrap-blocking (current-context) f))
+  ([ctx f]
+   (let [^Vertx vsm (vu/resolve-system ctx)]
+     (fn [& args]
+       (let [d (p/deferred)]
+         (.executeBlocking
+          vsm
+          (reify Handler
+            (handle [_ prm]
+              (try
+                (.resolve ^Promise prm (apply f args))
+                (catch Throwable e
+                  (.fail ^Promise prm e)))))
+          false
+          (reify Handler
+            (handle [_ ar]
+              (if (.failed ^AsyncResult ar)
+                (p/reject! d (.cause ^AsyncResult ar))
+                (p/resolve! d (.result ^AsyncResult ar)))))))))))

 (defn handle-on-context
   "Attaches the context (current if not explicitly provided) to the


Function to chordify a piece

Function to chordify a piece

--- src/tenor/constructs.clj
+++ src/tenor/constructs.clj
@@ -158,6 +158,11 @@
                           (generate-intervals scale (count piece)) scale)]
   (map-entity piece scale-intervals)))

+;; --- Chords --- ;;
+
+(defn chordify [entity-map]
+  (filter (fn [x] (weighted-coin 0.2)) entity-map))
+
 ;; --- Playback --- ;;

 (defmacro construct-note [time player entity]


CMR-1420: Fixed a failing test.

CMR-1420: Fixed a failing test.

--- system-int-test/test/cmr/system_int_test/admin/cache_api_test.clj
+++ system-int-test/test/cmr/system_int_test/admin/cache_api_test.clj
@@ -74,7 +74,7 @@
            (url/indexer-read-caches-url) ["acls" "general" "token-imp"]
            (url/index-set-read-caches-url) ["token-imp"]
            (url/mdb-read-caches-url) ["token-imp"]
-           (url/ingest-read-caches-url) ["token-imp" "providers" "acls"]
+           (url/ingest-read-caches-url) ["token-imp" "providers" "acls" "token-user-ids"]
            (url/search-read-caches-url) ["acls"
                                          "collections-for-gran-acls"
                                          "has-granules-map"


Fixes metadata dates test to be more readable, using date-time-parser instead

--- umm-spec-lib/test/cmr/umm_spec/test/umm_to_xml_mappings/dif10.clj
+++ umm-spec-lib/test/cmr/umm_spec/test/umm_to_xml_mappings/dif10.clj
@@ -5,7 +5,7 @@
     [cmr.umm-spec.umm-to-xml-mappings.dif10 :as dif10]
     [cmr.common.xml.parse :refer :all]
     [cmr.common.xml.simple-xpath :refer [select]]
-    [cmr.umm-spec.umm-json :as umm-json]))
+    [cmr.common.date-time-parser :as dtp]))

 (deftest dif10-direct-distribution-information-test
   "Testing the dif10 direct distribution information translation from umm-c to dif10."
@@ -31,18 +31,22 @@

 (deftest dif10-metadata-dates-test
   "Testing the dif10 metadata dates translation from umm-c to dif10"
-  (let [json-input1 "{\"MetadataDates\":
-                     [{\"Date\":\"2021-01-01T00:00:00.000Z\",\"Type\":\"CREATE\"},
-                     {\"Date\":\"2021-03-01T00:00:00.000Z\",\"Type\":\"UPDATE\"},
-                     {\"Date\":\"2024-01-01T00:00:00.000Z\",\"Type\":\"DELETE\"},
-                     {\"Date\":\"2022-01-01T00:00:00.000Z\",\"Type\":\"REVIEW\"}]}"
-        result1 (dif10/umm-c-to-dif10-xml (umm-json/json->umm {} :collection json-input1))
+  (let [result1 (dif10/umm-c-to-dif10-xml
+                 {:MetadataDates [{:Date (dtp/parse-datetime "2021-01-01T00:00:00.000Z")
+                                   :Type "CREATE"}
+                                  {:Date (dtp/parse-datetime "2021-03-01T00:00:00.000Z")
+                                   :Type "UPDATE"}
+                                  {:Date (dtp/parse-datetime "2024-01-01T00:00:00.000Z")
+                                   :Type "DELETE"}
+                                  {:Date (dtp/parse-datetime "2022-01-01T00:00:00.000Z")
+                                   :Type "REVIEW"}]})
         result1-dates (first (select result1 "/DIF/Metadata_Dates"))

-        json-input2 "{\"MetadataDates\":
-                     [{\"Date\" : \"1992-01-01T00:00:00.000Z\",\"Type\" : \"CREATE\"},
-                     {\"Date\" : \"2016-08-03T00:00:00.000Z\",\"Type\" : \"UPDATE\"}]}"
-        result2 (dif10/umm-c-to-dif10-xml (umm-json/json->umm {} :collection json-input2))
+        result2 (dif10/umm-c-to-dif10-xml
+                 {:MetadataDates [{:Date (dtp/parse-datetime "1992-01-01T00:00:00.000Z")
+                                   :Type "CREATE"}
+                                  {:Date (dtp/parse-datetime "2016-08-03T00:00:00.000Z")
+                                   :Type "UPDATE"}]})
         result2-dates (first (select result2 "/DIF/Metadata_Dates"))

         result3 (dif10/umm-c-to-dif10-xml nil)


Add `:icon-raw` to geom impls.

Add `:icon-raw` to geom impls.

--- src/uxbox/main/geom.cljs
+++ src/uxbox/main/geom.cljs
@@ -38,10 +38,10 @@
   [shape dpoint]
   (case (:type shape)
     :icon (move-rect shape dpoint)
+    :icon-raw (move-rect shape dpoint)
     :rect (move-rect shape dpoint)
     :text (move-rect shape dpoint)
     :path (move-path shape dpoint)
-    ;; :path (move-rect shape dpoint)
     :circle (move-circle shape dpoint)
     :group (move-group shape dpoint)))

@@ -141,6 +141,7 @@
     :text (size-rect shape)
     :rect (size-rect shape)
     :icon (size-rect shape)
+    :icon-raw (size-rect shape)
     :image (size-rect shape)
     :path (size-rect shape)))

@@ -201,6 +202,7 @@
     :rect (move-rect-vertex shape vid dpoint)
     :text (move-rect-vertex shape vid dpoint)
     :icon (move-rect-vertex shape vid dpoint)
+    :icon-raw (move-rect-vertex shape vid dpoint)
     :path (move-rect-vertex shape vid dpoint)
     :circle (move-circle-vertex shape vid dpoint)))

@@ -281,11 +283,14 @@

 (declare setup-proportions-rect)

+;; FIXME: improve proportions setup for icons.
+
 (defn setup-proportions
   [shape]
   (case (:type shape)
     :rect (setup-proportions-rect shape)
     :icon (setup-proportions-rect shape)
+    :icon-raw (setup-proportions-rect shape)
     :circle (setup-proportions-rect shape)
     shape))

@@ -354,6 +359,7 @@
   (case (:type shape)
     :rect (resize-rect shape point)
     :icon (resize-rect shape point)
+    :icon-raw (resize-rect shape point)
     :text (resize-rect shape point)
     :path (resize-rect shape point)
     :circle (resize-circle shape point)))
@@ -423,6 +429,7 @@
   (case (:type shape)
     :rect (setup-rect shape props)
     :icon (setup-rect shape props)
+    :icon-raw (setup-rect shape props)
     :text (setup-rect shape props)
     :circle (setup-circle shape props)
     :group (setup-group shape props)))
@@ -530,6 +537,7 @@
                  :rect (generic-outer-rect state shape)
                  :text (generic-outer-rect state shape)
                  :icon (generic-outer-rect state shape)
+                 :icon-raw (generic-outer-rect state shape)
                  ;; :path (generic-outer-rect state shape)
                  :path (path-outer-rect state shape)
                  :circle (circle-outer-rect state shape)
@@ -679,6 +687,7 @@
      :text (text-transformation-matrix state shape)
      :circle (circle-transformation-matrix state shape)
      :icon (icon-transformation-matrix state shape)
+     :icon-raw (icon-transformation-matrix state shape)
      :image (icon-transformation-matrix state shape)
      :path (path-transformation-matrix state shape)
      :group (group-transformation-matrix state shape))))


Improve shape rendering function signature.

--- src/uxbox/ui/shapes.cljs
+++ src/uxbox/ui/shapes.cljs
@@ -2,6 +2,7 @@
   "A ui related implementation for uxbox.shapes ns."
   (:require [sablono.core :refer-macros [html]]
             [cuerdas.core :as str]
+            [rum.core :as rum]
             [uxbox.state :as st]
             [uxbox.shapes :as shapes]
             [uxbox.util.svg :as svg]
@@ -28,21 +29,19 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 (defmethod shapes/-render :builtin/icon
-  [{:keys [data id] :as shape} attrs]
-  (let [key (str "use-" id)
-        transform (-> (merge shape attrs)
-                      (svg/calculate-transform))
-        attrs (merge {:id key :key key :transform transform}
+  [{:keys [data id] :as shape} _]
+  (let [key (str id)
+        rfm (svg/calculate-transform shape)
+        attrs (merge {:id key :key key :transform rfm}
                      (extract-attrs shape)
                      (make-debug-attrs shape))]
     (html
      [:g attrs data])))

 (defmethod shapes/-render :builtin/group
-  [{:keys [items id] :as shape} attrs]
+  [{:keys [items id] :as shape} factory]
   (let [key (str "group-" id)
-        tfm (-> (merge shape attrs)
-                (svg/calculate-transform))
+        tfm (svg/calculate-transform shape)
         attrs (merge {:id key :key key :transform tfm}
                      (make-debug-attrs shape))
         shapes-by-id (get @st/state :shapes-by-id)]
@@ -51,7 +50,8 @@
       (for [item (->> items
                       (map #(get shapes-by-id %))
                       (remove :hidden))]
-        (shapes/-render item nil))])))
+        (-> (factory item)
+            (rum/with-key (str (:id item)))))])))

 (defmethod shapes/-render-svg :builtin/icon
   [{:keys [data id view-box] :as shape} attrs]


fix compile

fix compile

--- main/src/dda/pallet/dda_serverspec_crate/app.clj
+++ main/src/dda/pallet/dda_serverspec_crate/app.clj
@@ -19,7 +19,6 @@
    [schema.core :as s]
    [dda.cm.group :as group]
    [dda.pallet.core.app :as core-app]
-   [dda.pallet.core.dda-crate :as dda-crate]
    [dda.pallet.dda-config-crate.infra :as config-crate]
    [dda.pallet.dda-serverspec-crate.infra :as infra]
    [dda.pallet.dda-serverspec-crate.domain :as domain]


fix for Timer mean (not rate)

fix for Timer mean (not rate)

--- metrics-clojure-core/src/metrics/timers.clj
+++ metrics-clojure-core/src/metrics/timers.clj
@@ -57,7 +57,7 @@

 (defn mean
   [^Timer t]
-  (.getMeanRate t))
+  (.getMean (snapshot t)))

 (defn std-dev
   [^Timer t]


configurable sizes for forms and sections, fixes #68

--- priv/ui/src/cljs/holiday_ping_ui/views.cljs
+++ priv/ui/src/cljs/holiday_ping_ui/views.cljs
@@ -34,12 +34,20 @@
   [:section.section
    (apply vector :div.container views)])

+(defn section-size
+  "Take the bulma class for size as the first parameter, i.e. :is-half"
+  [size & views]
+  [:section.section
+   [:div.container
+    [:div.columns.is-centered
+     (apply vector :div.column {:class (name size)} views)]]])
+
 ;;; AUTH VIEWS

 (defn login-view []
   [:div
    [header-section "Login" [:p "Please enter your credentials."]]
-   [section
+   [section-size :is-one-third
     [message-view]
     [forms/form-view {:submit-text "Login"
                       :on-submit   [:auth-submit]
@@ -57,7 +65,7 @@
   (let [user-country @(re-frame/subscribe [:country])]
     [:div
      [header-section "Register" [:p "Please fill your profile information."]]
-     [section
+     [section-size :is-half
       [message-view]
       [forms/form-view {:submit-text "Register"
                         :on-submit   [:register-submit]
@@ -148,7 +156,7 @@
     [:div
      [header-section "Channels"]
      [test-channel-modal]
-     [section
+     [section-size :is-two-thirds
       [message-view]
       (if (empty? channels)
         [:p "There are no channels yet."]
@@ -159,7 +167,7 @@
 (defn channel-add-view []
   [:div
    [header-section "Create Channel" [:p "Fill the channel configuration"]]
-   [section
+   [section-size :is-half
     [message-view]
     [forms/form-view {:submit-text "Save"
                       :on-submit   [:channel-submit]
@@ -195,7 +203,7 @@
   [channel]
   [:div
    [header-section "Edit Channel" [:p "Fill the channel configuration"]]
-   [section
+   [section-size :is-half
     [message-view]
     [forms/form-view {:submit-text "Save"
                       :on-submit   [:channel-submit]


CMR-669: Refactored in response to pull request comments.

--- test/cmr/system_int_test/search/paging_search_test.clj
+++ test/cmr/system_int_test/search/paging_search_test.clj
@@ -6,7 +6,7 @@
             [cmr.system-int-test.utils.index-util :as index]
             [cmr.system-int-test.data2.collection :as dc]
             [cmr.system-int-test.data2.core :as d2c]
-            [cmr.common.config :as cfg]))
+            [cmr.search.services.parameters.parameter-validation :as pm]))

 (def prov1-collection-count 10)
 (def prov2-collection-count 15)
@@ -27,7 +27,7 @@
 (deftest search-with-page-size-and-page-num
   (create-collections)
   (testing "Exceeded page depth (page-num * page-size)"
-    (let [limit (cfg/config-value :paging-depth-limit 1000000)
+    (let [limit pm/search-paging-depth-limit
           page-size 10
           page-num (int (+ (/ limit page-size) 1))]
       (let [resp (search/find-refs :collection


cosets.clj: compress table wjenever more than half the rows are invalid

--- clojure/org/gavrog/clojure/cosets.clj
+++ clojure/org/gavrog/clojure/cosets.clj
@@ -69,7 +69,7 @@
     (into {} (for [[i row] table :when (reps i)]
                [(canon i) (into {} (map (fn [[j v]] [j (canon v)]) row))]))))

-(defn- maybe-compressed [table equiv factor]
+(defn- maybe-compressed [[table equiv] factor]
   (let [nr-invalid (- (reduce + (map count equiv)) (count equiv))]
     (if (> nr-invalid (* factor (count table)))
       (compressed-table [table equiv])
@@ -101,5 +101,7 @@
                   g* (- g)
                   n (count table)
                   table (-> table (assoc-in [i g] n) (assoc-in [n g*] i))
-                  [table equiv] (scan-relations rels subgens table equiv n)]
+                  [table equiv] (maybe-compressed
+                                  (scan-relations rels subgens table equiv n)
+                                  1/2)]
               (recur table equiv i (inc j)))))))


CMR-1997: Addressed review comments

CMR-1997: Addressed review comments

--- virtual-product-app/test/cmr/virtual_product/test/config.clj
+++ virtual-product-app/test/cmr/virtual_product/test/config.clj
@@ -3,15 +3,14 @@
             [cmr.virtual-product.config :as vp-config]))

 (deftest omuvbd-update-online-access-url-test
-  (are [src-granule-ur online-access-urls expected-translation]
-       (let [url1 "http://acdisc.gsfc.nasa.gov/opendap/HDF-EOS5//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5.nc"
-             url2 "http://s4psci.gesdisc.eosdis.nasa.gov/data/s4pa_TS2//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5.nc"
-             url3 "http://s4psci.gesdisc.eosdis.nasa.gov/data/s4pa//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5.nc"
-             url4 "http://acdisc.gsfc.nasa.gov/opendap/HDF-EOS5//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093003.he5.nc"
-             url-objects (map #(identity {:type "GET DATA" :url %}) online-access-urls)]
-         (is (= expected-translation
-            (map :url (#'vp-config/update-online-access-url url-objects src-granule-ur)))))
-
-       "OMUVBd.003:OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5"
-       [url1 url2 url3]
-       [(str url1 "?ErythemalDailyDose,ErythemalDoseRate,UVindex,lon,lat") url2 url3 url4]))+  (let [src-granule-ur "OMUVBd.003:OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5"
+        url1 "http://acdisc.gsfc.nasa.gov/opendap/HDF-EOS5//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5.nc"
+        url2 "http://s4psci.gesdisc.eosdis.nasa.gov/data/s4pa_TS2//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5.nc"
+        url3 "http://s4psci.gesdisc.eosdis.nasa.gov/data/s4pa//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093001.he5.nc"
+        url4 "http://acdisc.gsfc.nasa.gov/opendap/HDF-EOS5//Aura_OMI_Level3/OMUVBd.003/2015/OMI-Aura_L3-OMUVBd_2015m0101_v003-2015m0105t093003.he5.nc"
+        online-access-urls [url1 url2 url3 url4]
+        url-objects (map #(hash-map :type "GET DATA" :url %) online-access-urls)
+        expected-translation [(str url1 "?ErythemalDailyDose,ErythemalDoseRate,UVindex,lon,lat")
+                              url2 url3 url4]]
+    (is (= expected-translation
+           (map :url (#'vp-config/update-online-access-url url-objects src-granule-ur))))))


Improve ugen docstrings

Improve ugen docstrings

--- src/overtone/sc/machinery/ugen/metadata/buf_io.clj
+++ src/overtone/sc/machinery/ugen/metadata/buf_io.clj
@@ -42,7 +42,11 @@
                :doc "1 means true, 0 means false. This is modulateable."}

               {:name "action"
-               :default 0}]
+               :default 0
+               :doc "an integer representing an action to be executed
+                     when the buffer is finished playing. This can be
+                     used to free the enclosing synth. Action is only
+                     evaluated if loop is 0"}]
        :doc "Plays back a sample resident in a buffer"}

@@ -110,12 +114,12 @@
                :default 1
                :mode :num-outs
                :doc "The number of channels of the supplied buffer. This
-                     must be a fixed integer. The architecture of the
-                     SynthDef cannot change after it is
-                     compiled. (Warning: if you supply a bufnum of a
-                     buffer that has a different numChannels than you
-                     have specified to the BufRd, it will fail
-                     silently)." }
+                     must be a fixed integer and not a signal or a
+                     control proxy. The architecture of the synth design
+                     cannot change after it is compiled. (Warning: if
+                     you supply a bufnum of a buffer that has a
+                     different number of channels than you have
+                     specified to buf-rd , it will fail silently)." }

               {:name "bufnum"
                :default 0


just use Guava to get stacktrace as string

--- src/clj/cljs/repl.clj
+++ src/clj/cljs/repl.clj
@@ -28,7 +28,8 @@
            [java.net URL]
            [javax.xml.bind DatatypeConverter]
            [clojure.lang IExceptionInfo]
-           [java.util.regex Pattern]))
+           [java.util.regex Pattern]
+           [com.google.common.base Throwables]))

 (def ^:dynamic *cljs-verbose* false)
 (def ^:dynamic *repl-opts* nil)
@@ -365,7 +366,7 @@
                    (catch Throwable e
                      (when (:repl-verbose opts)
                        (print "Failed to canonicalize stacktrace")
-                       (print (with-out-str (.printStacktrace e *out*)))
+                       (print (Throwables/getStackTraceAsString e))
                        (flush))))]
          (if (vector? cst)
            (if (satisfies? IPrintStacktrace repl-env)


whitespace fix

whitespace fix

--- src/clj_http/util.clj
+++ src/clj_http/util.clj
@@ -37,11 +37,11 @@
   "Returns a gunzip'd version of the given byte array."
   [b]
   (when b
-    (cond
-      (instance? java.io.InputStream b)
-        (GZIPInputStream. b)
-      :else
-        (IOUtils/toByteArray (GZIPInputStream. (ByteArrayInputStream. b))))))
+    (cond
+     (instance? java.io.InputStream b)
+     (GZIPInputStream. b)
+     :else
+     (IOUtils/toByteArray (GZIPInputStream. (ByteArrayInputStream. b))))))

 (defn gzip
   "Returns a gzip'd version of the given byte array."


Adapt engine/next-column-index to keywordized column

--- backend/src/akvo/lumen/transformation/engine.clj
+++ backend/src/akvo/lumen/transformation/engine.clj
@@ -97,7 +97,7 @@

 (defn next-column-index [columns]
   (let [nums (->> columns
-                  (map #(get % "columnName"))
+                  (map #(or (get % "columnName") (:columnName %)))
                   (filter #(re-find #"^d\d+$" %))
                   (map #(subs % 1))
                   (map #(Long/parseLong %)))]


Add http method matching, and initial setup for url templates

--- src/googlica/core.clj
+++ src/googlica/core.clj
@@ -27,6 +27,8 @@

 (def storage-object-get (-> storage-model :resources :objects :methods :get))

+(def base-url (-> storage-model :baseUrl))
+
 (defn split-required-params
   "Returns a vector of two maps: first with the required params, second with the optional"
   [method]
@@ -51,13 +53,18 @@
                                  (mapv (comp (partial mapv ->kebab-case-symbol) keys)))]
     `[~@required {:keys ~optional}]))

+;; > (replace-path-vars "b/{bucket}/o/{object}")
+;; => (str "b/" bucket "/o/" object)
+(defn replace-path-vars [path-template]
+  path-template)
+
 (defn generate-request [method]
-  {:method "get"
-   :url "whatever"})
+  {:method (-> method :httpMethod s/lower-case keyword)
+   :url (str base-url (replace-path-vars (:path method)))})

 (defn generate-function-from-method
-  [method]
+  [base-url method]
   `(defn ~(generate-function-name method)
      ~(generate-docs method)
      ~(generate-args method)
-     (http/request ~(generate-request method))))
+     (http/request ~(generate-request base-url method))))


add prefix to signature

add prefix to signature

--- src/shuppet/sqs.clj
+++ src/shuppet/sqs.clj
@@ -9,9 +9,9 @@

 (defn- send-message
   [queue-url message]
-  (let [request (get-signed-request {:url queue-url
-                                     :params {:Action "SendMessage"
-                                              :MessageBody message}})]
+  (let [request (get-signed-request "sqs" {:url queue-url
+                                           :params {:Action "SendMessage"
+                                                    :MessageBody message}})]
     (client/get (request :url)
                 {:headers (request :headers)})))


Start without IP

Start without IP

--- src/servisne_info/webapp.clj
+++ src/servisne_info/webapp.clj
@@ -14,8 +14,7 @@
     (reset! server nil)))

 (defn -main [& [port]]
-  (let [port (Integer. (or port (env :port) 5000))
-        ip (get (System/getenv) "OPENSHIFT_CLOJURE_HTTP_IP" "0.0.0.0")]
-    (reset! server (run-server handler/app {:ip ip :port port}))
+  (let [port (Integer. (or port (env :port) 5000))]
+    (reset! server (run-server handler/app {:port port}))
     (.addShutdownHook (Runtime/getRuntime) (Thread. stop-server))
     (handler/init)))


Added code, em, strong, dfn, datalist, details tags

--- src/shared/hyjinks/core.cljc
+++ src/shared/hyjinks/core.cljc
@@ -269,7 +269,7 @@

 (deftags h1 h2 h3 h4 h5 h6 (hr void-element) (br void-element))
 (deftags ul ol li dl dt dd)
-(deftags b i u s del ins small sup sub)
+(deftags b i u s del ins small sup sub code dfn em strong)
 (deftags pre q blockquote cite mark)
 (deftags a (img void-element))
 (deftags (embed void-element) (object void-element) (param void-element))
@@ -278,7 +278,7 @@
 (deftags table thead tbody tfoot th tr td caption colgroup (col void-element))
 (deftags address article header footer main section aside nav)
 (deftags figure figcaption legend)
-(deftags form select option optgroup fieldset label input button progress)
+(deftags form select option optgroup fieldset label input button progress datalist details)
 (deftags html title link style base head body noscript)

 ;; Specialized "tags"
@@ -357,6 +357,10 @@
   "Overrides text direction to be left-to-right."
   (tag "bdo" {:dir "ltr"}))

+(def bdi
+  "Isolates contained text from surrounding text direction settings."
+  (tag "bdi"))
+
 (defn hyperlink
   "Easier function for building a hyperlink.
    ex: (hyperlink \"http://www.google.com\" \"The Google\")"


don't need HashMap

don't need HashMap

--- dada-core/src/main/clojure/org/dada/core/SimpleModelView.clj
+++ dada-core/src/main/clojure/org/dada/core/SimpleModelView.clj
@@ -4,7 +4,7 @@
    [org.dada.core counted-set utils map]
    )
   (:import
-   [java.util Collection HashMap]
+   [java.util Collection]
    [org.dada.core Data Metadata RemoteModel Update View]
    )
   (:gen-class


improve generate spec slightly for (deftest a-casa-generate)

--- test/babel/test/it.cljc
+++ test/babel/test/it.cljc
@@ -356,7 +356,7 @@

 (deftest a-casa-generate
   (let [result (generate
-                {:comp {:synsem {:reflexive false}}
+                {:comp {:synsem {:pronoun false}}
                  ;; TODO: the above is needed to prevent "a" + reflexive pronoun:
                  ;; eliminate this need.
                  :synsem {:cat :prep


add more possible english translations

add more possible english translations

--- test/babel/test/la.cljc
+++ test/babel/test/la.cljc
@@ -82,13 +82,13 @@
                 target-generate-fn
                 target-format-fn)]
     (is (or (= source "he used to answer")
-            (= source "he was answering")))))
-
-;    (is (or (= target "foobar")))))
+            (= source "he was answering")
+            (= source "he used to respond")
+            (= source "he was responding")))
+    (is (or (= target "respondebat")))))

-


Promote attempts to use Swagger w/o the necessary dependencies up to a failure

--- src/io/aviso/rook.clj
+++ src/io/aviso/rook.clj
@@ -68,7 +68,8 @@
      (require 'io.aviso.rook.swagger)
      ~@body
      (catch ClassNotFoundException e#
-       (l/warn ":swagger was specified as an option but is not available - check dependencies to ensure ring-swagger is included"))))
+       (throw (ex-info ":swagger was specified as an option but is not available - check dependencies to ensure ring-swagger is included."
+                       {})))))

 (defn namespace-handler
   "Examines the given namespaces and produces either a Ring handler or


fix merge

fix merge

--- jar-placement-lib/build.boot
+++ jar-placement-lib/build.boot
@@ -1,5 +1,5 @@
 (def +version+ "3.19-SNAPSHOT")
-
+
 (set-env!
   :project 'com.sixsq.slipstream/SlipStreamPlacementLib-jar
   :version +version+


(SERVER-4) Remove unused import

(SERVER-4) Remove unused import

Remove unused FileInputStream import.

--- src/clj/puppetlabs/services/master/master_core.clj
+++ src/clj/puppetlabs/services/master/master_core.clj
@@ -1,5 +1,4 @@
 (ns puppetlabs.services.master.master-core
-  (:import (java.io FileInputStream))
   (:require [compojure.core :as compojure]
             [compojure.route :as route]
             [me.raynes.fs :as fs]


Separate overloads

Separate overloads

--- src/layzee/paging.clj
+++ src/layzee/paging.clj
@@ -9,8 +9,10 @@
    :fn-stop     -- how we tell we're finished
    :result      -- collects the results
    :args        -- [optional] arguments for :fn-producer. Defaults to nil (, and :fn-producer is invoked with zero arity)."
+
   ([fn-producer fn-stop result]
      (page fn-producer default-fn-args fn-stop result nil))
+
   ([fn-producer fn-args fn-stop result args]
      (if (apply fn-stop [result])
        result


improved mk-filter

improved mk-filter

--- src/ueberfoo/commandline.clj
+++ src/ueberfoo/commandline.clj
@@ -1,4 +1,4 @@
-;; created 2012-01-14 00:10
+;; created 2012-01-14
 ;; author Harald Beck

 (ns ueberfoo.commandline
@@ -7,7 +7,7 @@

 ;;; list transformation

-(defn make-list-post-processor [opt-map]
+(defn mk-list-post-processor [opt-map]
   {:pre [(contains? opt-map :nr-of-entries)]}
   (let [order-fn (if (:reverse opt-map) reverse identity)
         offset   (if-let [n (:offset opt-map)] n 0)
@@ -15,70 +15,95 @@
     (comp vec #(take limit (drop offset %)) order-fn)))

 (defn format-value [v]
-  (if (set? v)
-    (let [xs (for [x v] (if (keyword? x)
-                          (str "#" (name x) " ")
-                          (str x " ")))]
-      (.trim (apply str xs)))
-    v))
-
-(defn make-entry-formatter [opt-map]
+  (if (not (set? v))
+    v
+    (let [xs (for [x v]
+               (if (keyword? x)
+                 (str "#" (name x) " ")
+                 (str x " ")))]
+      (.trim (apply str xs)))))
+
+(defn- mk-kv-formatter [d]
+  (cond
+   (or
+    (nil? d)
+    (= "kv" d)) #(str (name (get % 0)) ": " (format-value (get % 1)))
+    (= "k" d)   #(str (name (get % 0)))
+    (= "v" d)   #(format-value (get % 1))))
+
+(defn- line [kv-formatter kv-pair]
+    (str (apply str (kv-formatter kv-pair) "\n")))
+
+(defn mk-entry-formatter [opt-map]
   (if (:clj opt-map)
     identity
-    (let [make-line (fn [kv-formatter kv-pair]
-                      (str (apply str (kv-formatter kv-pair) "\n"))),
-          d (:display opt-map),
-          kv-formatter
-          (cond
-           (or
-            (nil? d)
-            (= "kv" d)) #(str (name (get % 0)) ": " (format-value (get % 1)))
-            (= "k" d)   #(str (name (get % 0)))
-            (= "v" d)   #(format-value (get % 1)))]
+    (let [kv-formatter (mk-kv-formatter (:display opt-map))]
       (fn [entry]
-        (apply str (for [kv-pair entry] (make-line kv-formatter kv-pair)))))))
-
-(defn make-selector [opt-map]
+        (apply str (for [kv-pair entry] (line kv-formatter kv-pair)))))))
+
+(defn mk-selector [opt-map]
   (if (:all opt-map)
     identity
     #(select-keys % (reverse (:select opt-map)))))

-(defn make-filter [opt-map]
+
+;; helper fns for mk-filter
+
+(defn- mk-all-text-tokens? [f-txts]
+  (fn [entry]
+    (or (empty? f-txts)
+        (let [text (:text entry)]
+          (apply l-and (map (partial supstring-of? text) f-txts))))))
+
+(defn- mk-all-tags? [f-tags]
+  (fn [entry]
+    (or (empty? f-tags)
+        (let [tags (:tags entry)]
+          (apply l-and (map (partial contains? tags) f-tags))))))
+
+(defn- mk-key-matches-filtered? [k op filtered]
+  (fn [entry]
+    (or (empty? filtered)
+        (let [xs (k entry)]
+          (apply op (map (partial contains? xs) filtered))))))
+
+;; TODO
+
+(defn- mk-all-kvs? [f-kvs]
+  (fn [entry]
+    (or (empty? f-kvs)
+        (apply
+         l-and
+         (for [e f-kvs]
+           (let [kv      (first e)
+                 test-k  (get kv 0)
+                 test-v  (get kv 1)
+                 entry-v (test-k entry)]
+             (cond
+              ;; special case for "key=" (w/o value)
+              (= :any test-v) (not (nil? entry-v)), ;; then that suffices
+              (can-as-number? test-v) (and (can-as-number? entry-v)
+                                           (= (as-number test-v) (as-number entry-v))),
+              :else (substring-of? test-v entry-v))))))))
+
+;; filter
+
+(defn mk-filter [opt-map]
   (let [xs (:filter opt-map)]
     (if (empty? xs)
       identity
-      (let [f-txts (filter string? xs),
-            f-tags (filter keyword? xs),
-            f-kvs  (filter map? xs),
-            all-text-tokens
-            (fn [entry]
-              (or (empty? f-txts)
-                  (let [text (:text entry)]
-                    (apply l-and (map (partial supstring-of? text) f-txts))))),
-            all-tags
-            (fn [entry]
-              (or (empty? f-tags)
-                  (let [tags (:tags entry)]
-                    (apply l-and (map (partial contains? tags) f-tags))))),
-            all-kvs
-            (fn [entry]
-              (or (empty? f-kvs)
-                  (apply l-and
-                         (for [e f-kvs]
-                           (let [kv      (first e)
-                                 test-k  (get kv 0)
-                                 test-v  (get kv 1)
-                                 entry-v (test-k entry)]
-                             (cond
-                              ;; special case for "key=" (w/o value)
-                              (= :any test-v) (not (nil? entry-v)) ;; then that suffices
-                              (can-as-number? test-v) (and (can-as-number? entry-v)
-                                                           (= (as-number test-v) (as-number entry-v)))
-                              :else (substring-of? test-v entry-v)))))))]
-            (fn [entry] (and (all-text-tokens entry)
-                             (all-tags entry)
-                             (all-kvs entry)))))))
-
+      (fn [entry] (and ((mk-all-text-tokens? (filter string? xs)) entry)
+                       ((mk-all-tags? (filter keyword? xs)) entry)
+                       ((mk-all-kvs? (filter map? xs)) entry))))))
+
+      ;; (fn [entry]
+      ;;   (reduce
+      ;;    l-and
+      ;;    (for [pred [(mk-key-matches-filtered? :text l-and (filter string? xs))
+      ;;                (mk-key-matches-filtered? :tags l-and (filter keyword? xs))
+      ;;                (mk-all-kvs? (filter map? xs))]]
+      ;;      (pred entry)))))))
+

 ;;; non-io parts of file access functions

@@ -134,11 +159,11 @@
   (let [xs          (:entries (file-load-ueberfoo filename))
         options-vec (make-options-vec options)
         opt-map     (parse-list-options options-vec)
-        filtered    (filter (make-filter opt-map) xs)
-        selected    (map (make-selector opt-map) filtered)
+        filtered    (filter (mk-filter opt-map) xs)
+        selected    (map (mk-selector opt-map) filtered)
         opt-map-n   (assoc opt-map :nr-of-entries (count selected))
-        result      ((make-list-post-processor opt-map-n) selected)
-        xform       (make-entry-formatter opt-map)
+        result      ((mk-list-post-processor opt-map-n) selected)
+        xform       (mk-entry-formatter opt-map)
         one-liners? (and (not (:all opt-map)) (= 1 (count (:select opt-map))))
         printer     (if one-liners? print println)]
     (do
@@ -152,7 +177,7 @@
         xs          (:entries m)
         options-vec (make-options-vec options)
         opt-map     (parse-list-options options-vec)
-        filtered    (filter (make-filter opt-map) xs)
+        filtered    (filter (mk-filter opt-map) xs)
         ids         (set (map :id filtered))
         other-xs    (vec (filter #(not (contains? ids (:id %))) xs))
         new-m       (update-map m other-xs)]


Refactored encoder

Refactored encoder

--- src/video_server/encoder.clj
+++ src/video_server/encoder.clj
@@ -50,6 +50,26 @@
   [size]
   ({:1080 :720 :720 :480} size))

+(defn encode-spec
+  "Returns the specification for an encoding job."
+  [folder video fmt size]
+  (let [container (container-to-encode (:containers video))
+        file (io/file (:file folder) (:filename container))
+        info (ffmpeg/video-info file)
+        size (or (smaller-size (smallest-encoded-size video)) size)]
+    {:format fmt
+     :size size
+     :width (:width container)
+     :height (:height container)
+     :target-width (width-for-size size)
+     :file file
+     :input (.getCanonicalPath file)
+     :info info
+     :video video
+     :video-stream (video/video-stream info)
+     :audio-streams (video/audio-streams info)
+     :subtitle-streams (video/subtitle-streams info)}))
+
 (defn output-file
   "Returns the File representing the encoder output."
   [{:keys [video file format width height] :as spec}]
@@ -69,26 +89,6 @@
   "Returns the spec with an appropriate output filename."
   [spec]
   (assoc spec :output (.getCanonicalPath (output-file spec))))
-
-(defn encode-spec
-  "Returns the specification for an encoding job."
-  [folder video fmt size]
-  (let [container (container-to-encode (:containers video))
-        file (io/file (:file folder) (:filename container))
-        info (ffmpeg/video-info file)
-        size (or (smaller-size (smallest-encoded-size video)) size)]
-    {:format fmt
-     :size size
-     :width (:width container)
-     :height (:height container)
-     :target-width (width-for-size size)
-     :file file
-     :input (.getCanonicalPath file)
-     :info info
-     :video video
-     :video-stream (video/video-stream info)
-     :audio-streams (video/audio-streams info)
-     :subtitle-streams (video/subtitle-streams info)}))

 (defn encode-video
   "Transcodes the video suitable for downloading and casting."


Fix log string

Fix log string

--- src/whisper2cyanite/core.clj
+++ src/whisper2cyanite/core.clj
@@ -75,7 +75,7 @@
         err (format
              (str "Metric store validation. "
                   "%s: rollup: %s, period: %s, path: %s, time: %s, "
-                  "whisper value: %s, store value %s")
+                  "whisper value: %s, store value: %s")
              msg rollup period path time w-value s-value)]
     (when-not valid?
       (if-not @error-reported?


Tag records with the tenantId for now.

Tag records with the tenantId for now.

--- POC/aggregation/tools/genAssessments/src/genAssessments/json.clj
+++ POC/aggregation/tools/genAssessments/src/genAssessments/json.clj
@@ -20,9 +20,9 @@

 (defn gen-json [output-file contents]
   (def entity (merge contents { :metaData { :tenantId "Hyrule" } } ) )
-  (try (insert output-file contents)
+  (try (insert output-file entity)
     (catch Exception e
-      (println (format "%s\n\n%s" contents e)),
+      (println (format "%s\n\n%s" entity e)),
       (.System.exit 0)
     )
   )


track: Return default empty map for new tracker

--- src/main/clojure/clojure/tools/namespace/track.clj
+++ src/main/clojure/clojure/tools/namespace/track.clj
@@ -108,4 +108,4 @@
 (defn tracker
   "Returns a new, empty dependency tracker"
   []
-  (hash-map))
+  {})


Fixed docs, added pre-condition for empty seq


Minor change

Minor change

--- modules/bootstrap/src/modular/bootstrap/cylon/user_forms.clj
+++ modules/bootstrap/src/modular/bootstrap/cylon/user_forms.clj
@@ -147,7 +147,7 @@
         [:div
          [:p "Model..."]
          [:pre (h (pr-str model))]]
-        [:p "Now proceed to " [:a {:href (:redirection-uri model)} "continue"]]]])))
+        (when (:redirection-uri model) [:p "Now proceed to " [:a {:href (:redirection-uri model)} "continue"]])]])))

   EmailVerifiedRenderer
   (render-email-verified [this req model]


Remove duplicate require

Remove duplicate require

--- lib/edge.app.dev/src/user.clj
+++ lib/edge.app.dev/src/user.clj
@@ -6,7 +6,6 @@
    [clojure.java.classpath :refer [classpath-directories]]
    [io.aviso.ansi]
    [integrant.repl.state]
-   [io.aviso.ansi]
    [spyscope.core]))

 ;; Work around TNS-45.  This used to be fixed by using a forked version of tns,


Add clojurescript incognito writer.

Add clojurescript incognito writer.


Added matrix math imports.

Added matrix math imports.


Comment list of unused commands which are listed in the server reference, but not documented.

--- src/overtone/sc/machinery/server/osc_validator.clj
+++ src/overtone/sc/machinery/server/osc_validator.clj
@@ -195,7 +195,14 @@
    "/c_setn"             [:ctl-bus-idx :count :ctl-val*]
    "/c_fill"             [:ctl-bus-idx :count :ctl-val]
    "/c_get"              [:ctl-bus-idx]
-   "/c_getn"             [:ctl-bus-idx :count]})
+   "/c_getn"             [:ctl-bus-idx :count]}
+
+  ;; Unused Commands (undocumented in server reference: http://doc.sccode.org/Reference/Server-Command-Reference.html)
+  ;; "/none"
+  ;; "/s_newargs"
+  ;; "/n_cmd"
+  ;; "/d_freeAll"
+  )

 (defn- description
   [type]


Simplify future macro.

Simplify future macro.

--- src/promesa/core.cljc
+++ src/promesa/core.cljc
@@ -436,7 +436,7 @@
      `(-> (exec/submit! (fn []
                           (c/let [f# (fn [] ~@body)]
                             (pt/-promise (f#)))))
-          (pt/-bind identity exec/current-thread-executor))))
+          (pt/-bind identity))))

 (defonce ^:private INTERNAL_LOOP_FN_NAME


Bug fixes  - popover-tooltip: hyperlink tooltips were not showing in the right place.  - dropdown: When filter has no results, up/down/home/end show errors on the console.  - dropdown: Type "evil" in demo and it doesn't now show the "Axis of Evil" heading.  - checkbox & radio-button: clicking on disabled checkbox errors on the console.  - selection-list: When clicking on the label area of disabled items, the checkbox or radio-button was still operational.  - tabs: Persistent and Dynamic tabs demos no longer switched tabs.

--- src/re_demo/tabs.cljs
+++ src/re_demo/tabs.cljs
@@ -123,8 +123,9 @@
                                :gap     "30px"
                                :margin  "20px 0px 0px 0px"       ;; TODO:  decide would we prefer to use :top-margin??
                                :children [[horizontal-tabs
-                                           :model  selected-tab-id
-                                           :tabs  tab-defs]]]]]]])))
+                                           :model     selected-tab-id
+                                           :tabs      tab-defs
+                                           :on-change #(reset! selected-tab-id %)]]]]]]])))

 (defn adding-tabs-demo
@@ -152,8 +153,9 @@
                                :gap     "30px"
                                ;;:margin  "20px 0px 0px 0px"       ;; TODO:  decide would we prefer to use :top-margin??
                                :children [[horizontal-tabs
-                                           :model  selected-tab-id
-                                           :tabs  tab-defs]]]]]]])))
+                                           :model     selected-tab-id
+                                           :tabs      tab-defs
+                                           :on-change #(reset! selected-tab-id %)]]]]]]])))

 (defn panel
   []


Fix misplaced docstring in riemann.slack.

--- src/riemann/slack.clj
+++ src/riemann/slack.clj
@@ -4,11 +4,16 @@
             [cheshire.core :as json])
   (:use [clojure.string :only [escape join upper-case]]))

-(defn slack-escape [message]
+
+(defn slack-escape
   "Escape message according to slack formatting spec."
+  [message]
   (escape message {\< "<" \> ">" \& "&"}))

-(defn default-formatter [events]
+
+(defn default-formatter
+  "Simple formatter for rendering an event as a Slack attachment."
+  [events]
   {:attachments
    [{:fields
      [{:title "Riemann Event"
@@ -21,7 +26,10 @@
                      "Tag:   " (or (:tag events) "-") "\n"))
        :short true}]}]})

-(defn extended-formatter [events]
+
+(defn extended-formatter
+  "Format an event as a Slack attachment with a series of fields."
+  [events]
   {:text "This event requires your attention!",
    :attachments
    [{:fallback
@@ -58,6 +66,7 @@
       {:title "Tags",
        :value (slack-escape (or (:tag events) "-"))
        :short true}]}]})
+

 (defn slack
   "Posts events into a slack.com channel using Incoming Webhooks.


Add :pg/json datatype.

Add :pg/json datatype.

--- src/suricatta/dsl.clj
+++ src/suricatta/dsl.clj
@@ -63,6 +63,7 @@
    :pg/char PostgresDataType/CHAR
    :pg/bytea PostgresDataType/BYTEA
    :pg/numeric PostgresDataType/NUMERIC
+   :pg/json PostgresDataType/JSON
    :maria/bigint MariaDBDataType/BIGINT
    :maria/ubigint MariaDBDataType/BIGINTUNSIGNED
    :maria/binary MariaDBDataType/BINARY


releaseing v0.4.0

releaseing v0.4.0

--- moebius/project.clj
+++ moebius/project.clj
@@ -1,4 +1,4 @@
-(defproject samsara/moebius "0.4.0-SNAPSHOT"
+(defproject samsara/moebius "0.4.0"
   :description "A system to process and enrich and correlate events in realtime"

   :url "https://samsara.github.com/"


make key-queue work add individual modifier keys

--- src-cljs/frontend/components/key_queue.cljs
+++ src-cljs/frontend/components/key_queue.cljs
@@ -15,7 +15,7 @@
             [om.dom :as dom :include-macros true]
             [clojure.string :refer [join split]]
             [dommy.core :as dommy]
-            [frontend.utils :as utils])
+            [frontend.utils :as utils :include-macros true])
   (:require-macros [cljs.core.async.macros :as async]))

 (def code->key
@@ -46,33 +46,28 @@
 (defn event-modifiers
   "Given a keydown event, return the modifier keys that were being held."
   [e]
-  (into [] (filter identity [(if (.-shiftKey e) "shift")
-                             (if (.-altKey e)   "alt")
-                             (if (.-ctrlKey e)  "ctrl")
-                             (if (.-metaKey e)  "meta")])))
+  (into [] (filter identity [(when (.-shiftKey e) "shift")
+                             (when (.-altKey e)   "alt")
+                             (when (.-ctrlKey e)  "ctrl")
+                             (when (.-metaKey e)  "meta")])))

 (def mod-keys
   "A vector of the modifier keys that we use to compare against to make
   sure that we don't report things like pressing the shift key as independent events.
   This may not be desirable behavior, depending on the use case, but it works for
   what I need."
-  [;; shift
-   (js/String.fromCharCode 16)
-   ;; ctrl
-   (js/String.fromCharCode 17)
-   ;; alt
-   (js/String.fromCharCode 18)])
+  #{"alt" "ctrl" "shift"})

 (defn event->key
   "Given an event, return a string like 'up' or 'shift+l' or 'ctrl+;'
-  describing the key that was pressed.
-  This fn will never return just 'shift' or any other lone modifier key."
+  describing the key that was pressed. Will return lone modifier keys, like shift or ctrl"
   [event]
   (let [mods (event-modifiers event)
         which (.-which event)
-        key (or (code->key which) (.toLowerCase (js/String.fromCharCode which)))]
-    (if (and key (not (empty? key)) (not (some #{key} mod-keys)))
-      (join "+" (conj mods key)))))
+        key (or (code->key which) (.toLowerCase (js/String.fromCharCode which)))]
+    (if (and key (not (empty? key)))
+      (join "+" (concat mods (when (not (some #{key} mods))
+                               [key]))))))

 (defn log-keystroke [e]
   (utils/mlog "key event" e) e)


make db-updated trigger a refresh

make db-updated trigger a refresh

--- src-cljs/frontend/controllers/controls.cljs
+++ src-cljs/frontend/controllers/controls.cljs
@@ -225,3 +225,7 @@
      (get-in current-state [:menu :open?]) (cast! :menu-closed)
      was-drawing? (d/transact! db [layer])
      :else nil)))
+
+(defmethod control-event :db-updated
+  [target message _ state]
+  (assoc state :random-number (Math/random)))


STORM-213: fixed NullPointerException

STORM-213: fixed NullPointerException

* that was caused by submitting a topology to a LocalCluster with a decoupled ZK

--- storm-core/src/clj/backtype/storm/LocalCluster.clj
+++ storm-core/src/clj/backtype/storm/LocalCluster.clj
@@ -30,10 +30,10 @@
                {TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS true})]
      [[] ret]))
   ([^String zk-host ^Long zk-port]
-     (let [ret (mk-local-storm-cluster :daemon-conf {TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS true
+   (let [ret (mk-local-storm-cluster :daemon-conf {TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS true
                                                      STORM-ZOOKEEPER-SERVERS (list zk-host)
                                                      STORM-ZOOKEEPER-PORT zk-port})]
-       [[] zk-host zk-port]))
+     [[] ret]))
   ([^Map stateMap]
    [[] stateMap]))


Add some tests for es6/cljs implementation.

--- test/bytebuf/tests/core.cljx
+++ test/bytebuf/tests/core.cljx
@@ -16,6 +16,7 @@
   (:require #+clj [clojure.test :as t]
             #+cljs [cljs.test :as t]
             [bytebuf.core :as buf]
+            [bytebuf.buffer :as impl]
             [bytebuf.bytes :as bytes])
   #+clj
   (:import java.nio.ByteBuffer
@@ -44,6 +45,18 @@
   (let [buffer (buf/allocate 16 {:type :direct :impl :netty})]
     (t/is (.isDirect buffer))
     (t/is (instance? ByteBuf buffer))))
+
+#+cljs
+(t/deftest allocate-direct-es6-buffer
+  (let [buffer (buf/allocate 16 {:impl :es6})]
+    (t/is (instance? js/DataView buffer))))
+
+;; #+cljs
+;; (t/deftest allocate-direct-node-buffer
+;;   (let [bf (js/require "buffer")
+;;         bf (.-Buffer bf)
+;;         buffer (buf/allocate 16 {:impl :node})]
+;;     (t/is (instance? bf buffer))))

 #+clj
 (t/deftest spec-constructor
@@ -167,6 +180,25 @@
               (t/is (= readed (buf/size spec)))
               (t/is (= data data')))))))))

+#+cljs
+(t/deftest spec-data-types
+  (let [data [;; (buf/string 5) "12345"
+              (buf/short)    100
+              (buf/integer)  1001
+              (buf/bool)     false
+              (buf/double)   (double 4.3)
+              (buf/float)    (float 3.5)
+              (buf/byte)     (byte 32)]]
+              ;; (buf/bytes 5)  (bytes/random-bytes 5)]]
+    (doseq [[spec data] (partition 2 data)]
+      (let [buffers [(buf/allocate (buf/size spec) {:impl :es6})]]
+        (doseq [buffer buffers]
+          (let [written (buf/write! buffer data spec)]
+            (t/is (= written (buf/size spec)))
+            (let [[readed data'] (buf/read* buffer spec)]
+              (t/is (= readed (buf/size spec)))
+              (t/is (= data data')))))))))
+
 ;; #+clj
 ;; (t/deftest spec-data-with-dynamic-types-single
 ;;   (let [spec (buf/spec (buf/string*))


Update benchmark description.

Update benchmark description.

--- test/cavm/benchmark/core.clj
+++ test/cavm/benchmark/core.clj
@@ -190,7 +190,7 @@
             (probe-fetch xena (dataset-map :matrix-medium) probes samples))}

    ^:matrix
-   {:desc "300 probes * 500 samples from matrix of 17k rows"
+   {:desc "300 probes * 500 samples from matrix of 17k rows, xena-query"
     :id :matrix-medium-three-hundred-probe-xena
     :params (fn []
             [(get-probes (dataset-map :matrix-medium) 300)


Removed erroneous comments, implementation of RequiresPrevious predicate (no test yet)

--- damp.ekeko.aspectj.plugin/src/damp/ekeko/aspectj/annotations.clj
+++ damp.ekeko.aspectj.plugin/src/damp/ekeko/aspectj/annotations.clj
@@ -35,14 +35,12 @@
   (l/all
     (type-annotation|key-annotation|value-annotation|type|name ?type ?key ?val "damp.ekeko.aspectj.annotations.Requires")))

-;;TO TEST
 (defn
   excluding|type-key-val
   [?type ?key ?val]
   (l/all
     (type-annotation|key-annotation|value-annotation|type|name ?type ?key ?val "damp.ekeko.aspectj.annotations.Excludes")))

-;;TO TEST
 (defn
   oneOfing|type-key-val
   [?type ?key ?val]
@@ -98,7 +96,12 @@
   [?pc ?val]
   (l/fresh [?key]
     (pointcut-annotation|key-annotation|value-annotation|type|name ?pc ?key ?val "damp.ekeko.aspectj.annotations.Label")))
-
+
+(defn
+  reqPrev|behavior-key-val
+  [?behavior ?key ?val]
+  (l/all
+    (behavior-annotation|key-annotation|value-annotation|type|name ?behavior ?key ?val "damp.ekeko.aspectj.annotations.RequiresPrevious")))

 ;;Type pattern matching


CMR-2306 reverts config-name->env-name

CMR-2306 reverts config-name->env-name

--- common-lib/src/cmr/common/config.clj
+++ common-lib/src/cmr/common/config.clj
@@ -2,6 +2,7 @@
   "A namespace that allows for global configuration. Configuration can be provided at runtime or
   through an environment variable. Configuration items should be added using the defconfig macro."
   (:require
+   [camel-snake-kebab.core :as csk]
    [clojure.edn :as edn]
    [clojure.set :as set]
    [clojure.string :as str]
@@ -31,14 +32,14 @@
 (defn config-name->env-name
   "Converts a config name into the environment variable name"
   [config-name]
-  (keyword (str "cmr-" (name config-name))))
+  (str "CMR_" (csk/->SCREAMING_SNAKE_CASE_STRING config-name)))

 ;; dynamic is here only for testing purposes
 (defn- ^:dynamic env-var-value
   "Returns the value of the environment variable. Here specifically to enable testing of this
   namespace."
   [env-name]
-  (env env-name))
+  (env (csk/->kebab-case-keyword env-name)))

 (defn config-value*
   "Retrieves the currently configured value for the name or the default value. A parser function


subtract test stub

subtract test stub

--- test/flambo/api_test.clj
+++ test/flambo/api_test.clj
@@ -254,6 +254,8 @@

      (future-fact "repartition returns a new RDD with exactly n partitions")

+     (future-fact "subtract")
+
      )))

 (facts


Added REST API for cache management.

Added REST API for cache management.

--- dev-resources/src/cmr/opendap/dev.clj
+++ dev-resources/src/cmr/opendap/dev.clj
@@ -1,6 +1,7 @@
 (ns cmr.opendap.dev
   "CMR OPeNDAP development namespace."
   (:require
+    [cheshire.core :as json]
     [clojure.java.io :as io]
     [clojure.pprint :refer [pprint]]
     [clojure.set :as set]


Explicitly require clojure.walk

Explicitly require clojure.walk

--- desktop/src/nightweb_desktop/server.clj
+++ desktop/src/nightweb_desktop/server.clj
@@ -1,5 +1,6 @@
 (ns nightweb-desktop.server
-  (:require [nightweb.constants :as c]
+  (:require [clojure.walk]
+            [nightweb.constants :as c]
             [nightweb.formats :as f]
             [nightweb-desktop.actions :as actions]
             [nightweb-desktop.pages :as pages]


fixed git crate

fixed git crate

--- src/dda/pallet/domain/managed_ide/repos.clj
+++ src/dda/pallet/domain/managed_ide/repos.clj
@@ -35,7 +35,7 @@
     "https://github.com/DomainDrivenArchitecture/dda-tomcat-crate.git"
     "https://github.com/DomainDrivenArchitecture/dda-liferay-crate.git"
     "https://github.com/DomainDrivenArchitecture/dda-linkeddata-crate.git"
-    "https://github.com:DomainDrivenArchitecture/dda-git-crate.git"
+    "https://github.com/DomainDrivenArchitecture/dda-git-crate.git"
     "https://github.com/DomainDrivenArchitecture/dda-managed-vm.git"
     "https://github.com/DomainDrivenArchitecture/dda-managed-ide.git"
     "https://github.com/DomainDrivenArchitecture/dda-pallet-masterbuild.git"]})


Remove debug logging statements

Remove debug logging statements

--- src/main/audio_utils/triggered_chunker.cljs
+++ src/main/audio_utils/triggered_chunker.cljs
@@ -18,9 +18,6 @@

   (process-audio [this data]
     (when (<< capturing?)
-      (js/console.log "TRIGGERED CHUNKER: PROCESS AUDIO"
-                      data
-                      (<< capturing?))
       (let [n-channels (count data)
             n-samples  (count (first data))]
         (dotimes [n n-samples]
@@ -42,7 +39,6 @@
       (>> chunks empty-chunks)))

   (trigger [this capture?]
-    (js/console.log "TRIGGERED CHUNKER: TRIGGER: capture?" capture?)
     (when-not capture?
       (deliver-chunks this)
       (reset-chunks this))


Missing line break. [ci skip]

Missing line break. [ci skip]

--- src-cljs/frontend/components/dashboard.cljs
+++ src-cljs/frontend/components/dashboard.cljs
@@ -57,6 +57,7 @@
                                                              :subpage "containers"})
                       :on-click #(analytics/track "build-diagnostics-add-more-containers-clicked")}
                   "Add More Containers"]]])]]))))))
+
 (defn dashboard [data owner]
   (reify
     om/IDisplayName (display-name [_] "Dashboard")


Fix missing defaults for some supported matrix types.

--- src/clojure/uncomplicate/neanderthal/internal/navigation.clj
+++ src/clojure/uncomplicate/neanderthal/internal/navigation.clj
@@ -526,10 +526,12 @@
    (case type
      :sy sy-default
      :tr (if diag-unit unit-default zero-default)
+     :gb zero-default
      :sb sb-default
      :tb (if diag-unit unit-default zero-default)
      :sp sy-default
      :tp (if diag-unit unit-default zero-default)
+     :td zero-default
      :gt zero-default
      :gd zero-default
      :dt zero-default
@@ -540,6 +542,7 @@
    (case type
      :sy sy-default
      :tr zero-default
+     :gb zero-default
      :sb sb-default
      :tb zero-default
      :sp sy-default


:bug: Fix syntax error on backend fixtures.

--- backend/src/uxbox/fixtures.clj
+++ backend/src/uxbox/fixtures.clj
@@ -64,7 +64,7 @@
                                       :x1 200
                                       :y1 200
                                       :x2 1224
-                                      :y2 968}]
+                                      :y2 968}]}
                      :metadata {:width 1024
                                 :height 768
                                 :layout "tablet"}


Added test case for converting string-style relationship references

--- test/cia/stores/sql/transformation_test.clj
+++ test/cia/stores/sql/transformation_test.clj
@@ -86,6 +86,8 @@
              :judgement_id "judgement_id"
              :indicator_id "indicator_id"}
             {:judgement_id "judgement_id"
+             :indicator_id "indicator_id"}
+            {:judgement_id "judgement_id"
              :indicator_id "indicator_id"}]
            (sut
             [{:id "judgement_id"
@@ -94,7 +96,9 @@
                             :relationship "relationship"
                             :indicator "indicator_id"}]}
              {:id "judgement_id"
-              :indicators [{:indicator "indicator_id"}]}])))))
+              :indicators [{:indicator "indicator_id"}]}
+             {:id "judgement_id"
+              :indicators ["indicator_id"]}])))))

 (deftest filter-map->where-map
   (is (= {:observable_type "type"


Adding has any permission helper

Adding has any permission helper

--- apoya-app/src/clj/apoya/security/permission.clj
+++ apoya-app/src/clj/apoya/security/permission.clj
@@ -17,3 +17,7 @@
   (let [permission-alts (permission-alternatives permission)
         criteria (-> criteria seq flatten)]
     (apply auth/has-any-permission? permission-alts criteria)))
+
+(defn has-any-permission? [permissions & {:as criteria}]
+  (let [criteria (-> criteria seq flatten)]
+    (boolean (some #(apply has-permission? % criteria) permissions))))


update call syntax

update call syntax

--- src/atom_finder/questions/bug_densities.clj
+++ src/atom_finder/questions/bug_densities.clj
@@ -39,10 +39,11 @@
    })

 (->> gcc-repo
-    (map-all-commits atom-and-bug-counts)
+    (map-all-commits map atom-and-bug-counts)
     (map prn)
+    (take 3)
     dorun
-    (log-to "tmp/bug-densities-2017-07-20_3.txt")
+    ;(log-to "tmp/bug-densities-2017-07-20_3.txt")
     time-mins)

 '(->> "tmp/bug-densities-2017-07-20_2.txt"
@@ -52,8 +53,26 @@
      (map-values (partial reduce (partial merge-with +)))
      pprint)

-'(-<>
+'(-<>>
  (find-rev-commit gcc-repo "f934007a13a700b07d6d7473146cc51ccf5afff1")
  ;(edited-files gcc-repo)
- (commit-file-source gcc-repo <> "gcc/cp/pt.c")
- println)
+ ;(commit-file-source gcc-repo <> "gcc/cp/pt.c")
+ ;(before-after-data gcc-repo <> "gcc/cp/pt.c")
+ (commit-files-before-after gcc-repo <>)
+ (map keys)
+ prn
+ time-mins)
+
+;; test code to generate an out-of-memory error (reduce -Xmx for faster results)
+'(-<>>
+ (range)
+ (pap (fn [_] (used-memory)))
+ (map (fn [i] [i (map #(parse-file (str gcc-path %)) ["/gcc/cp/pt.c" "/gcc/config/i386/i386.c"])]))
+ (map #(and (get-in-tree [0] (last (last %1))) (println (first %1) ": " (used-memory))))
+ (take 200)
+ (dorun)
+ prn
+ ((fn [_] (println (used-memory))))
+ time-mins
+ )
+


fix null pointers when trying to inner trace nothing

--- src/com/billpiel/sayid/nrepl_middleware.clj
+++ src/com/billpiel/sayid/nrepl_middleware.clj
@@ -10,6 +10,20 @@
             [com.billpiel.sayid.util.other :as util]
             [clojure.tools.namespace.find :as ns-find]))

+(defn clj->nrepl*
+  [v]
+  (cond (coll? v) (list* v)
+        (number? v) v
+        (keyword? v) (name v)
+        (true? v) 1
+        (false? v) nil
+        :else (str v)))
+
+(defn clj->nrepl
+  [frm]
+  (clojure.walk/prewalk clj->nrepl*
+                        frm))
+
 (defn send-status-done
   [msg]
   (t/send (:transport msg)
@@ -48,6 +62,7 @@
         (cond
           (nil? frm) nil
           (<= (:line m) line (:end-line m)) frm
+          (> (:line m) line) nil
           :else (recur rdr-iter))))))

 (defn get-meta-at-pos-in-source
@@ -88,7 +103,7 @@
   (let [ws (sd/ws-deref!)
         ids (q/get-ids-from-file-line-range ws
                                             file
-                                            start-line
+                                            (or start-line line)
                                             line)]
     (if-not (empty? ids)
       (sd/ws-query* [:id ids])
@@ -102,20 +117,6 @@
                (update-in [:path] str)
                (update-in [:header] #(when % 1)))])
         line-meta))
-
-(defn clj->nrepl*
-  [v]
-  (cond (coll? v) (list* v)
-        (number? v) v
-        (keyword? v) (name v)
-        (true? v) 1
-        (false? v) nil
-        :else (str v)))
-
-(defn clj->nrepl
-  [frm]
-  (clojure.walk/prewalk clj->nrepl*
-                        frm))

 ;; ======================

@@ -169,18 +170,20 @@
              matches (query-ws-by-file-line-range file start-line line)
              [{:keys [name inner-path]}] matches
              kids (:children (sd/ws-deref!))
-             _ (do (sd/ws-cycle-all-traces!)
-                   (sd/ws-clear-log!)
-                   (when (nil? inner-path) ;; don't inner-trace an inner trace
-                     (sd/ws-add-deep-trace-fn!* name))
-                   (replay! kids))
+             _ (do (when-not (empty? matches)
+                     (sd/ws-cycle-all-traces!)
+                     (sd/ws-clear-log!)
+                     (when (nil? inner-path) ;; don't inner-trace an inner trace
+                       (sd/ws-add-deep-trace-fn!* name))
+                     (replay! kids)))
              matches' (query-ws-by-file-line-range file start-line line)
-             out (if-not (nil? matches')
+             out (if-not (or (empty? matches)
+                             (empty? matches'))
                    (-> matches'
                        util/wrap-kids
                        so/tree->meta-string-pairs
                        clj->nrepl)
-                   {:string (str "No trace records found for function at line: " line)})]
+                   (clj->nrepl [[nil (str "No trace records found for function at line: " line)]]))]
          (t/send transport (response-for msg
                                          :value out)))
        (catch Exception e


[#2537] Improve catching exceptions on aggregation endpoint level

--- backend/src/akvo/lumen/endpoint/aggregation.clj
+++ backend/src/akvo/lumen/endpoint/aggregation.clj
@@ -3,6 +3,7 @@
             [akvo.lumen.endpoint.commons.http :as http]
             [akvo.lumen.lib.aggregation :as aggregation]
             [cheshire.core :as json]
+            [clojure.tools.logging :as log]
             [clojure.spec.alpha :as s]
             [akvo.lumen.component.tenant-manager :as tenant-manager]
             [integrant.core :as ig])
@@ -23,7 +24,12 @@
                              visualisation-type
                              (json/parse-string query keyword))
           (catch JsonParseException e
-            (http/bad-request {:message (.getMessage e)})))
+            (log/error e)
+            (http/bad-request
+             {:message (format "JSON parse exception: %s" (.getMessage e))}))
+          (catch Exception e
+            (log/error e)
+            (http/internal-server-error {:message (.getMessage e)})))
         (http/bad-request {:message "No query supplied"})))))

 (defn routes [{:keys [tenant-manager] :as opts}]


Add 'looping?' check to the manual clj test. Issue #243.

--- test/clj/manual.clj
+++ test/clj/manual.clj
@@ -37,7 +37,8 @@
              (let [sec (q/seconds)]
                (q/text (str sec) 20 50)
                (when (zero? (rem sec 10))
-                 (q/no-loop))))
+                 (q/no-loop)))
+             (q/text (str "Looping: " (q/looping?)) 20 65))
      :on-close #(deliver lock true)
      :key-pressed #(q/start-loop))
     @lock))


CMR-493: Updated test to use correct namespace.

--- test/cmr/search/test/data/query_to_elastic_converters/temporal.clj
+++ test/cmr/search/test/data/query_to_elastic_converters/temporal.clj
@@ -2,7 +2,7 @@
   "Contains tests to verify current-end-date calculation."
   (:require [clojure.test :refer :all]
             [cmr.common.date-time-parser :as parser]
-            [cmr.search.data.query-to-elastic-converters.temporal :as t2e]))
+            [cmr.search.data.complex-to-simple-converters.temporal :as t2e]))

 (deftest current-end-date-test
   "Test end-date is calculated correctly for current year during periodic date time conversion."


CMR-203: Updated tests.

CMR-203: Updated tests.

--- test/cmr/system_int_test/search/collection_keyword_search_test.clj
+++ test/cmr/system_int_test/search/collection_keyword_search_test.clj
@@ -14,6 +14,8 @@
         psa2 (dc/psa "bravo" :string "bf")
         psa3 (dc/psa "charlie" :string "foo")
         psa4 (dc/psa "case" :string "up")
+        p1 (dc/platform "platform_Sn B")
+        p2 (dc/platform "platform_SnA")
         sk1 (dc/science-keyword {:category "Cat1"
                                  :topic "Topic1"
                                  :term "Term1"
@@ -28,29 +30,30 @@
                                  :variable-level-2 "Level2-2"
                                  :variable-level-3 "Level2-3"
                                  :detailed-variable "UNIVERSAL"})
+        tdcs1 (dc/two-d "XYZ")
         coll1 (d/ingest "CMR_PROV1" (dc/collection {}))
-        coll2 (d/ingest "CMR_PROV1" (dc/collection {:entry-id "ABC!XYZ"}))
+        coll2 (d/ingest "CMR_PROV1" (dc/collection {:entry-title "ABC!XYZ"}))
         coll3 (d/ingest "CMR_PROV1" (dc/collection {:collection-data-type "Foo"}))
         coll4 (d/ingest "CMR_PROV2" (dc/collection {:collection-data-type "Bar"}))
-        coll5 (d/ingest "CMR_PROV2" (dc/collection {:short-name "Short name"}))
-        coll6 (d/ingest "CMR_PROV2" (dc/collection {:archive-center "Some$Place"}))
-        coll7 (d/ingest "CMR_PROV2" (dc/collection {:version-id "ABC123"}))
+        coll5 (d/ingest "CMR_PROV2" (dc/collection {:entry-title "ABC" :short-name "Space!Laser"}))
+        coll6 (d/ingest "CMR_PROV2" (dc/collection {:organizations [(dc/org :archive-center "Some&Place")]}))
+        coll7 (d/ingest "CMR_PROV2" (dc/collection {:version-id "Laser"}))
         coll8 (d/ingest "CMR_PROV2" (dc/collection {:processing-level-id "PDQ123"}))
         coll9 (d/ingest "CMR_PROV2" (dc/collection {:science-keywords [sk1 sk2]}))
         coll10 (d/ingest "CMR_PROV2" (dc/collection {:spatial-keywords ["in out"]}))
-        coll11 (d/ingest "CMR_PROV2" (dc/collection {:platform-sn "Space Laser"}))
+        coll11 (d/ingest "CMR_PROV2" (dc/collection {:platforms [p1 p2]}))
         coll12 (d/ingest "CMR_PROV2" (dc/collection {:product-specific-attributes [psa1 psa2 psa3 psa4]}))
-        coll13 (d/ingest "CMR_PROV2" (dc/collection {:two-d-coord-name "XY"}))]
+        coll13 (d/ingest "CMR_PROV2" (dc/collection {:two-d-coordinate-systems [tdcs1]}))]

     (index/refresh-elastic-index)

     (testing "search by keywords."
       (are [keyword-str items] (d/refs-match? items (search/find-refs :collection {:keyword keyword-str}))
-           "ABC" [coll2]
+           "ABC" [coll2 coll5]
            "XYZ" [coll2 coll13]
            "place" [coll6]
-           "Laser" [coll11]
-           "ABC place Huricane" [coll2 coll6 coll9]
+           "Laser" [coll5 coll7]
+           "ABC place Hurricane" [coll2 coll5 coll6 coll9]
            "BLAH" []))
     ; (testing "search by spatial keywords using wildcard *."
     ;   (is (d/refs-match? [coll3 coll4 coll5 coll7]


[PDOK-1949] default response

[PDOK-1949] default response

--- src/main/clojure/pdok/featured/extracts.clj
+++ src/main/clojure/pdok/featured/extracts.clj
@@ -100,8 +100,8 @@
             (cached-fn feature)
             (recur (<! rc)))))
     (timeline/all (config/timeline) dataset collection rc)
-    (cache/flush-batch chunk batched-fn)))
-
+    (cache/flush-batch chunk batched-fn)
+    {:status "ok" :count 777}))

 (defn file-to-features [path dataset]
   "Helper function to read features from a file.


pred from tenere to hold

pred from tenere to hold

--- src/babel/english/lexicon.clj
+++ src/babel/english/lexicon.clj
@@ -552,7 +552,7 @@

    "hold"
    {:synsem {:cat :verb
-             :sem {:pred :tenere}}
+             :sem {:pred :hold}}
     :english {:past "held"}}

    "hope"


added intentar

added intentar

--- src/babel/espanol/lexicon.clj
+++ src/babel/espanol/lexicon.clj
@@ -603,7 +603,8 @@
              :synsem {:cat :verb
                       :sem {:pred :boil}}}

-   "intentar" {}
+   "intentar" {:synsem {:cat :verb
+                      :sem {:pred :try}}}

    "ir" {:espanol {:futuro-stem "ir"
                    :present {:1sing "voy"


fixed nickname string in user pill

fixed nickname string in user pill

--- src/braid/ui/views/pills.cljs
+++ src/braid/ui/views/pills.cljs
@@ -38,4 +38,4 @@
         #_[:div {:className (str "status " ((fnil name "") (user :status)))}]]
         [:a.user.pill {:tabIndex -1
                        :href "#"}
-          [:span.name "????"]])))
+          [:span.name (str "@" (user :nickname))]])))


course per district/school pair.  Added a progress indicator.

--- POC/aggregation/tools/genAssessments/src/genAssessments/core.clj
+++ POC/aggregation/tools/genAssessments/src/genAssessments/core.clj
@@ -309,12 +309,12 @@

 (defn create-session [districtName schoolName]
   (into () [
-    (element :CalendarDate {:id (format "%s_day" districtName) }
+    (element :CalendarDate {:id (format "%s-%s-day" districtName schoolName) }
       (element :Date {} "2011-09-22")
       (element :CalendarEvent {} "Instructional day")
     )

-    (element :GradingPeriod {:id (format "%s-GP1" districtName)}
+    (element :GradingPeriod {:id (format "%s-%s-GP1" districtName schoolName)}
       (element :GradingPeriodIdentity {}
         (element :GradingPeriod {} "End of Year")
         (element :SchoolYear {} "2011-2012")
@@ -324,11 +324,11 @@
       (element :BeginDate {} "2011-09-01")
       (element :EndDate {} "2011-12-01")
       (element :TotalInstructionalDays {} "90")
-      (element :CalendarDateReference {:ref (format "%s_day" districtName)})
+      (element :CalendarDateReference {:ref (format "%s-%s-day" districtName schoolName)})
     )

     (element :Session {}
-      (element :SessionName {} (format "%s-Fall-2011" schoolName))
+      (element :SessionName {} (format "%s-%s-Fall-2011" districtName schoolName))
       (element :SchoolYear {} "2011-2012")
       (element :Term {} "Fall Semester")
       (element :BeginDate {} "2011-09-06")
@@ -339,8 +339,8 @@
           (element :StateOrganizationId {} schoolName)
         )
       )
-      (element :GradingPeriodReference {:ref (format "%s-GP1" districtName)})
-      (element :CalendarDateReference {:ref (format "%s_day" districtName)})
+      (element :GradingPeriodReference {:ref (format "%s-%s-GP1" districtName schoolName)})
+      (element :CalendarDateReference {:ref (format "%s-%s-day" districtName schoolName)})
     ) ]
   )
 )
@@ -356,7 +356,7 @@
 (defn create-section [districtName schoolName]
   (into () [
     (element :CourseOffering {}
-      (element :LocalCourseCode {} (format "%s-Math-7" schoolName))
+      (element :LocalCourseCode {} (format "%s-%s-Math-7" districtName schoolName))
       (element :LocalCourseTitle {} "7th Grade Math")
       (element :SchoolReference {}
         (element :EducationalOrgIdentity {}
@@ -365,7 +365,7 @@
       )
       (element :SessionReference {}
         (element :SessionIdentity {}
-          (element :SessionName {} (format "%s-Fall-2011" schoolName))
+          (element :SessionName {} (format "%s-%s-Fall-2011" districtName schoolName))
         )
       )
       (element :CourseReference {}
@@ -378,13 +378,13 @@
     )

     (element :Section {}
-      (element :UniqueSectionCode {} (format "%s-Math-7-2011-Sec2" schoolName))
+      (element :UniqueSectionCode {} (format "%s-%s-Math-7-2011-Sec2" districtName schoolName))
       (element :SequenceOfCourse {} "1")
       (element :CourseOfferingReference {}
         (element :CourseOfferingIdentity {}
-          (element :LocalCourseCode {} (format "%s-Math-7" schoolName))
+          (element :LocalCourseCode {} (format "%s-%s-Math-7" districtName schoolName))
           (element :CourseCode {:IdentificationSystem "CSSC course code"}
-            (element :ID {} (format "Math007-%s" districtName))
+            (element :ID {} (format "Math-7-%s" districtName))
           )
           (element :Term {} "Fall Semester")
           (element :SchoolYear {} "2011-2012")
@@ -398,7 +398,7 @@
       )
       (element :SessionReference {}
         (element :SessionIdentity {}
-          (element :SessionName {} (format "%s-Fall-2011" schoolName))
+          (element :SessionName {} (format "%s-%s-Fall-2011" districtName schoolName))
         )
       )
     ) ]


Add point-dist, point-slope, and point-angle fns

--- src/clj/genartlib/algebra.clj
+++ src/clj/genartlib/algebra.clj
@@ -1,6 +1,6 @@
 (ns genartlib.algebra
   (:use [genartlib.util :only [between?]])
-  (:use [quil.core :only [HALF-PI PI TWO-PI atan cos sin]]))
+  (:use [quil.core :only [HALF-PI PI TWO-PI atan cos sin dist]]))

   (defn avg
     "Returns the average of the arguments"
@@ -87,6 +87,11 @@
       nil
       (/ (- y2 y1) (- x2 x1))))

+  (defn point-slope
+    "Returns the slope of a line between two points: (x1, y1), (x2, y2)"
+    [[x1 y1] [x2 y2]]
+    (slope x1 y1 x2 y2))
+
   (defn y-intercept
     "Returns the y-intercept of a line with a given slope
      and one point on the line (x1, y1)"
@@ -110,6 +115,11 @@
                 angle (+ angle (if (neg? x-delta) PI 0))]
             (mod angle TWO-PI))))))

+  (defn point-angle
+    "Returns the angle between two points in radians"
+    [[x1 y1] [x2 y2]]
+    (angle x1 y1 x2 y2))
+
   (defn angular-coords
     "Returns an [x y] vector representing a point that is
      offset from a center ([center-x center-y]) by a given
@@ -117,3 +127,8 @@
     [center-x center-y theta magnitude]
     [(+ center-x (* magnitude (cos theta)))
      (+ center-y (* magnitude (sin theta)))])
+
+  (defn point-dist
+    "Returns the euclidean distance between two points"
+    [[x1 y1] [x2 y2]]
+    (dist x1 y1 x2 y2))


add test for Sealed Vault

add test for Sealed Vault

--- src/clj/test/cards-assets.clj
+++ src/clj/test/cards-assets.clj
@@ -399,6 +399,33 @@
       (card-ability state :corp ron 0)
       (is (= 3 (count (:discard (get-runner)))) "Ronin did 3 net damage")
       (is (= 2 (count (:discard (get-corp)))) "Ronin trashed"))))
+
+(deftest sealed-vault
+  "Sealed Vault - Store credits for 1c, retrieve credits by trashing or spending click"
+  (do-game
+    (new-game (default-corp [(qty "Sealed Vault" 1) (qty "Hedge Fund" 1)])
+              (default-runner))
+    (play-from-hand state :corp "Sealed Vault" "New remote")
+    (play-from-hand state :corp "Hedge Fund")
+    (let [sv (get-content state :remote1 0)]
+      (core/rez state :corp sv)
+      (card-ability state :corp sv 0)
+      (prompt-choice :corp 8)
+      (is (= 8 (:counter (refresh sv))) "8 credits stored on Sealed Vault")
+      (is (= 0 (:credit (get-corp))))
+      (card-ability state :corp sv 1)
+      (prompt-choice :corp 8)
+      (is (= 0 (:counter (refresh sv))) "Credits removed from Sealed Vault")
+      (is (= 8 (:credit (get-corp))))
+      (is (= 0 (:click (get-corp))) "Spent a click")
+      (card-ability state :corp sv 0)
+      (prompt-choice :corp 7)
+      (is (= 7 (:counter (refresh sv))) "7 credits stored on Sealed Vault")
+      (is (= 0 (:credit (get-corp))))
+      (card-ability state :corp sv 2)
+      (prompt-choice :corp 7)
+      (is (= 7 (:credit (get-corp))))
+      (is (= 2 (count (:discard (get-corp)))) "Sealed Vault trashed"))))

 (deftest snare-cant-afford
   "Snare! - Can't afford"


fix regexp

fix regexp

--- src/cljam/util/chromosome.clj
+++ src/cljam/util/chromosome.clj
@@ -15,7 +15,7 @@

 (defn- split-version-suffix
   [s]
-  (let [[_ base suffix leftover] (re-matches #"(.+?)((?i)v[0-9](_alt|_random)?)?$" s)]
+  (let [[_ base suffix _] (re-matches #"(.+?)((?i)v[0-9](_alt|_random)?)?" s)]
     [base suffix]))

 (defn- normalize-chromosome-prefix
@@ -46,5 +46,5 @@

 (defn is-primary-chromosome?
   [s]
-  (not (nil? (re-matches #"^chr([0-9]{1,2}|X|Y|M|MT)$"
-                         (normalize-chromosome-key s)))))
+  (some? (re-matches #"^chr([0-9]{1,2}|X|Y|M|MT)"
+                     (normalize-chromosome-key s))))


Add rudiments of conditions display

Add rudiments of conditions display

--- src/cljs/iframe_app/core.cljs
+++ src/cljs/iframe_app/core.cljs
@@ -34,10 +34,17 @@

 (defcomponent conditions-manager [conditions owner]
   (render-state [_ state]
-    (dom/div
-      (dom/h2
-        "conditions")
-      (pr-str conditions))))
+    (dom/ul
+      {:class "unstyled global"}
+      (for [condition conditions]
+        (dom/li
+          {:class "rule"}
+          (dom/div
+            {:class "ruleTitle"}
+            (dom/a
+              {:class "field"}
+              (:name (first (filter #(= (:id %) (:master-field-id condition))
+                                    dummy-ticket-fields))))))))))

@@ -158,55 +165,69 @@
   (render-state [_ {:keys [selected-field-id slave-fields-picker-chan
                            selected-value]}]
     (dom/div
-      {:class "main"}
-
-      (dom/ul
-        {:class "table-header clearfix"}
-        (dom/li
-          "Fields")
-        (dom/li "Values")
-        (dom/li "Fields to show"))
-
+      {:class "cfa_navbar"}
       (dom/div
-        {:class "table-wrapper"}
-        (dom/table
-          {:class "table"}
-          (dom/tbody
-            (dom/tr
-              (dom/td
-                {:class "fields"}
-                (dom/div
-                  {:class "separator"}
-                  "Available")
-                (om/build master-field-picker
-                          (:ticket-fields app-state)
-                          {:opts selected-field-id}))
-              (dom/td
-                (dom/div
-                  {:class "values"}
-                  (dom/div
-                    {:class "separator"}
-                    "Available")
-                  (let [selected-field (first (filter #(= selected-field-id (:id %))
-                                                      (:ticket-fields app-state)))
-                        possible-values (:possible-values selected-field)]
-                    (om/build value-picker
-                              possible-values))))
-              (dom/td
-                {:class "selected"}
-                (dom/div
-                  {:class "values"}
-                  (dom/div
-                    {:class "separator"}
-                    "Available")
-                  (om/build slave-fields-picker
-                            (if selected-value
+        {:class "pane left"}
+        (dom/aside
+          {:class "sidebar"}
+          (dom/div
+            {:class "all_rules"}
+            (dom/h4
+              {:class "rules_summary_title"}
+              "Conditions in this form")
+            (om/build conditions-manager (:conditions app-state)))))
+      (dom/div
+        {:class "pane right section"}
+        (dom/section
+          {:class "main"}
+
+          (dom/ul
+            {:class "table-header clearfix"}
+            (dom/li
+              "Fields")
+            (dom/li "Values")
+            (dom/li "Fields to show"))
+
+          (dom/div
+            {:class "table-wrapper"}
+            (dom/table
+              {:class "table"}
+              (dom/tbody
+                (dom/tr
+                  (dom/td
+                    {:class "fields"}
+                    (dom/div
+                      {:class "separator"}
+                      "Available")
+                    (om/build master-field-picker
                               (:ticket-fields app-state)
-                              [])
-                            {:opts {:slave-fields-picker-chan slave-fields-picker-chan}})
-                  ))
-              ))))
-      (om/build conditions-manager (:conditions app-state)))
+                              {:opts selected-field-id}))
+                  (dom/td
+                    (dom/div
+                      {:class "values"}
+                      (dom/div
+                        {:class "separator"}
+                        "Available")
+                      (let [selected-field (first (filter #(= selected-field-id (:id %))
+                                                          (:ticket-fields app-state)))
+                            possible-values (:possible-values selected-field)]
+                        (om/build value-picker
+                                  possible-values))))
+                  (dom/td
+                    {:class "selected"}
+                    (dom/div
+                      {:class "values"}
+                      (dom/div
+                        {:class "separator"}
+                        "Available")
+                      (om/build slave-fields-picker
+                                (if selected-value
+                                  (:ticket-fields app-state)
+                                  [])
+                                {:opts {:slave-fields-picker-chan slave-fields-picker-chan}})
+                      ))
+                  ))))
+          )))
     ))


Stop timers when changing screens

Stop timers when changing screens

--- src/clojure/nightmod/game.clj
+++ src/clojure/nightmod/game.clj
@@ -4,7 +4,8 @@
             [nightmod.manager :as manager]
             [nightmod.screens :as screens]
             [nightmod.utils :as u]
-            [play-clj.core :refer :all]))
+            [play-clj.core :refer :all]
+            [play-clj.utils :refer :all]))

 (defn set-game-screen!
   "Displays one or more screens that you defined with `defscreen`. They will be
@@ -14,9 +15,10 @@

     (set-game-screen! main-screen text-screen)"
   [& game-screens]
-  (on-gl ; clear existing assets so they are reloaded
+  (on-gl ; clear existing timers and assets
+         (stop-timers!)
          (doseq [gs game-screens]
-           (-> gs :screen (swap! #(dissoc % :renderer :layers))))
+           (-> gs :screen (swap! #(dissoc % :timers :renderer :layers))))
          (asset-manager! manager/manager :clear)
          ; set the supplied screen(s) with the overlay screen added at the end
          (apply set-screen!


vec comaprison fix

vec comaprison fix

--- src/clojure2d/math/vector.clj
+++ src/clojure2d/math/vector.clj
@@ -180,8 +180,8 @@
 (deftype Vec2 [^double x ^double y]
   Object
   (toString [_] (str "[" x ", " y "]"))
-  (equals [t v]
-    (and (identical? t v)
+  (equals [_ v]
+    (and (instance? Vec2 v)
          (let [^Vec2 v v]
            (bool-and (== x (.x v))
                      (== y (.y v))))))
@@ -272,8 +272,8 @@
 (deftype Vec3 [^double x ^double y ^double z]
   Object
   (toString [_] (str "[" x ", " y ", " z "]"))
-  (equals [t v]
-    (and (identical? t v)
+  (equals [_ v]
+    (and (instance? Vec3 v)
          (let [^Vec3 v v]
            (bool-and (== x (.x v))
                      (== y (.y v))
@@ -440,8 +440,8 @@
 (deftype Vec4 [^double x ^double y ^double z ^double w]
   Object
   (toString [_] (str "[" x ", " y ", " z ", " w "]"))
-  (equals [t v]
-    (and (identical? t v)
+  (equals [_ v]
+    (and (instance? Vec4 v)
          (let [^Vec4 v v]
            (bool-and (== x (.x v))
                      (== y (.y v))


Fix inclusion of meta-errors in frontier

--- src/clojush/pushgp/pushgp.clj
+++ src/clojush/pushgp/pushgp.clj
@@ -204,9 +204,12 @@
               ((if use-single-thread swap! send) (nth pop-agents i) (fn [_] (nth new-frontier i))))
             (when-not use-single-thread (apply await pop-agents)) ;; SYNCHRONIZE
             (reset! frontier new-frontier))
-        (let [to-preserve (select candidates argmap)]
+        (let [to-preserve (select candidates argmap)
+              without-meta-errors (update-in to-preserve
+                                             [:errors]
+                                             #(drop-last (count (:meta-errors to-preserve)) %))]
           (recur (inc preserved)
-                 (conj new-frontier to-preserve)
+                 (conj new-frontier without-meta-errors)
                  (remove-one to-preserve candidates))))))
   (timer @push-argmap :fitness)
   ;; calculate solution rates if necessary for historically-assessed hardness


Various minor fixes.

Various minor fixes.

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

--- clojure/sequence_generator.clj
+++ clojure/sequence_generator.clj
@@ -5,8 +5,6 @@
 (defstruct acq-settings :frames :positions :channels :slices :slices-first
   :time-first :keep-shutter-open-slices :keep-shutter-open-channels
   :use-autofocus :autofocus-skip :relative-slices :exposure)
-
-(declare settings)

 (defn pairs [x]
   (partition 2 1 (concat x [nil])))
@@ -17,7 +15,7 @@
       (assoc event dim dim-val))
     events))

-(defn make-dimensions []
+(defn make-dimensions [settings]
   (let [{:keys [slices channels frames positions
                 slices-first time-first]} settings
         a [[slices :slice] [channels :channel]]
@@ -29,32 +27,31 @@
 (defn create-loops [dimensions]
   (reduce #(apply (partial nest-loop %1) %2) [{:task :snap}] dimensions))

-(defn make-main-loops []
-  (create-loops (make-dimensions)))
+(defn make-main-loops [settings]
+  (create-loops (make-dimensions settings)))

-(defn manage-shutter [events]
-  (for [[e1 e2] (pairs events)]
-    (assoc e1 :close-shutter
-      (if e2 (or
-               (and
-                 (not (settings :keep-shutter-open-channels))
-                 (not= (e1 :channel) (e2 :channel)))
-               (and
-                 (not (settings :keep-shutter-open-slices))
-                 (not= (e1 :slice) (e2 :slice)))
-               (not= (e1 :frame) (e2 :frame))
-               (not= (e1 :position) (e2 :position)))
-        true))))
-
-(defn process-skip-z-stack [events]
-  (let [slices (settings :slices)
-        middle-slice (nth slices (int (/ (count slices) 2)))]
+(defn process-skip-z-stack [events slices]
+  (let [middle-slice (nth slices (int (/ (count slices) 2)))]
     (filter
       #(or
          (nil? (% :channel))
          (-> % :channel :use-z-stack)
          (= middle-slice (% :slice)))
       events)))
+
+(defn manage-shutter [events keep-shutter-open-channels keep-shutter-open-slices]
+  (for [[e1 e2] (pairs events)]
+    (assoc e1 :close-shutter
+      (if e2 (or
+               (and
+                 (not keep-shutter-open-channels)
+                 (not= (e1 :channel) (e2 :channel)))
+               (and
+                 (not keep-shutter-open-slices)
+                 (not= (e1 :slice) (e2 :slice)))
+               (not= (e1 :frame) (e2 :frame))
+               (not= (e1 :position) (e2 :position)))
+        true))))

 (defn process-channel-skip-frames [events]
   (filter
@@ -64,30 +61,39 @@
        (not= 0 (mod (% :frame) (-> % :channel :skip-frames inc))))
     events))

-(defn process-use-autofocus [events]
+(defn process-use-autofocus [events use-autofocus autofocus-skip]
   (for [event events]
     (assoc event :autofocus
-      (and (settings :use-autofocus)
+      (and use-autofocus
         (or
           (nil? (event :frame))
-          (zero? (mod (event :frame) (inc (settings :autofocus-skip)))))))))
+          (zero? (mod (event :frame) (inc autofocus-skip))))))))

-(defn process-wait-time [events]
+(defn process-wait-time [events interval-ms]
   (cons
     (assoc (first events) :wait-time-ms 0)
     (for [[e1 e2] (pairs events) :when e2]
       (assoc e2 :wait-time-ms
         (if (= (:frame e1) (:frame e2))
           0
-          (settings :interval-ms))))))
+          interval-ms)))))

-(defn generate-acq-sequence [seq-settings]
-  (binding [settings seq-settings]
-    (-> (make-main-loops)
-      process-skip-z-stack
-      manage-shutter
-      process-use-autofocus
-      process-wait-time)))
+(defn generate-acq-sequence [settings]
+  (let [{:keys [slices keep-shutter-open-channels keep-shutter-open-slices
+         use-autofocus autofocus-skip interval-ms]} settings]
+    (-> (make-main-loops settings)
+      (process-skip-z-stack slices)
+      (manage-shutter keep-shutter-open-channels keep-shutter-open-slices)
+      (process-channel-skip-frames)
+      (process-use-autofocus use-autofocus autofocus-skip)
+      (process-wait-time interval-ms))))
+; Interop
+(defn data-object-to-map [obj]
+  (into {}
+    (for [f (.getFields (type obj))
+          :when (zero? (bit-and
+                         (.getModifiers f) java.lang.reflect.Modifier/STATIC))]
+      [(keyword (.getName f)) (.get f obj)])))

 ; Testing:

@@ -127,6 +133,6 @@
     :use-autofocus true :autofocus-skip 3 :relative-slices true :exposure 100
     :interval-ms 100))

-(def result (generate-acq-sequence null-settings))
+;(def result (generate-acq-sequence null-settings))

 ;(count result)


maintain cursor and scroll state when receiving edits from another user

--- src-app/swirl/app/editor.cljs
+++ src-app/swirl/app/editor.cljs
@@ -5,7 +5,11 @@

 (defn text->editor
   [{:keys [cm]} text]
-  (.setValue cm text))
+  (let [cursor (.getCursor cm)
+        scroll (.getScrollInfo cm)]
+    (.setValue cm text)
+    (.scrollTo cm (.-left scroll) (.-top scroll))
+    (.setCursor cm cursor)))

 (defn editor->text*
   [{:keys [text* cm]}]


add svg viz

add svg viz

--- day3/src/day3/csv.clj
+++ day3/src/day3/csv.clj
@@ -5,7 +5,10 @@
     [clojure.string :as str]
     [thi.ng.strf.core :as f]
     [thi.ng.geom.core :as g]
-    [thi.ng.geom.core.vector :refer [vec2]]))
+    [thi.ng.geom.core.vector :refer [vec2]]
+    [thi.ng.geom.viz.core :as viz]
+    [thi.ng.geom.svg.core :as svg]
+    ))

 (defn sanitize
   "Takes a string and replaces non-word chars with dashes."
@@ -86,3 +89,26 @@
         stats (calc-stats rows #{:year :land :land-and-ocean})]
     {:rows rows
      :stats stats}))
+
+(defn make-viz-spec
+  [{:keys [rows stats]} colid]
+  {:x-axis (viz/linear-axis
+            {:domain [(get-in stats [:year :min]) (get-in stats [:year :max])]
+             :range  [50 580]
+             :major  10
+             :minor  5
+             :pos    250
+             :label  (viz/default-svg-label int)})
+   :y-axis (viz/linear-axis
+            {:domain     [(get-in stats [colid :min]) (get-in stats [colid :max])]
+             :range      [250 20]
+             :major      0.1
+             :minor      0.05
+             :pos        50
+             :label-dist 15
+             :label-style {:text-anchor "end"}})
+   :grid   {:attribs {:stroke "#ccc"}}
+   :data   [{:values  (map (juxt :year :land) rows)
+             :attribs {:fill "none" :stroke "#0af"}
+             :layout  viz/svg-bar-plot}]})
+


Set some default deployment params

Set some default deployment params

--- src/exploud/messages/data.clj
+++ src/exploud/messages/data.clj
@@ -127,9 +127,13 @@
    :desired-capacity 1
    :health-check-grace-period 600
    :health-check-type "EC2"
+   :instance-healthy-attempts 50
    :instance-type "t1.micro"
+   :load-balancer-healthy-attempts 50
    :max 1
    :min 1
+   :pause-after-instances-healthy false
+   :pause-after-load-balancers-healthy false
    :selected-zones ["a" "b"]
    :subnet-purpose "internal"
    :termination-policy "Default"})


Adding todo about invoking action inside

--- src/helda/actions/invoker.clj
+++ src/helda/actions/invoker.clj
@@ -35,11 +35,12 @@
   )

 (defn invoke-script [module action-event]
+  ;todo experimental mode, not finished yet
   (println "Invoking module " module " for action event " action-event)
-  (binding [*ns* (create-ns (symbol (:module-id module)))]
+  ; (binding [*ns* (create-ns (symbol (:module-id module)))]
     (-> module :script load-string)
-    (apply (:action action-event) action-event)
-    )
+    ((-> :action action-event symbol resolve) action-event)
+    ; )
   )

 (defn process-action-response [db resp]


Macros: Add notes.

Macros: Add notes.

--- test/com/nomistech/clojure_the_language/macros/examples.clj
+++ test/com/nomistech/clojure_the_language/macros/examples.clj
@@ -148,6 +148,8 @@

 ;;;; TODO:

+;;;; - Finish macro basics
+
 ;;;; - Maybe look at grafana-dashboard-generator DSL next

 ;;;; - Don't need to talk about accidental capture, right?


Avoid race conditions registering controllers.

--- src/afterglow/controllers.clj
+++ src/afterglow/controllers.clj
@@ -20,6 +20,23 @@
 (def maximum-bpm
   "The highest BPM value which controllers are allowed to set."
   200)
+
+(defonce ^{:private true
+           :doc "Loads all the built-in controller implementations, so
+           they can register their recognizers. Performed in a future,
+           after the namespace itself loads, to avoid circular
+           dependency issues. Functions like [[bind-to-show]]
+           and [[auto-bind]] which rely on controller implementations
+           being registered should `deref` this future to ensure it
+           has finished."}
+  controller-binding-loader
+  (future
+    (Thread/sleep 100)
+    (require 'afterglow.controllers.ableton-push)
+    (require 'afterglow.controllers.ableton-push-2)
+    (require 'afterglow.controllers.launchpad-pro)
+    (require 'afterglow.controllers.launchpad-mini)
+    (require 'afterglow.controllers.launchpad-mk2)))

 (defonce
   ^{:private true
@@ -643,6 +660,7 @@
   function."
   [show device-filter & args]
   {:pre [(some? show) (some? device-filter)]}
+  @controller-binding-loader  ; Make sure controller implementations are finished registering
   (let [port-in  (first (amidi/filter-devices device-filter (amidi/open-inputs-if-needed!)))
         port-out (first (amidi/filter-devices device-filter (amidi/open-outputs-if-needed!)))
         identity (when (every? some? [port-in port-out]) (identify port-in port-out))]
@@ -772,6 +790,7 @@
   detected."
   [show device-filter & args]
   {:pre [(have? some? show) (have? some? device-filter)]}
+  @controller-binding-loader  ; Make sure controller implementations are finished registering
   (let [idle (atom true)
         controller (atom nil)]
     (letfn [(disconnection-handler []
@@ -816,12 +835,3 @@
          :device-filter device-filter
          :cancel cancel-handler}
         {:type ::watcher}))))
-
-;; Load all the built-in controller implementations, so they can register their recognizers.
-(at-at/after 50 (fn []
-                  (require 'afterglow.controllers.ableton-push)
-                  (require 'afterglow.controllers.ableton-push-2)
-                  (require 'afterglow.controllers.launchpad-pro)
-                  (require 'afterglow.controllers.launchpad-mini)
-                  (require 'afterglow.controllers.launchpad-mk2))
-             pool :desc "Register built-in grid controller implementations")


More sane generators

More sane generators

--- test/github_changelog/schema_generators.clj
+++ test/github_changelog/schema_generators.clj
@@ -1,12 +1,22 @@
 (ns github-changelog.schema-generators
   (:require [clojure.string :refer [join]]
             [clojure.test.check.generators :as gen]))
+
+(def string-std (gen/not-empty gen/string-alphanumeric))

 (def hexadecimal (gen/elements "0123456789ABCDEF"))

 (def sha (gen/fmap join (gen/vector hexadecimal 40)))

-(def issue (gen/tuple gen/string gen/string))
+(def issue (gen/tuple string-std string-std))
+
+(def revert-title (gen/fmap (partial format "Revert %s") string-std))
+
+(def revert-body (gen/fmap (partial apply format "Reverts %s/%s#%d")
+                           (gen/tuple string-std string-std gen/nat)))
+
+(def string-title (gen/fmap (partial apply format "%s(%s): %s")
+                            (gen/tuple string-std string-std string-std)))

 (defn complete
   ([gen] #(complete % gen))
@@ -19,8 +29,8 @@
      (def ~(symbol (str "complete-" fn-name)) (complete ~fn-name))))

 (defgen config
-  :user gen/string
-  :repo gen/string)
+  :user string-std
+  :repo string-std)

 (defgen semver
   :major gen/nat
@@ -28,19 +38,33 @@
   :patch gen/nat)

 (defgen pull
-  :title (gen/not-empty gen/string-alphanumeric)
+  :title string-std
   :number gen/nat
   :sha sha
-  :body gen/string
-  :html_url gen/string)
+  :body string-std
+  :html_url string-std)
+
+(defgen valid-pull
+  :title string-title
+  :number gen/nat
+  :sha sha
+  :body string-std
+  :html_url string-std)
+
+(defgen revert-pull
+  :title revert-title
+  :number gen/nat
+  :sha sha
+  :body revert-body
+  :html_url string-std)

 (defgen change
-  :type gen/string
-  :scope gen/string
-  :subject gen/string
+  :type gen/string-ascii
+  :scope gen/string-ascii
+  :subject gen/string-ascii
   :pull-request pull
   :issues (gen/vector issue))

 (defgen tag
-  :name (gen/not-empty gen/string-alphanumeric)
+  :name string-std
   :sha sha)


order the (require)'s

order the (require)'s

--- src/babel/italiano/writer.clj
+++ src/babel/italiano/writer.clj
@@ -6,9 +6,9 @@
 (require '[babel.italiano.lexicon :refer [lexicon]])
 (require '[babel.italiano.morphology :as morph])
 (require '[babel.writer :as writer :refer [process write-lexicon]])
+(require '[clojure.string :refer [join]])
 (require '[clojure.tools.logging :as log])
 (require '[dag_unify.core :refer (fail? get-in strip-refs unify)])
-(require '[clojure.string :refer [join]])

 (defn expression [spec]
   (engine/expression small spec))


Fix generate-metadata-dates fn

Fix generate-metadata-dates fn

--- umm-spec-lib/src/cmr/umm_spec/umm_to_xml_mappings/dif10.clj
+++ umm-spec-lib/src/cmr/umm_spec/umm_to_xml_mappings/dif10.clj
@@ -171,16 +171,16 @@
   are required in DIF10 so use defaults if not present"
   [c]
   (remove nil? (list
-    [:Metadata_Creation (f/unparse (f/formatters :date)
-                                   (date/with-default-date (date/metadata-create-date c)))]
-    [:Metadata_Last_Revision (f/unparse (f/formatters :date)
-                                        (date/with-default-date (date/metadata-update-date c)))]
-    (if (date/metadata-review-date c)
-      [:Metadata_Future_Review (f/unparse (f/formatters :date)
-                                          (date/metadata-review-date c))])
-    (if (date/metadata-review-date c)
-      [:Metadata_Delete (f/unparse (f/formatters :date)
-                                   (date/metadata-delete-date c))]))))
+                [:Metadata_Creation (f/unparse (f/formatters :date)
+                                               (date/with-default-date (date/metadata-create-date c)))]
+                [:Metadata_Last_Revision (f/unparse (f/formatters :date)
+                                                    (date/with-default-date (date/metadata-update-date c)))]
+                (when (date/metadata-review-date c)
+                  [:Metadata_Future_Review (f/unparse (f/formatters :date)
+                                                      (date/metadata-review-date c))])
+                (when (date/metadata-delete-date c)
+                  [:Metadata_Delete (f/unparse (f/formatters :date)
+                                               (date/metadata-delete-date c))]))))

 (defn- generate-related-urls
   "Returns DIF10 Related_URLs for the provided UMM-C collection record. Even though UMM RelatedUrls