Leverage util fn

Leverage util fn


Add more specs to image collections events.

--- frontend/src/uxbox/main/data/images.cljs
+++ frontend/src/uxbox/main/data/images.cljs
@@ -28,9 +28,18 @@
 (s/def ::mimetype string?)
 (s/def ::thumbnail us/url-str?)
 (s/def ::id uuid?)
+(s/def ::version integer?)
 (s/def ::url us/url-str?)
 (s/def ::collection (s/nilable uuid?))
 (s/def ::user uuid?)
+
+(s/def ::collection-entity
+  (s/keys :req-un [::id
+                   ::name
+                   ::created-at
+                   ::modified-at
+                   ::user
+                   ::version]))

 (s/def ::image-entity
   (s/keys :req-un [::id
@@ -42,6 +51,7 @@
                    ::mimetype
                    ::thumbnail
                    ::url
+                   ::version
                    ::collection
                    ::user]))

@@ -98,6 +108,7 @@

 (defn collections-fetched
   [items]
+  {:pre [(us/valid? (s/every ::collection-entity) items)]}
   (CollectionsFetched. items))

 ;; --- Fetch Color Collections
@@ -127,6 +138,7 @@

 (defn collection-created
   [item]
+  {:pre [(us/valid? ::collection-entity item)]}
   (CollectionCreated. item))

 ;; --- Create Collection
@@ -157,6 +169,7 @@

 (defn collection-updated
   [item]
+  {:pre [(us/valid? ::collection-entity item)]}
   (CollectionUpdated. item))

 ;; --- Update Collection


Improve syntax highlighting a little

Improve syntax highlighting a little

--- test/demo.cljs
+++ test/demo.cljs
@@ -33,27 +33,57 @@
     (string/join "\n"
                  (map #(% defs) names))))

-(def builtins ["def" "defn" "ns" "atom" "let" "if" "when"
+(def builtins #{"def" "defn" "ns" "atom" "let" "if" "when"
                "cond" "merge" "assoc" "swap!" "reset!" "for"
-               "range" "nil\\?" "int" "or" "->" "%"])
+               "range" "nil?" "int" "or" "->" "%" "fn"})
+
+(defn tokenize [src]
+  (let [ws " \\t\\n"
+        open "[({"
+        close ")\\]}"
+        str-p "\"[^\"]*\""
+        sep (str ws open close)
+        open-p (str "[" open "]")
+        close-p (str "[" close "]")
+        iden-p (str "[^" sep "]+")
+        any-p ".|\\n"
+        patt (re-pattern (str "("
+                              (string/join ")|(" [str-p open-p close-p
+                                                  iden-p any-p])
+                              ")"))
+        keyw-re #"^:"]
+    (for [[s str-litt open close iden any] (re-seq patt src)]
+      (cond
+       str-litt [:str-litt s]
+       open [:open s]
+       close [:close s]
+       iden (cond
+             (re-find keyw-re s) [:keyw s]
+             (builtins s) [:builtin s]
+             :else [:iden s])
+       any [:other s]))))

 (defn syntaxify [src]
-  ;; quick and (very) dirty syntax coloring
-  (let [sep "\\][(){} \\t\\n"
-        str-p "\"[^\"]*\""
-        keyw-p (str ":[^" sep "]+")
-        res-p (string/join "|" (map #(str "\\b" % "(?=[" sep "])") builtins))
-        any-p (str "[^" sep "]+|.|\\n")
-        patt (re-pattern (str "("
-                              (string/join ")|(" [str-p keyw-p res-p any-p])
-                              ")"))]
-    (apply vector :pre
-           (for [[s str keyw res] (re-seq patt src)]
-             (cond
-              str [:span {:style {:color "green"}} str]
-              keyw [:span {:style {:color "blue"}} keyw]
-              res [:b res]
-              :else s)))))
+  (let [def-re #"^def|^ns\b"]
+    (loop [tokens (tokenize src)
+           prev nil
+           res []]
+      (let [[kind val] (first tokens)
+            part (case kind
+                   :str-litt [:span {:style {:color "green"}} val]
+                   :keyw     [:span {:style {:color "blue"}} val]
+                   :builtin  [:span {:style {:font-weight "bold"}} val]
+                   :iden     (if (and prev (re-find def-re prev))
+                               [:span {:style {:color "#55c"
+                                               :font-weight "bold"}} val]
+                               val)
+                   val)
+            remain (rest tokens)]
+        (if-not (empty? remain)
+          (recur remain
+                 (if (= kind :other) prev val)
+                 (conj res part))
+          (apply vector :pre res))))))

 (defn src-for [defs]
   [:pre (syntaxify (src-for-names defs))])


Added slamhound

Added slamhound

--- .lein/profiles.clj
+++ .lein/profiles.clj
@@ -5,8 +5,11 @@
     [jonase/eastwood "0.0.2"]
     [lein-expectations "0.0.7"]
     [lein-autoexpect "0.2.5"]
-    [lein-ancient "0.4.2"]]
-;  :dependencies [[clj-stacktrace "0.2.5"]]
+    [lein-ancient "0.5 4"]]
+  :aliases {"slamhound" ["run" "-m" "slam.hound"]}
+  :dependencies [[slamhound "RELEASE"]
+                 ;[clj-stacktrace "0.2.5"]
+                 ]
 ;  :injections [(let [orig (ns-resolve (doto 'clojure.stacktrace require)
 ;                                       'print-cause-trace)
 ;                      new (ns-resolve (doto 'clj-stacktrace.repl require)


Some documentation on the sequences of maps.

--- examples/suite-classification/src/suite_classification/core.clj
+++ examples/suite-classification/src/suite_classification/core.clj
@@ -207,7 +207,7 @@
        (apply interleave)))

-(defn create-map-load-fn
+(defn- create-map-load-fn
   [image->obs label->vec]
   (let [image->obs (fn [img-path]
                        (-> (imagez/load-image img-path)
@@ -217,7 +217,23 @@
        :labels (label->vec labels)})))

-(defn create-nippy-dataset
+(defn- create-nippy-dataset
+  "For a lot of use cases, defining a dataset with clojure datastructures and saving that either to an edn file
+or to a nippy file makes the most sense.  Here is an example of building the dataset manually (not using much
+pre-built framework) and ensuring that:
+1.  The testing data is shuffled.  This means that when you look at it you see a representative sample.
+2.  The training data is both randomized and balanced.  Balancing your classification data tends to help
+things out a lot.
+
+This uses the think.parallel library so that we have infinite (augmented) data for training and that data loaded
+up to 1000 images ahead of where we are right now thus we get some ability to train and use the cpu to prepare
+data in parallel efficiently without putting much thought into it.  Using the infinite training data does imply
+a shutdown function to stop those threads at some point; but this is only really necessary if you are going to
+create a bunch of datasets.
+
+It may not be clear but there is a dataset function that takes an infinite sequence of maps and produces a
+dataset.  This is most likely the easiest and fastest way to build a dataset assuming you can produce an
+infinite sequence of maps, each map is one entry and all maps have the same keys."
   []
   (ensure-dataset-is-created)
   (when-not (.exists (io/file "mnist-dataset.nippy"))


Add missing model changes...

Add missing model changes...

--- src-clj/cljs_workspace/server.clj
+++ src-clj/cljs_workspace/server.clj
@@ -69,46 +69,8 @@
                         :BorderWidth 5
                         :BorderColor "rgb(0,0,0)"
                         :Fill "rgb(255,255,255)"
-                        :Extent {:x 300 :y 300}}
-                :submorphs [{:id 2
-                             :morph {:Position {:x 100 :y 100} :isDraggable true}
-                             :shape {:Fill "rgb(0,0,255)"
-                                     :Extent {:x 42 :y 42}}
-                             :submorphs []}
-                              {:id 6
-                               :morph {:Position {:x 200 :y 200}
-                                       :isDraggable true}
-                               :shape {:ShapeClass "Image"
-                                       :Extent {:x 256 :y 256}
-                                       :url "http://www.veryicon.com/icon/png/Game/Super%20Mario/Super%20Paper%20Mario.png"}
-                                :submorphs []}
-                            {:id 7
-                               :morph {:Position {:x 200 :y 200}
-                                       :isDraggable true}
-                               :shape {:ShapeClass "Image"
-                                       :Extent {:x 256 :y 256}
-                                       :url "http://img4.wikia.nocookie.net/__cb20111019211716/villains/images/2/23/Super_paper_mario_-_luigi_2.png"}
-                                :submorphs []}
-                             {:id 3
-                              :morph {:Position {:x 100 :y 100} :isDraggable true}
-                              :shape {:Fill "rgb(250, 250, 0)"
-                                      :ShapeClass "Ellipse"
-                                      :Extent {:x 100 :y 100}}}
-                              {:id 5
-                                :morph {:Position {:x 0 :y 0} :isDraggable true}
-                                :shape {:Extent {:x 220 :y 420}
-                                        :BorderColor "rgb(92,77, 11)"
-                                        :BorderWidth 2
-                                        :Fill "rgb(255,244,194)"}
-                                :submorphs [
-                                      {:id 4
-                                       :morph {:Preserve true
-                                               :MorphClass "Text"
-                                               :Position {:x 10 :y 10}
-                                               :TextString "Hallo Welt! Write something!"
-                                               :isDraggable true}
-                                       :shape {:ShapeClass "Text"
-                                               :Extent {:x 200 :y 400}}}]}]}}))
+                        :Extent {:x 510 :y 410}}
+                :submorphs [mario-world mario luigi subtitle]}}))

 (defn set-app-state [params origin]
   (prn origin)


remove the reverse call in plugin diff ordering

Signed-off-by: Chris Granger <5654cde260ae99bc4d30054171b8bcd902efd19a@gmail.com>

--- src/lt/objs/plugins.cljs
+++ src/lt/objs/plugins.cljs
@@ -601,7 +601,6 @@
                             dep-graph (plugin-dependency-graph plugins)
                             dep-ordered (-> dep-graph
                                             (kahn/kahn-sort)
-                                            (reverse)
                                             (seq))
                             mapped (if dep-ordered
                                      (map plugins dep-ordered)


Add potok dependency.

Add potok dependency.

--- frontend/project.clj
+++ frontend/project.clj
@@ -9,7 +9,7 @@

   :profiles {:dev {:source-paths ["dev"]}}

-  :dependencies [[org.clojure/clojure "1.9.0-alpha13" :scope "provided"]
+  :dependencies [[org.clojure/clojure "1.9.0-alpha14" :scope "provided"]
                  [org.clojure/clojurescript "1.9.293" :scope "provided"]

                  ;; Build
@@ -22,6 +22,7 @@
                  [cljsjs/react-dom "15.4.0-0"]
                  [cljsjs/react-dom-server "15.4.0-0"]
                  [cljsjs/moment "2.15.2-3"]
+                 [funcool/potok "1.0.0"]
                  [funcool/struct "1.0.0"]
                  [funcool/lentes "1.2.0"]
                  [funcool/beicon "2.5.0"]


(TK-148) Added comment about QueuedThreadPool double-construction

This commit includes a comment in the code about the reason why a
second `QueuedThreadPool` is constructed for the case where a
`queue-max-size` is configured for a server.

--- src/puppetlabs/trapperkeeper/services/webserver/jetty9_core.clj
+++ src/puppetlabs/trapperkeeper/services/webserver/jetty9_core.clj
@@ -281,6 +281,22 @@
                         (QueuedThreadPool. max-threads)
                         (QueuedThreadPool.))]
       (if queue-max-size
+        ;; The code below is definitely not ideal, but there isn't a way to set
+        ;; the maximum capacity of the QueuedThreadPool's BlockingArrayQueue
+        ;; after construction.  We're trying to avoid hard-coding our own
+        ;; defaults for other settings that we want Jetty to control, e.g., the
+        ;; initial capacity of the queue and minimum number of threads.  By
+        ;; reconstructing the QueuedThreadPool here, we can use Jetty's defaults
+        ;; for settings unrelated to `queue-max-size`.  QueuedThreadPool and
+        ;; BlockingArrayQueue construction isn't too expensive.  It mostly
+        ;; involves some initial memory allocations.  The more expensive work -
+        ;; where threads are actually started and the queue expands to fulfill
+        ;; new requests - would only happen after the QueuedThreadPool were
+        ;; started.  That won't happen for the `thread-pool` instance from
+        ;; above, which just gets thrown away as this function falls out of
+        ;; scope without ever having been started.  Also, this function would
+        ;; likely only be called once per server startup where a
+        ;; `queue-max-size` were configured.
         (let [min-threads    (.getMinThreads thread-pool)
               queue-min-size (min queue-max-size min-threads)]
           (QueuedThreadPool. (.getMaxThreads thread-pool)


Use set-screen-wrapper! function

Use set-screen-wrapper! function

--- src/nightmod/sandbox.clj
+++ src/nightmod/sandbox.clj
@@ -4,7 +4,8 @@
             [clojail.testers :as jail-test]
             [clojure.java.io :as io]
             [nightmod.screens :as s]
-            [nightmod.utils :as u])
+            [nightmod.utils :as u]
+            [play-clj.core :refer :all])
   (:import [java.io FilePermission]
            [java.lang.reflect ReflectPermission]))

@@ -28,7 +29,7 @@
        agent send send-off
        pmap pcalls
        System/out System/in System/err
-       set-screen! setScreen app! app on-gl})
+       set-screen-wrapper! set-screen! setScreen app! app on-gl})
    (jail-test/blacklist-nses '[clojure.main])
    (jail-test/blanket "clojail")])

@@ -64,13 +65,13 @@
       sb
       (try (catch Exception e (reset! u/error e)))))

-(intern 'play-clj.core
-        'wrapper
-        (fn [screen f]
-          (if (or (= screen (:screen s/main-screen))
-                  (= screen (:screen s/overlay-screen)))
-            (f)
-            (try
-              (jvm/jvm-sandbox f context)
-              (catch Exception e
-                (when (nil? @u/error) (reset! u/error e)))))))
+(set-screen-wrapper!
+  (fn [screen screen-fn]
+    (if (or (= screen (:screen s/main-screen))
+            (= screen (:screen s/overlay-screen)))
+      (screen-fn)
+      (try
+        (jvm/jvm-sandbox screen-fn context)
+        (catch Exception e
+          (when (nil? @u/error)
+            (reset! u/error e)))))))


ex result contains profile

ex result contains profile

--- src/ontrail/exercise.clj
+++ src/ontrail/exercise.clj
@@ -40,6 +40,7 @@
            bare-ex {:id id
                     :user user
                     :isNew (is-new exercise last-visit)
+                    :userProfile  user-profile
                     :distance distance
                     :title (:title exercise)
                     :body (:body exercise)


Decorated exercise template

Decorated exercise template

--- src/ontrail/exercise.clj
+++ src/ontrail/exercise.clj
@@ -72,17 +72,28 @@
 (defn get-ex [id]
   (let [exercise (mc/find-one-as-map EXERCISE {:_id (ObjectId. id)})]
     (if (= nil exercise)
-      {:error "No such id"}
-      (let [user-profile (get (mc/find-one-as-map ONUSER {:username (get exercise :user)}) :profile)
-            heart-rate-reserve (get-heart-rate-reserve exercise user-profile)]
+      {:error "No such id"}
+      (let [user (:user exercise)
+            user-profile (:profile (mc/find-one-as-map ONUSER {:username user}))
+            heart-rate-reserve (get-heart-rate-reserve exercise user-profile)
+            comments (:comments exercise)
+            comment-count (if (list? comments) (count comments) 0)
+            avatar (get-avatar-url user)
+            date (to-human-date (:creationDate exercise))]
         (log "DEBUG" "ex " id)
         {:id id
+         :user user
          :title (:title exercise)
          :body (:body exercise)
          :tags (:tags exercise)
+         :did (get-verb (:sport exercise))
+         :sport (:sport exercise)
+         :avatar avatar
+         :date date
          :duration (to-human-time (:duration exercise))
          :creationDate (to-human-date (:creationDate exercise))
          :avghr (:avghr exercise)
          :hr-reserve heart-rate-reserve
          :pace (get-pace exercise)
-         :comments (:comments exercise)}))))+         :commentCount comment-count
+         :comments comments}))))


Add more cached server info functions:

Add more cached server info functions:

* server-radians-per-sample
* server-control-dur
* server-control-rate
* server-sample-dur

--- src/overtone/sc/info.clj
+++ src/overtone/sc/info.clj
@@ -7,11 +7,15 @@
         [overtone.sc.machinery.allocator]
         [overtone.helpers lib]))

-(defonce output-bus-count* (atom nil))
-(defonce input-bus-count*  (atom nil))
-(defonce audio-bus-count*  (atom nil))
-(defonce buffer-count*     (atom nil))
-(defonce sample-rate*      (atom nil))
+(defonce output-bus-count*   (atom nil))
+(defonce input-bus-count*    (atom nil))
+(defonce audio-bus-count*    (atom nil))
+(defonce buffer-count*       (atom nil))
+(defonce sample-rate*        (atom nil))
+(defonce sample-dur*         (atom nil))
+(defonce control-rate*       (atom nil))
+(defonce control-dur*        (atom nil))
+(defonce radians-per-sample* (atom nil))

 (defonce __SERVER-INFO__
   (defsynth snd-server-info
@@ -33,11 +37,13 @@
                 response-id)))

 (defn server-info
-  "Fetches a bunch of useful server info. Has to trigger and poll a synth to
-  fetch data. See #'server-num-output-buses, #'server-num-input-buses,
-  #'server-num-audio-buses and #'sever-num-buffers for fast cached versions
-  of the static values in this info map. Note, the number of running synths
-  will also include the synth used to obtain this information."
+  "Fetches a bunch of useful server info. Has to trigger and poll a
+  synth to fetch data. See #'server-num-output-buses,
+  #'server-num-input-buses, #'server-num-audio-buses and
+  #'server-num-buffers #'server-sample-rate, #'server-sample-dur,
+  #'server-control-rate, #'server-control-dur for fast cached versions
+  of the static values in this info map. Note, the number of running
+  synths will also include the synth used to obtain this information."
   []
   (ensure-connected!)
   (let [prom        (promise)
@@ -69,13 +75,40 @@
       res)))

 (defn server-sample-rate
-  "Returns the sample rate of the server. This number is cached for a given
-  running server for the duration of boot"
+  "Returns the sample rate of the server. This number is cached for a
+   given running server for the duration of boot"
   []
   (if-let [rate @sample-rate*]
     rate
     (let [info (server-info)]
       (reset! sample-rate* (:sample-rate info)))))
+
+(defn server-sample-dur
+  "Returns the sample duration of the server. This number is cached for
+   a given running server for the duration of boot"
+  []
+  (if-let [rate @sample-dur*]
+    rate
+    (let [info (server-info)]
+      (reset! sample-dur* (:sample-dur info)))))
+
+(defn server-control-rate
+  "Returns the control rate of the server. This number is cached for a
+   given running server for the duration of boot"
+  []
+  (if-let [rate @control-rate*]
+    rate
+    (let [info (server-info)]
+      (reset! control-rate* (:control-rate info)))))
+
+(defn server-control-dur
+  "Returns the control duration of the server. This number is cached for
+   a given running server for the duration of boot"
+  []
+  (if-let [rate @control-dur*]
+    rate
+    (let [info (server-info)]
+      (reset! control-dur* (:control-dur info)))))

 (defn server-num-output-buses
   "Returns the number of output buses accessible by the server. This number may
@@ -117,9 +150,25 @@
     (let [info (server-info)]
       (reset! buffer-count*  (:num-buffers info)))))

+(defn server-radians-per-sample
+  "Returns the number of radians per sample on the server. This number
+  may change depending on host architecture but is cached for a given
+  running server for the duration of boot."
+  []
+  (if-let [num @radians-per-sample*]
+    num
+    (let [info (server-info)]
+      (reset! radians-per-sample* (:radians-per-sample info)))))
+
+
 (on-sync-event :shutdown (fn [event-info]
                            (reset! output-bus-count* nil)
                            (reset! input-bus-count* nil)
                            (reset! audio-bus-count* nil)
-                           (reset! buffer-count* nil))
+                           (reset! buffer-count* nil)
+                           (reset! sample-rate* nil)
+                           (reset! sample-dur* nil)
+                           (reset! control-rate* nil)
+                           (reset! control-dur* nil)
+                           (reset! radians-per-sample* nil))
                ::reset-cached-server-info)


make rebindable ugen vars dynamic

make rebindable ugen vars dynamic

--- src/overtone/sc/ugen.clj
+++ src/overtone/sc/ugen.clj
@@ -83,10 +83,8 @@
     (doseq [check (:check spec)]
       (check rate special args))))

-
-
-(def *ugens* nil)
-(def *constants* nil)
+(def ^{:dynamic true} *ugens* nil)
+(def ^{:dynamic true} *constants* nil)

 (defn ugen [spec rate special args]
   "Create a SCUGen with the specified spec, rate, special and args"


Add more image attributes

Add more image attributes

--- src/play_clj/core_2d.clj
+++ src/play_clj/core_2d.clj
@@ -40,8 +40,13 @@
               (TextureRegion. ^TextureRegion val))]
     (doseq [[k v] options]
       (case k
+        :x (.setRegionX img v)
+        :y (.setRegionY img v)
         :width (.setRegionWidth img v)
         :height (.setRegionHeight img v)
+        :region (.setRegion img
+                  ^long (nth v 0) ^long (nth v 1)
+                  ^long (nth v 2) ^long (nth v 3))
         nil))
     img))


Corrected indentation

Corrected indentation

--- src/polismath/server.clj
+++ src/polismath/server.clj
@@ -394,8 +394,8 @@
       (do
         (handle-completion! aws-cred filename params)
         (assoc-in (response/file-response (full-path filename))
-                   [:headers "Content-Disposition"]
-                   (str "attachment; filename=" \" filename \")))
+                  [:headers "Content-Disposition"]
+                  (str "attachment; filename=" \" filename \")))
       ;; Otherwise, the timeout hit, and we should trigger the check back later lifecycle
       :else
       (do


adding feature enable back

adding feature enable back

--- src/proxmox/provider.clj
+++ src/proxmox/provider.clj
@@ -2,7 +2,7 @@
   (:use
     [trammel.core :only  (defconstrainedrecord)]
     [clojure.core.memoize :only (memo-ttl)]
-    [taoensso.timbre :only (debug info error warn)]
+    [taoensso.timbre :only (debug info error warn trace)]
     [clojure.core.strint :only (<<)]
     [celestial.core :only (Vm )]
     [celestial.ssh :only (execute)]
@@ -76,7 +76,9 @@
   (when-let [features (:features spec)]
     ;vzctl set 170 --features "nfs:on" --save
     (doseq [f features]
+      (trace "enabling feature" f)
       (vzctl this (<< "set ~{vmid} --features \"~{f}\" --save")))) )
+

 (defn key-set [h] (->> h keys (into #{})))

@@ -91,8 +93,7 @@
           (try+
             (let [cleanend-spec (select-keys spec create-req-keys)]
                (check-task node (prox-post (str "/nodes/" node "/openvz") cleanend-spec)))
-            ; TODO enable this later
-            ;(enable-features this spec)
+            (enable-features this spec)
             (catch [:status 500] e
               (warn "Container already exists" e))))

@@ -130,6 +131,6 @@

 (defn vzctl
   [this action]
-  {:pre [(= (.status this) "running")]}
+  ; {:pre [(= (.status this) "running")]}
   (execute (config :hypervisor) [(<< "vzctl ~{action}")]))


generators and tests

generators and tests

--- src/qcjs/generators.cljs
+++ src/qcjs/generators.cljs
@@ -22,6 +22,13 @@
 (def non-empty-strings (.. qc/generator -string -nonEmptys))
 (def strings (.. qc/generator -string -strings))

+(defgenerator monotonic [from]
+  (let [n (atom (dec from))]
+    {:func (fn [size] (swap! n inc))}))
+
+(defgenerator gensyms []
+  {:func (fn [size] (gensym "qcjs"))})
+
 (defshrink vec-shrink-one [size v]
   (cond
     (or (not v) (empty? v)) []
@@ -39,15 +46,89 @@
            (let [lsize (qc/getPositiveInteger size)]
              (vec
                (for [i (range (if min-size
-                                (.max js/Math lsize min-size)
+                                (max lsize min-size)
                                 lsize))]
                  (qc/generateValue gen size)))))
    :shrink (or shrink vec-shrink-one)})

 ;<?
-(qc/qcheck "vectors min-size" [(integers) (integers)]
+(qc/qcheck "vectors min-size" [(+integers) (+integers)]
   (fn [c n min]
-    (let [res (qc/generateValue (vectors (strings) nil min) n)]
+    (let [res (qc/generateValue (vectors (nils) nil min) n)]
       (.noteArg c res)
       (.assert c (<= min (count res))))))
+
+(qc/qcheck "vec-shrink-one" [(vectors (integers))]
+  (fn [c v]
+    (let [res (vec-shrink-one 0 v)]
+      (.noteArg c res)
+      (if (= 0 (count v))
+        (.assert c (= [] (vec res)))
+        (.assert c (apply = (dec (count v)) (map count (vec res))))))))
 ;?>
+
+(defgenerator vectors-of-size [gens & [shrink]]
+  {:func (fn [size] (vec (map #(qc/generateValue % size) gens)))
+   :shrink shrink})
+
+;<?
+(qc/qcheck "vectors-of-size size" [(+integers) (+integers)]
+  (fn [c n s]
+    (let [res (qc/generateValue (vectors-of-size (repeat n (integers))) s)]
+      (.noteArg c res)
+      (.assert c (= n (count res))))))
+;?>
+
+
+(defn non-empty-vectors [gen & [shrink]]
+  (vectors gen shrink 1))
+
+;<?
+(qc/qcheck "non-empty-vectors are not empty" [(+integers)]
+  (fn [c s]
+    (let [res (qc/generateValue (non-empty-vectors (integers)) s)]
+      (.noteArg c res)
+      (.assert c (seq res)))))
+;?>
+
+(defshrink map-shrink-one [size m]
+  (cond
+    (or (not m) (empty? m)) []
+    (= 1 (count m)) [{}]
+    :else
+    (vec
+      (for [k (keys m)]
+        (dissoc m k)))))
+
+(defgenerator maps [key-gen val-gen & [shrink & [min-size]]]
+  {:func (fn [size]
+           (let [msize (qc/getPositiveInteger size)]
+             (apply hash-map
+                    (apply concat
+                      (for [i (range (if min-size
+                                       (max msize min-size)
+                                       msize))]
+                        [(qc/generateValue key-gen size)
+                         (qc/generateValue val-gen size)])))))
+   :shrink (or shrink map-shrink-one)})
+
+;<?
+(qc/qcheck "maps min-size" [(+integers) (+integers)]
+  (fn [c min s]
+    (let [res (qc/generateValue (maps (monotonic) (strings) nil min) s)]
+      (.noteArg c res)
+      (.assert c (<= min (count res))))))
+
+(qc/qcheck "map-shrink-one" [(maps (gensyms) (integers))]
+  (fn [c m]
+    (let [res (vec (map-shrink-one 0 m))]
+      (.noteArg c res)
+      (if (= 0 (count m))
+        (.assert c (= [] res))
+        (do
+          (.assert c (apply = (dec (count m)) (map count res)))
+          (.assert c (= (count res) (count (set res)))))))))
+;?>
+
+(defn non-empty-maps [key-gen val-gen & [shrink]]
+  (maps gen shrink 1))


Comment change

Comment change

--- src/re_frame/events.cljc
+++ src/re_frame/events.cljc
@@ -92,12 +92,11 @@
   (let [event-id    (first-in-vector event-v)
         handler-fn  (lookup-handler event-id)]
     (if (nil? handler-fn)
-      (console :error "re-frame: no event handler registered for: \"" event-id
-               "\". Ignoring.")
-      (if  *handling*
+      (console :error "re-frame: no event handler registered for: \"" event-id "\". Ignoring.")
+      (if *handling*
         (console :error "re-frame: while handling \""  *handling*
                  "\"  dispatch-sync was called for \"" event-v
-                 "\". You can't call dispatch-sync in an event handler.")
+                 "\". You can't call dispatch-sync within an event handler.")
         (binding [*handling*  event-v]
           (let [stack (some-> event-v
                               meta


doc string edits

doc string edits

--- src/re_frame/router.cljs
+++ src/re_frame/router.cljs
@@ -185,11 +185,10 @@
 ;;

 (defn dispatch
-  "Send an event to be processed by the registered handler.
+  "Queue an event to be processed by the registered handler.

   Usage example:
-     (dispatch [:delete-item 42])
-  "
+     (dispatch [:delete-item 42])"
   [event-v]
   (if (nil? event-v)
     (error "re-frame: \"dispatch\" is ignoring a nil event.")
@@ -198,8 +197,9 @@

 (defn dispatch-sync
-  "Send an event to be processed by the registered handler, but avoid the async-inducing
-  use of core.async/chan.
+  "Send an event to be processed by the registered handler
+  immediately. Note: dispatch-sync may not be called while another
+  event is being handled.

   Usage example:
      (dispatch-sync [:delete-item 42])"


Add first draft of encoding influxdb lince protocol

--- src/riemann/influxdb.clj
+++ src/riemann/influxdb.clj
@@ -14,6 +14,26 @@
   "A set of event fields in Riemann with special handling logic."
   #{:host :service :time :metric :tags :ttl})

+(defn replace-disallowed [field]
+  (clojure.string/replace
+    (clojure.string/replace
+      (clojure.string/replace field " " "\\ ") "=" "\\=") "," "\\,"))
+(defn kv-encode [kv]
+  (clojure.string/join "," (map (fn [[key value]]
+   (str key "=" value)) kv)))
+
+(defn lineprotocol-encode [event]
+  (let [encoded_fields (kv-encode (get event "fields"))
+        encoded_tags  (kv-encode (get event "tags"))]
+
+    (str (get event "name") " " encoded_fields  "\n")))
+
+
+(defn lineprotocol-encode-list [events]
+  ; encode {"points" [{"name" "xyzzy", "time" "2015-06-26T07:06:45.000Z", "tags" {"host" "h"}, "fields" {"value" 0.6514667122989345, "state" "ok", "description" "at 2015-06-26 09:06:45 +0200"}}], "database" "foo"}
+  ; [{"name" "xyzzy", "time" "2015-06-26T07:06:45.000Z", "tags" {"host" "h"}, "fields" {"value" 0.6514667122989345, "state" "ok", "description" "at 2015-06-26 09:06:45 +0200"}}]
+  ; {"name" "xyzzy", "time" "2015-06-26T07:06:45.000Z", "tags" {"host" "h"}, "fields" {"value" 0.6514667122989345, "state" "ok", "description" "at 2015-06-26 09:06:45 +0200"}}
+  (clojure.string/join (pmap lineprotocol-encode (get events "points"))))

 (defn event-tags
   "Generates a map of InfluxDB tags from a Riemann event. Any fields in the
@@ -146,7 +166,7 @@
   `:timeout`        HTTP timeout in milliseconds. (default: `5000`)"
   [opts]
   (let [write-url
-        (format "%s://%s:%s/write" (:scheme opts) (:host opts) (:port opts))
+        (format "%s://%s:%s/write?db=%s" (:scheme opts) (:host opts) (:port opts) (:db opts))

         payload-base
         (cond->
@@ -160,7 +180,7 @@
         (cond->
           {:socket-timeout (:timeout opts 5000) ; ms
            :conn-timeout   (:timeout opts 5000) ; ms
-           :content-type   :json}
+           :content-type   "application/x-www-form-urlencoded"}
           (:username opts)
             (assoc :basic-auth [(:username opts)
                                 (:password opts)]))
@@ -173,8 +193,8 @@
         (when-not (empty? points)
           (->> points
                (assoc payload-base "points")
-               (json/generate-string)
-               (assoc http-opts :body)
+               (lineprotocol-encode-list)
+               (assoc http-opts :Ω)
                (http/post write-url)))))))


don't do anything when you try to join a room you're already in

--- src/subrosa/commands.clj
+++ src/subrosa/commands.clj
@@ -135,7 +135,9 @@
               keys (.split (or keys "") ",")]
           (dosync
            (doseq [[room-name key] (partition-all 2 (interleave-all
-                                                     rooms keys))]
+                                                     rooms keys))
+                   :when (not (nick-in-room? (nick-for-channel channel)
+                                             room-name))]
              (add-nick-to-room! (nick-for-channel channel) room-name)
              (send-to-room room-name (format ":%s JOIN %s"
                                              (format-client channel)


Housekeeping: 47b5d25

Housekeeping: 47b5d25

--- src/taoensso/faraday.clj
+++ src/taoensso/faraday.clj
@@ -152,7 +152,7 @@
   (assert-precision "12345678901234567890123456789012345678")
   (assert-precision 10))

-(defn- ddb-native-num? [x]
+(defn- ddb-num? [x]
   "Is `x` a number type natively storable by DynamoDB? Note that DDB stores _all_
   numbers as exact-value strings with <= 38 digits of precision. For greater
   precision, use `freeze`.
@@ -166,7 +166,7 @@
       (and (instance? BigDecimal x) (assert-precision x))
       (and (instance? BigInteger x) (assert-precision x))))

-(defn- num->ddb-native-num
+(defn- num->ddb-num
   "Coerce any special Clojure types that'd trip up the DDB Java client."
   [x]
   (cond (instance? BigInt x) (biginteger x)
@@ -197,16 +197,16 @@
        (throw (Exception. "Invalid DynamoDB value: \"\""))
        (doto (AttributeValue.) (.setS s))))

-   (ddb-native-num? x) (doto (AttributeValue.) (.setN (str x)))
-   (freeze?         x) (doto (AttributeValue.) (.setB (nt-freeze x)))
+   (ddb-num? x) (doto (AttributeValue.) (.setN (str x)))
+   (freeze?  x) (doto (AttributeValue.) (.setB (nt-freeze x)))

    (set? x)
    (if (empty? x)
      (throw (Exception. "Invalid DynamoDB value: empty set"))
      (cond
-      (every? stringy?        x) (doto (AttributeValue.) (.setSS (mapv encore/fq-name x)))
-      (every? ddb-native-num? x) (doto (AttributeValue.) (.setNS (mapv str  x)))
-      (every? freeze?         x) (doto (AttributeValue.) (.setBS (mapv nt-freeze x)))
+      (every? stringy? x) (doto (AttributeValue.) (.setSS (mapv encore/fq-name x)))
+      (every? ddb-num? x) (doto (AttributeValue.) (.setNS (mapv str  x)))
+      (every? freeze?  x) (doto (AttributeValue.) (.setBS (mapv nt-freeze x)))
       :else (throw (Exception. (str "Invalid DynamoDB value: set of invalid type"
                                     " or more than one type")))))


handle english exceptions correctly

handle english exceptions correctly

--- src/babel/english/morphology.cljc
+++ src/babel/english/morphology.cljc
@@ -413,11 +413,14 @@
          stem (replace root #"^to " "")
          last-stem-char-is-e (re-find #"e$" stem)
          penultimate-stem-char-is-vowel (re-find #"[aeiou].$" stem)
-         last-stem-char-is-vowel (re-find #"[aeiou]$" stem)]
+         last-stem-char-is-vowel (re-find #"[aeiou]$" stem)
+         exception? (get-in word [:exception] false)]
      (log/debug "+else")
      (log/debug (str "(english):word: " word))
      (cond

+       exception? stem
+
       (and (= person :1st) (= number :sing)
            (string? (get-in word '(:present :1sing))))
       (get-in word '(:present :1sing))


set file permissions in import_file

set file permissions in import_file

--- src/brainbot/nozzle/esconnect.clj
+++ src/brainbot/nozzle/esconnect.clj
@@ -142,17 +142,29 @@
              {:lastmodified (:mtime e)
               :parent parent-id})))

+(defn simplify-permissions-for-es
+  [permissions]
+  (let [{allowed true denied false}
+            (misc/remap #(sort (set (map :sid %)))
+                        (group-by :allow permissions))]
+    {true (or allowed '("NOBODY"))
+     false (or denied '("UNAUTHENTICATED"))}))  ;; XXX why can't we have the same default values
+

 (defn simple-import_file
-  [fs es-index {directory :directory {relpath :relpath :as entry} :entry :as body} {publish :publish}]
+  [fs es-index {:keys [directory entry] :as body} {publish :publish}]
   (let [parent-id (make-id "" directory)
-        id (make-id "" directory relpath)]
-
-    (println "simple-import-file" fs id)
+        id (make-id "" directory (:relpath entry))
+        simple-perms (simplify-permissions-for-es (:permissions entry))]
+
+    (println "simple-import-file" fs id entry)
+    (println "permissions" simple-perms)

     (esd/put es-index "doc"
              id
              {:parent parent-id
+              :allow_token_document (simple-perms true)
+              :deny_token_document (simple-perms false)
               :lastmodified (get-in entry [:stat :mtime])})))


Fix copyright and email address.

Fix copyright and email address.

--- src/circleci/web/views/common.clj
+++ src/circleci/web/views/common.clj
@@ -72,10 +72,7 @@
               [:div#footer_wrap
                [:div#footer
                 [:div.box_wide.separator_r
-                 (unordered-list {:id "nav_footer"}
-                  [(link-to "/" "Home")
-                   (link-to "/signup" "Signup")])
-                 [:p#copyright "Copyright © 2011 CircleCI"]]
+                 [:p#copyright "Copyright © 2011 Circle"]]
                 [:div#social_info.box_small.separator_r
                  [:ul
                   [:li#twitter [:a {:href "#"} "follow us"] " on twitter"]
@@ -83,5 +80,5 @@
                 [:div#contact_info.box_small
                  [:h5 "Contact"
                   (unordered-list
-                   ["arohner@gmail.com"])]]
+                   ["questions@circleci.com"])]]
                 [:div.clear]]]]))


Add Cascalog query for converting Hansen 2010 data to common data format.

--- src/clj/forma/hadoop/jobs/cdm.clj
+++ src/clj/forma/hadoop/jobs/cdm.clj
@@ -30,6 +30,16 @@
   [thresh series]
   (first (positions (partial <= thresh) series)))

+(defn hansen->cdm
+  "Returns a Cascalog query for converting Hansen data to the common data format."
+  [hansen-source out-t-res map-zoom]
+  (let [epoch-period (date/datetime->period out-t-res "2000-01-01")
+        hansen-end-period (date/datetime->period out-t-res "2010-12-31")]
+    (<- [?x ?y ?z ?p]
+        (hansen-source ?lat ?lon _)
+        (- hansen-end-period epoch-period :> ?p)
+        (latlon->tile ?lat ?lon map-zoom :> ?x ?y ?z))))
+
 (defn forma->cdm
   "Output x,y,z and period of first detection greater than threshold, per
    specification of common data model with Vizzuality.


Don't set the base dir on start server from the catacumba testing macros.

--- src/clojure/catacumba/testing.clj
+++ src/clojure/catacumba/testing.clj
@@ -29,8 +29,7 @@
 (defmacro with-server
   "Evaluate code in context of running catacumba server."
   [{:keys [handler sleep] :or {sleep 50} :as options} & body]
-  `(let [options# (merge {:basedir "."} ~options)
-         server# (ct/run-server ~handler options#)]
+  `(let [server# (ct/run-server ~handler ~options)]
      (try
        ~@body
        (finally


cleanup service edit form

cleanup service edit form

--- src/cljs/swarmpit/component/service/edit.cljs
+++ src/cljs/swarmpit/component/service/edit.cljs
@@ -66,13 +66,11 @@
 (def init-state-mixin
   (mixin/init
     (fn [{:keys [service]}]
-      (print "mixin")
       (init-state service))))

 (rum/defc form < rum/static
                  init-state-mixin [data]
   (let [{:keys [secrets volumes service]} data]
-    (print "red")
     [:div
      [:div.form-panel
       [:div.form-panel-left


Add :random option to :knock-off-chip-off-the-old-block

--- src/clojush/pushgp/selection/preselection.clj
+++ src/clojush/pushgp/selection/preselection.clj
@@ -74,7 +74,8 @@
   unchanged. If the value is a vector of the form [diffs outof] then instead of the
   requirement being that the error vector must be diffrent from its mother's, it is
   that there must be at least diffs many different error vectors in the most recent
-  outof many."
+  outof many. If diffs is :random, then it is chosen randomly from the range from 0
+  to outof."
   [pop argmap]
   (if (not (:knock-off-chip-off-the-old-block argmap))
     pop
@@ -90,6 +91,7 @@
             changed))
         (let [diffs (first (:knock-off-chip-off-the-old-block argmap))
               outof (second (:knock-off-chip-off-the-old-block argmap))
+              diffs  (if (= diffs :random) (inc (lrand-int outof)) diffs)
               changed (vec (filter #(or (< (count (:history %)) outof)
                                         (>= (count (distinct (take outof (:history %))))
                                             diffs))


Fix imports on load ns.

Fix imports on load ns.

--- src/uxbox/data/load.cljs
+++ src/uxbox/data/load.cljs
@@ -4,6 +4,7 @@
             [uxbox.router :as r]
             [uxbox.state :as st]
             [uxbox.schema :as sc]
+            [uxbox.state.project :as stpr]
             [uxbox.data.projects :as dp]
             [bouncer.validators :as v]))

@@ -47,8 +48,8 @@
     (-apply-update [_ state]
       (if-let [data (get local-storage :data nil)]
         (as-> state $
-          (reduce dp/assoc-project $ (:projects data))
-          (reduce dp/assoc-page $ (:pages data))
+          (reduce stpr/assoc-project $ (:projects data))
+          (reduce stpr/assoc-page $ (:pages data))
           (reduce assoc-color $ (:color-collections data))
           (reduce assoc-shape $ (:shapes data)))
         state))))


hide the history input

hide the history input

--- frontend/core.cljs
+++ frontend/core.cljs
@@ -66,7 +66,7 @@
         uri-path                              (.getPath utils/parsed-uri)
         [_ maybe-deep-link]                   (re-matches #"^/app/(.*)" uri-path)
         history-path "/";;(str (.getPath (goog.Uri. js/document.location.href)) "/")
-        history-el (dommy/append! top-level-node [:input.history])
+        history-el (dommy/append! top-level-node [:input.history {:style "display:none"}])
         _ (print "history-path: " history-path)
         history-imp (doto (goog.history.Html5History.)
                       (.setUseFragment false)


something is off on the type call in the macro, removing for now

It returns a giant thing that looks like:

(function (meta,cnt,root,has_nil_QMARK_,nil_val,__hash){
this.meta = meta;
this.cnt = cnt;
this.root = root;
... (20 more lines)

--- frontend/utils.clj
+++ frontend/utils.clj
@@ -6,5 +6,5 @@
   `(do
      (let [name# (quote ~value)
            result# ~value]
-       (print name# "is" result# "(" (type result#) ")")
+       (print (pr-str name#) "is" (pr-str result#))
        result#)))


Change users to atom to a ref

Change users to atom to a ref

We need to be able to read the users db and write to it in a transaction to
prevent data integrity issues.  We could technically have a new user
overwriting an existing user's data.

--- src/ansel/db.clj
+++ src/ansel/db.clj
@@ -6,7 +6,7 @@
             [ansel.util :refer [exists? minutes pretty-json cwd in?]])
   (:import org.mindrot.jbcrypt.BCrypt))

-(def users (atom nil))
+(def users (ref nil))
 (def images (atom nil))
 (def albums (atom nil))
 (def likes (atom nil))
@@ -47,9 +47,9 @@

 (defn add-user-to-db [user]
   (dosync
-    (let [current-users @users]
+    (let [current-users (ensure users)]
       (if-not (user-exists? current-users (:username user))
-        (swap! users merge (user->entry user))))))
+        (alter users merge (user->entry user))))))

 ;; Photo management -----------------------------------------------------------

@@ -84,13 +84,14 @@
   (let [data (if (exists? "config.json")
                (parse-string (slurp "config.json") true)
                default-db)]
-    (reset! users    (:users data))
-    (reset! images   (:images data))
-    (reset! albums   (:albums data))
-    (reset! likes    (:likes data))
-    (reset! config   (:config data))
-    (reset! comments (:comments data))
-    (info "data loaded from disk")))
+    (dosync
+      (ref-set users    (:users data))
+      (reset! images    (:images data))
+      (reset! albums    (:albums data))
+      (reset! likes     (:likes data))
+      (reset! config    (:config data))
+      (reset! comments  (:comments data))
+      (info "data loaded from disk"))))

 (defn get-context []
   {:users @users


make-handler & wrapper-handler

make-handler & wrapper-handler

--- src/cwk/core.clj
+++ src/cwk/core.clj
@@ -114,22 +114,17 @@
       )
     ))

-(defmacro make-handler
+(defn make-handler []
+  (def cwk.core/routes (apply compojure.core/routes 'cwk.core/routes (vals @cwk.core/routes-map)))
+    'cwk.core/routes)
+
+(defmacro wrapped-handler
   [& wrappers]
-  `(-> ~(apply compojure.core/routes 'cwk.core/routes (vals @cwk.core/routes-map))
-       ~wrappers))
-
-(macroexpand
- `(make-handler ->
-                ring.middleware.params/wrap-params
-                (liberator.dev/wrap-trace :header :ui))
- )
-
-(make-handler
-                ring.middleware.params/wrap-params
-                (liberator.dev/wrap-trace :header :ui))
+  `(-> ~(make-handler)
+       ~@wrappers))

 (defn run
   [handler options]
   (ring.adapter.jetty/run-jetty handler options))

+


configurable :port for create-session

configurable :port for create-session

--- src/er_cassandra/session/alia.clj
+++ src/er_cassandra/session/alia.clj
@@ -30,8 +30,9 @@
     (.close alia-session)))

 (defnk create-session
-  [contact-points keyspace]
-  (let [cluster (alia/cluster {:contact-points contact-points})
+  [contact-points keyspace {port nil}]
+  (let [cluster (alia/cluster {:contact-points contact-points
+                               :port port})
         alia-session (alia/connect cluster)]
     (alia/execute alia-session (str "USE " keyspace ";"))
     (->AliaSession keyspace alia-session)))


fix variables list

fix variables list

--- src/cljs/swarmpit/component/service/form_variables.cljs
+++ src/cljs/swarmpit/component/service/form_variables.cljs
@@ -1,6 +1,6 @@
 (ns swarmpit.component.service.form-variables
   (:require [material.components :as comp]
-            [material.component.list.basic :as list]
+            [material.component.list.edit :as list]
             [swarmpit.component.state :as state]
             [sablono.core :refer-macros [html]]
             [rum.core :as rum]))


Calculate counts correctly when job killed

--- test/onyx/log/helper.clj
+++ test/onyx/log/helper.clj
@@ -11,9 +11,10 @@
       replica)))

 (defn job-allocation-counts [replica job-info]
-  (let [allocations (get-in replica [:allocations (:job-id job-info)])
-        tasks (map :id (:task-ids job-info))]
-    (map (comp count allocations) tasks)))
+  (if-let [allocations (get-in replica [:allocations (:job-id job-info)])]
+    (map (comp count allocations :id)
+         (:task-ids job-info))
+    []))

 (defn get-counts [replica job-infos]
   (map (partial job-allocation-counts replica)


fix default number of shard setting in test

--- test/wb_es/core_test.clj
+++ test/wb_es/core_test.clj
@@ -25,7 +25,7 @@
             (prn "failed to delete index.")
             (prn e)))
         (http/put index-url {:headers {:content-type "application/json"}
-                             :body (->> (assoc mappings/index-settings :number_of_shards 1)
+                             :body (->> (assoc-in mappings/index-settings [:settings :number_of_shards] 1)
                                         (json/generate-string))})
         (mount/start)
         (f)


Tries have a human-readable representation

--- modules/reitit-core/src/reitit/trie.cljc
+++ modules/reitit-core/src/reitit/trie.cljc
@@ -21,7 +21,9 @@
   (lookup [this path params])
   (get-segment [this])
   (update-segment [this subs lcs])
+  (get-data [this])
   (set-data [this data])
+  (get-chidren [this])
   (add-child [this key child])
   (insert-child [this key path-spec data]))

@@ -36,6 +38,7 @@
   (let [?wild (maybe-wild-node children)
         ?catch (maybe-catch-all-node children)
         children' (impl/fast-map children)]
+    ^{:type ::node}
     (reify
       Node
       (lookup [_ path params]
@@ -51,26 +54,36 @@
             (->Match data (assoc params param path)))))
       (get-segment [_]
         segment)
+      (get-data [_]
+        data)
       (set-data [_ data]
         (wild-node segment param children data))
+      (get-chidren [_]
+        children)
       (add-child [_ key child]
         (wild-node segment param (assoc children key child) data))
       (insert-child [_ key path-spec child-data]
         (wild-node segment param (update children key insert path-spec child-data) data)))))

 (defn- catch-all-node [segment children param data]
+  ^{:type ::node}
   (reify
     Node
     (lookup [_ path params]
       (->Match data (assoc params param path)))
     (get-segment [_]
-      segment)))
+      segment)
+    (get-data [_]
+      data)
+    (get-chidren [_]
+      children)))

 (defn- static-node [^String segment children data]
   (let [size (count segment)
         ?wild (maybe-wild-node children)
         ?catch (maybe-catch-all-node children)
         children' (impl/fast-map children)]
+    ^{:type ::node}
     (reify
       Node
       (lookup [_ path params]
@@ -87,8 +100,12 @@
         segment)
       (update-segment [_ subs lcs]
         (static-node (subs segment lcs) children data))
+      (get-data [_]
+        data)
       (set-data [_ data]
         (static-node segment children data))
+      (get-chidren [_]
+        children)
       (add-child [_ key child]
         (static-node segment (assoc children key child) data))
       (insert-child [_ key path-spec child-data]
@@ -196,3 +213,11 @@

                   :else
                   (split node path-spec data lcs))))))
+
+(defn view
+  "Returns a view representation of a prefix-tree."
+  [x]
+  (vec (concat
+         [(get-segment x)]
+         (some->> (get-chidren x) vals seq (map view))
+         (some->> (get-data x) vector))))


add single-project-component

add single-project-component

--- app/src/cljs/app/components.cljs
+++ app/src/cljs/app/components.cljs
@@ -32,3 +32,13 @@
        [:p phone]]
       [:div.mdl-cell.mdl-cell--4-col
        [:p email]]]]]])
+
+(defn single-project-component
+  [project]
+  [:div.projecttitle
+   [:a {:href (:url project)} (:title project)]]
+  [:div.projectimg
+   [:img {:src (:image project) :alt (:title project)} ]]
+  [:div.projectdesc
+   [:p (:description project)]])
+


eliminate cljs build errors in non-test code

--- src/deferst.cljc
+++ src/deferst.cljc
@@ -39,11 +39,9 @@
            (reset! r (s/stop-system! sys))
            nil)))
       (if @r
-        (d/chain
-         @r
-         (fn [st-fn-r]
-           (first st-fn-r)))
-        (d/success-deferred nil))))
+        (s/system-map @r)
+        #?(:clj (d/success-deferred nil)
+           :cljs (p/promise nil)))))

   (system-map [_]
     (s/system-map @sys-atom)))


Mac frame icon bug hotfixed

Mac frame icon bug hotfixed

--- src/gui/main.clj
+++ src/gui/main.clj
@@ -79,18 +79,33 @@
 (def main-panel (border-panel
                   :north tool-bar
                   :center hor-panel))
-
-(def main-frame (frame
-                  :title "Logical Workbench"
-                  :on-close :exit
-                  :icon (icon-path "lwb-logo.gif")
-                  :size [980 :by 600]
-                  :content main-panel
-                  :menubar (menubar
-                             :items [project-menu
-                                     tasks-menu
-                                     options-menu
-                                     help-menu])))
+
+(def main-frame
+  (if (and
+        (= "Mac OS X" (System/getProperty "os.name"))
+        (= "10.7.5" (System/getProperty "os.version")))
+    ; Hotfix: Java on Mac OS X Lion has a bug for displaying the frame icon
+    (frame
+      :title "Logical Workbench"
+      :on-close :exit
+      :size [980 :by 600]
+      :content main-panel
+      :menubar (menubar
+                 :items [project-menu
+                         tasks-menu
+                         options-menu
+                         help-menu]))
+    (frame
+      :title "Logical Workbench"
+      :on-close :exit
+      :icon (icon-path "lwb-logo.gif")
+      :size [980 :by 600]
+      :content main-panel
+      :menubar (menubar
+                 :items [project-menu
+                         tasks-menu
+                         options-menu
+                         help-menu]))))

 (defn -main [& args]
   (listen editor


redirect to profile after sign in

redirect to profile after sign in

--- src/server/daveconservatoire/server/core.cljs
+++ src/server/daveconservatoire/server/core.cljs
@@ -153,7 +153,7 @@
                          (to-facebook-keys))
               user (<? (process-facebook-return query))]
           (session-set! req "user" (:id user))
-          (.redirect res "/"))
+          (.redirect res "/profile"))
         (catch :default e
           (.send res (str "Error: " e)))))))


CMR-348: Reset port number for search.

CMR-348: Reset port number for search.

--- test/cmr/system_int_test/utils/url_helper.clj
+++ test/cmr/system_int_test/utils/url_helper.clj
@@ -21,7 +21,7 @@

 (def indexer-port (config-value :indexer-port 3004))

-(def search-port (config-value :search-port 3013))
+(def search-port (config-value :search-port 3003))

 (def elastic_root (format "http://localhost:%s" elastic-port))


fixing tests

fixing tests

--- test/org/libraryweasel/ligature/core_test.clj
+++ test/org/libraryweasel/ligature/core_test.clj
@@ -8,7 +8,7 @@

 (ns org.libraryweasel.ligature.core-test
   (:require [clojure.test :refer :all]
-            [org.almibe.ligature.core :refer :all]))
+            [org.libraryweasel.ligature.core :refer :all]))

 (deftest identifier?-test
   (testing "Common examples"


Print headline in print-details

Print headline in print-details

--- src/main/clojure/com/stuartsierra/lazytest/report.clj
+++ src/main/clojure/com/stuartsierra/lazytest/report.clj
@@ -19,14 +19,21 @@
   "Prints full details of a TestResult, including file and line
   number, doc string, and stack trace if applicable."
   [r]
+  (println
+   (cond (success? r) "SUCCESS"
+         (:throwable r) "ERROR"
+         :else "FAIL"))
   (let [m (details r)]
     (when-let [n (:name m)] (println "Name:" n))
     (when-let [d (:doc m)] (println "Doc: " d))
     (when (and (:form m) (not (:name m)))
-      (println "Form:" (:form m)))
+      (print "Form: ")
+      (prn (:form m)))
     (when-let [f (:file m)] (println "File:" f))
     (when-let [l (:line m)] (println "Line:" l))
-    (when (seq (:states r)) (println "Context states:" (:states r)))
+    (when (seq (:states r))
+      (print "Context states: ")
+      (prn (:states r)))
     (when-let [e (:throwable r)]
       (println "STACK TRACE")
       (print-cause-trace e))))


Use the depth from the recorded production

Fixes #5

--- src/mdr2/dtb.clj
+++ src/mdr2/dtb.clj
@@ -4,8 +4,14 @@
   (:require [clojure.java.io :refer [file]]
             [clojure.string :as s]
             [clojure.math.numeric-tower :as math]
-            [pantomime.mime :refer [mime-type-of]])
-  (:import javax.sound.sampled.AudioSystem))
+            [clojure.tools.logging :as log]
+            [pantomime.mime :refer [mime-type-of]]
+            [mdr2.production.path :as path]
+            [clojure.xml :as xml]
+            [clojure.zip :as zip]
+            [clojure.data.zip.xml :refer [xml1-> attr= attr]])
+  (:import javax.sound.sampled.AudioSystem
+           java.lang.NumberFormatException))

 (defn wav-file?
   "Is the given `file` a wav file?"
@@ -164,10 +170,27 @@
         bytes (->> files (map #(.length %)) (reduce +))]
     (-> bytes (/ 1024) math/round)))

+(defn depth
+  "Return the depth of a given DAISY Talking Book.
+
+  Unlike the other functions which mostly do not trust the meta data
+  from the DTB and calculate the data based on the wav files, the
+  depth is simply taken out of the meta data from the manifest."
+  [dtb]
+  (let [manifest (file dtb path/manifest-member)
+        zipper (-> manifest xml/parse zip/xml-zip)
+        depth-str (xml1-> zipper :head :meta (attr= :name "ncc:depth") (attr :content))]
+    (try
+      (Integer/valueOf depth-str)
+      ;; if there is no sensible depth log this and just return a default of 1
+      (catch NumberFormatException _
+        (log/warnf "%s contains invalid depth \"%s\". Using 1 as a fallback" manifest depth-str)
+        1))))
+
 (defn meta-data
   "Return a map containing all queried meta data for a given DAISY Talking Book"
   [dtb]
-  (let [keys [:multimedia_type :audio_format :total_time]
-        fns [multimedia-type audio-format audio-length]]
+  (let [keys [:multimedia_type :audio_format :total_time :depth]
+        fns [multimedia-type audio-format audio-length depth]]
     (zipmap keys (map #(% dtb) fns))))


Pass the production along, not just the path to it

--- src/mdr2/rdf.clj
+++ src/mdr2/rdf.clj
@@ -2,8 +2,8 @@
   (:require [clojure.data.xml :as xml]
             [mdr2.dtb :as dtb]))

-(defn get-meta-data [{:keys [path] :as production}]
-  (merge production (dtb/meta-data path)))
+(defn get-meta-data [production]
+  (merge production (dtb/meta-data production)))

 (defn- rdf-sexp
   [{:keys [title creator subject description publisher date identifier source language rights


center icon and title

center icon and title

--- app/src/cljs/app/components.cljs
+++ app/src/cljs/app/components.cljs
@@ -24,8 +24,8 @@
   (let [[name icon] navlinklst]
     [:li.mdl-list__item
      [:span.mdl-list__item-primary-content.mdl-grid
-      [:i.material-icons.mdl-list__item-icon.mdl-cell.mdl-cell--2-col icon]
-      [:a.mdl-navigation__link.mdl-cell.mdl-cell--2-col
+      [:i.material-icons.mdl-list__item-icon.mdl-cell.mdl-cell--2-col.mdl-cell--middle icon]
+      [:a.mdl-navigation__link.mdl-cell.mdl-cell--2-col.mdl-cell--middle
        {:href (str "#" (.toLowerCase name))}
        name]]]))


CMR-1859: Trying to address merge conflicts beforehand - may need to revert

--- umm-spec-lib/src/cmr/umm_spec/umm_to_xml_mappings/iso19115_2.clj
+++ umm-spec-lib/src/cmr/umm_spec/umm_to_xml_mappings/iso19115_2.clj
@@ -5,7 +5,8 @@
             [cmr.umm-spec.umm-to-xml-mappings.iso19115-2.spatial :as spatial]
             [cmr.umm-spec.xml.gen :refer :all]
             [cmr.umm-spec.util :as su]
-            [cmr.umm-spec.iso-utils :as iso]))
+            [cmr.umm-spec.umm-to-xml-mappings.iso19115-2.platform :as platform]
+            [cmr.umm-spec.iso19115-2-util :as u]))

 (def iso19115-2-xml-namespaces
   {:xmlns:xs "http://www.w3.org/2001/XMLSchema"
@@ -23,17 +24,6 @@
    :xmlns:swe "http://schemas.opengis.net/sweCommon/2.0/"
    :xmlns:gsr "http://www.isotc211.org/2005/gsr"})

-(def echo-attributes-info
-  [:eos:otherPropertyType
-   [:gco:RecordType {:xlink:href "http://earthdata.nasa.gov/metadata/schema/eos/1.0/eos.xsd#xpointer(//element[@name='AdditionalAttributes'])"}
-    "Echo Additional Attributes"]])
-
-(def code-lists
-  "The uri base of the code-lists used in the generation of ISO xml"
-  {:earthdata "http://earthdata.nasa.gov/metadata/resources/Codelists.xml"
-   :ngdc "http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml"
-   :iso "http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml"})
-
 (defn- date-mapping
   "Returns the date element mapping for the given name and date value in string format."
   [date-name value]
@@ -42,153 +32,18 @@
     [:gmd:date
      [:gco:DateTime value]]
     [:gmd:dateType
-     [:gmd:CI_DateTypeCode {:codeList (str (:ngdc code-lists) "#CI_DateTypeCode")
+     [:gmd:CI_DateTypeCode {:codeList (str (:ngdc u/code-lists) "#CI_DateTypeCode")
                             :codeListValue date-name} date-name]]]])

 (def attribute-data-type-code-list
   "http://earthdata.nasa.gov/metadata/resources/Codelists.xml#EOS_AdditionalAttributeDataTypeCode")
-
-(defn- generate-title
-  "Returns an ISO title string from the ShortName and LongName fields of the given record."
-  [record]
-  (let [{short-name :ShortName long-name :LongName} record]
-    (if (seq long-name) (str short-name iso/keyword-separator long-name) short-name)))
-
-(defn- science-keyword->iso-keyword-string
-  "Returns an ISO science keyword string from the given science keyword."
-  [science-keyword]
-  (let [{category :Category
-         topic :Topic
-         term :Term
-         variable-level-1 :VariableLevel1
-         variable-level-2 :VariableLevel2
-         variable-level-3 :VariableLevel3
-         detailed-variable :DetailedVariable} science-keyword]
-    (str/join iso/keyword-separator (map #(or % iso/nil-science-keyword-field)
-                                         [category topic term variable-level-1 variable-level-2
-                                          variable-level-3 detailed-variable]))))
-
-(defn- generate-descriptive-keywords
-  "Returns the content generator instructions for the given descriptive keywords."
-  ([keywords]
-   (generate-descriptive-keywords keywords nil))
-  ([keywords keyword-type]
-   [:gmd:MD_Keywords
-    (for [keyword keywords]
-      [:gmd:keyword [:gco:CharacterString keyword]])
-    (when keyword-type
-      [:gmd:type
-       [:gmd:MD_KeywordTypeCode
-        {:codeList (str (:ngdc code-lists) "#MD_KeywordTypeCode")
-         :codeListValue keyword-type} keyword-type]])
-    [:gmd:thesaurusName {:gco:nilReason "unknown"}]]))

 (defn- generate-projects-keywords
   "Returns the content generator instructions for descriptive keywords of the given projects."
   [projects]
-  (let [project-keywords (map generate-title projects)]
-    (generate-descriptive-keywords project-keywords "project")))
-
-(defn- generate-characteristics
-  "Returns the generated characteristics content generator instructions, with the type
-  argument used for the EOS_AdditionalAttributeTypeCode codeListValue attribute value and content."
-  [type characteristics]
-  [:eos:otherProperty
-   [:gco:Record
-    [:eos:AdditionalAttributes
-     (for [characteristic characteristics]
-       [:eos:AdditionalAttribute
-        [:eos:reference
-         [:eos:EOS_AdditionalAttributeDescription
-          [:eos:type
-           [:eos:EOS_AdditionalAttributeTypeCode
-            {:codeList (str (:earthdata code-lists) "#EOS_AdditionalAttributeTypeCode")
-             :codeListValue type}
-            type]]
-          [:eos:name
-           (char-string (:Name characteristic))]
-          [:eos:description
-           (char-string (:Description characteristic))]
-          [:eos:dataType
-           [:eos:EOS_AdditionalAttributeDataTypeCode
-            {:codeList (str (:earthdata code-lists) "#EOS_AdditionalAttributeDataTypeCode")
-             :codeListValue (:DataType characteristic)}
-            (:DataType characteristic)]]
-          [:eos:parameterUnitsOfMeasure
-           (char-string (:Unit characteristic))]]]
-        [:eos:value
-         (char-string (:Value characteristic))]])]]])
-
-(defn- generate-sensors
-  "Returns content generator instructions for the given sensors."
-  [sensors]
-  (for [sensor sensors]
-    [:eos:sensor
-     [:eos:EOS_Sensor
-      [:eos:citation
-       [:gmd:CI_Citation
-        [:gmd:title
-         [:gco:CharacterString (generate-title sensor)]]
-        [:gmd:date {:gco:nilReason "unknown"}]]]
-      [:eos:identifier
-       [:gmd:MD_Identifier
-        [:gmd:code
-         (char-string (:ShortName sensor))]
-        [:gmd:description
-         (char-string (:LongName sensor))]]]
-      [:eos:type
-       (char-string (:Technique sensor))]
-      [:eos:description {:gco:nilReason "missing"}]
-      echo-attributes-info
-      (generate-characteristics "sensorInformation" (:Characteristics sensor))]]))
-
-(defn- generate-instruments
-  "Returns content generator instructions for the given instruments."
-  [instruments]
-  (for [instrument instruments]
-    [:gmi:instrument
-     [:eos:EOS_Instrument
-      [:gmi:citation
-       [:gmd:CI_Citation
-        [:gmd:title
-         [:gco:CharacterString (generate-title instrument)]]
-        [:gmd:date {:gco:nilReason "unknown"}]]]
-      [:gmi:identifier
-       [:gmd:MD_Identifier
-        [:gmd:code
-         (char-string (:ShortName instrument))]
-        [:gmd:description
-         (char-string (:LongName instrument))]]]
-      [:gmi:type
-       (char-string (:Technique instrument))]
-      [:gmi:description {:gco:nilReason "missing"}]
-      [:eos:otherPropertyType
-       [:gco:RecordType {:xlink:href "http://earthdata.nasa.gov/metadata/schema/eos/1.0/eos.xsd#xpointer(//element[@name='AdditionalAttributes'])"}
-        "Echo Additional Attributes"]]
-      (generate-characteristics "instrumentInformation" (:Characteristics instrument))
-      (generate-sensors (:Sensors instrument))]]))
-
-(defn- generate-platforms
-  "Returns the content generator instructions for the given platforms."
-  [platforms]
-  (for [platform platforms]
-    [:gmi:platform
-     [:eos:EOS_Platform
-      [:gmi:identifier
-       [:gmd:MD_Identifier
-        [:gmd:code
-         (char-string (:ShortName platform))]
-        [:gmd:description
-         (char-string (:LongName platform))]]]
-      [:gmi:description (char-string (:Type platform))]
-      (generate-instruments (:Instruments platform))
-
-      ;; Characteristics
-      (when-let [characteristics (:Characteristics platform)]
-        [:eos:otherPropertyType
-         [:gco:RecordType {:xlink:href "http://earthdata.nasa.gov/metadata/schema/eos/1.0/eos.xsd#xpointer(//element[@name='AdditionalAttributes'])"}
-          "Echo Additional Attributes"]]
-        (generate-characteristics "platformInformation" characteristics))]]))
+  (let [project-keywords (map u/generate-title projects)]
+    (u/generate-descriptive-keywords "project" project-keywords)))
+

 (defn- generate-projects
   [projects]
@@ -197,7 +52,7 @@
       [:gmi:operation
        [:gmi:MI_Operation
         [:gmi:description
-         (char-string (generate-title proj))]
+         (char-string (u/generate-title proj))]
         [:gmi:identifier
          [:gmd:MD_Identifier
           [:gmd:code
@@ -255,7 +110,7 @@
              [:gco:Date (second (re-matches #"(\d\d\d\d-\d\d-\d\d)T.*" (str (:PublicationDate pub-ref))))]]
             [:gmd:dateType
              [:gmd:CI_DateTypeCode
-              {:codeList (str (:iso code-lists) "#CI_DateTypeCode")
+              {:codeList (str (:iso u/code-lists) "#CI_DateTypeCode")
                :codeListValue "publication"} "publication"]]]])
         [:gmd:edition (char-string (:Edition pub-ref))]
         (when (:DOI pub-ref)
@@ -268,14 +123,14 @@
           [:gmd:organisationName (char-string (:Author pub-ref))]
           [:gmd:role
            [:gmd:CI_RoleCode
-            {:codeList (str (:ngdc code-lists) "#CI_RoleCode")
+            {:codeList (str (:ngdc u/code-lists) "#CI_RoleCode")
              :codeListValue "author"} "author"]]]]
         [:gmd:citedResponsibleParty
          [:gmd:CI_ResponsibleParty
           [:gmd:organisationName (char-string (:Publisher pub-ref))]
           [:gmd:role
            [:gmd:CI_RoleCode
-            {:codeList (str (:ngdc code-lists) "#CI_RoleCode")
+            {:codeList (str (:ngdc u/code-lists) "#CI_RoleCode")
              :codeListValue "publisher"} "publication"]]]]
         [:gmd:series
          [:gmd:CI_Series
@@ -286,123 +141,152 @@
         [:gmd:ISBN (char-string (:ISBN pub-ref))]]]
       [:gmd:associationType
        [:gmd:DS_AssociationTypeCode
-        {:codeList (str (:ngdc code-lists) "#DS_AssociationTypeCode")
+        {:codeList (str (:ngdc u/code-lists) "#DS_AssociationTypeCode")
          :codeListValue "Input Collection"} "Input Collection"]]]]))
+
+(defn extent-description-string
+  "Returns the ISO extent description string (a \"key=value,key=value\" string) for the given UMM-C
+  collection record."
+  [c]
+  (let [vsd (first (-> c :SpatialExtent :VerticalSpatialDomains))
+        m {"VerticalSpatialDomainType" (:Type vsd)
+           "VerticalSpatialDomainValue" (:Value vsd)
+           "SpatialCoverageType" (-> c :SpatialExtent :SpatialCoverageType)
+           "SpatialGranuleSpatialRepresentation" (-> c :SpatialExtent :GranuleSpatialRepresentation)}]
+    (str/join "," (for [[k v] m
+                        :when (some? v)]
+                    (str k "=" (str/replace v #"[,=]" ""))))))
+
+(defn- science-keyword->iso-keyword-string
+  "Returns an ISO science keyword string from the given science keyword."
+  [science-keyword]
+  (let [{category :Category
+         topic :Topic
+         term :Term
+         variable-level-1 :VariableLevel1
+         variable-level-2 :VariableLevel2
+         variable-level-3 :VariableLevel3
+         detailed-variable :DetailedVariable} science-keyword]
+    (str/join iso/keyword-separator (map #(or % iso/nil-science-keyword-field)
+                                         [category topic term variable-level-1 variable-level-2
+                                          variable-level-3 detailed-variable]))))

 (defn umm-c-to-iso19115-2-xml
   "Returns the generated ISO19115-2 xml from UMM collection record c."
   [c]
-  (xml
-    [:gmi:MI_Metadata
-     iso19115-2-xml-namespaces
-     [:gmd:fileIdentifier (char-string (:EntryTitle c))]
-     [:gmd:language (char-string "eng")]
-     [:gmd:characterSet
-      [:gmd:MD_CharacterSetCode {:codeList (str (:ngdc code-lists) "#MD_CharacterSetCode")
-                                 :codeListValue "utf8"} "utf8"]]
-     [:gmd:hierarchyLevel
-      [:gmd:MD_ScopeCode {:codeList (str (:ngdc code-lists) "#MD_ScopeCode")
-                          :codeListValue "series"} "series"]]
-     [:gmd:contact {:gco:nilReason "missing"}]
-     [:gmd:dateStamp
-      [:gco:DateTime "2014-08-25T15:25:44.641-04:00"]]
-     [:gmd:metadataStandardName (char-string "ISO 19115-2 Geographic Information - Metadata Part 2 Extensions for imagery and gridded data")]
-     [:gmd:metadataStandardVersion (char-string "ISO 19115-2:2009(E)")]
-     (spatial/coordinate-system-element c)
-     [:gmd:identificationInfo
-      [:gmd:MD_DataIdentification
-       [:gmd:citation
-        [:gmd:CI_Citation
-         [:gmd:title (char-string (:EntryTitle c))]
-         (date-mapping "revision" "2000-12-31T19:00:00-05:00")
-         (date-mapping "creation" "2000-12-31T19:00:00-05:00")
-         [:gmd:identifier
+  (let [platforms (platform/platforms-with-id (:Platforms c))]
+    (xml
+      [:gmi:MI_Metadata
+       iso19115-2-xml-namespaces
+       [:gmd:fileIdentifier (char-string (:EntryTitle c))]
+       [:gmd:language (char-string "eng")]
+       [:gmd:characterSet
+        [:gmd:MD_CharacterSetCode {:codeList (str (:ngdc u/code-lists) "#MD_CharacterSetCode")
+                                   :codeListValue "utf8"} "utf8"]]
+       [:gmd:hierarchyLevel
+        [:gmd:MD_ScopeCode {:codeList (str (:ngdc u/code-lists) "#MD_ScopeCode")
+                            :codeListValue "series"} "series"]]
+       [:gmd:contact {:gco:nilReason "missing"}]
+       [:gmd:dateStamp
+        [:gco:DateTime "2014-08-25T15:25:44.641-04:00"]]
+       [:gmd:metadataStandardName (char-string "ISO 19115-2 Geographic Information - Metadata Part 2 Extensions for imagery and gridded data")]
+       [:gmd:metadataStandardVersion (char-string "ISO 19115-2:2009(E)")]
+       (spatial/coordinate-system-element c)
+       [:gmd:identificationInfo
+        [:gmd:MD_DataIdentification
+         [:gmd:citation
+          [:gmd:CI_Citation
+           [:gmd:title (char-string (:EntryTitle c))]
+           (date-mapping "revision" "2000-12-31T19:00:00-05:00")
+           (date-mapping "creation" "2000-12-31T19:00:00-05:00")
+           [:gmd:identifier
+            [:gmd:MD_Identifier
+             [:gmd:code (char-string (:EntryId c))]
+             [:gmd:version (char-string (:Version c))]]]]]
+         [:gmd:abstract (char-string (:Abstract c))]
+         [:gmd:purpose {:gco:nilReason "missing"} (char-string (:Purpose c))]
+         [:gmd:status
+          (when-let [collection-progress (:CollectionProgress c)]
+            [:gmd:MD_ProgressCode
+             {:codeList (str (:ngdc u/code-lists) "#MD_ProgressCode")
+              :codeListValue (str/lower-case collection-progress)}
+             collection-progress])]
+         (generate-projects-keywords (:Projects c))
+         (when-let [science-keywords (:ScienceKeywords c)]
+           [:gmd:descriptiveKeywords (u/generate-descriptive-keywords
+                                       "theme"
+                                       (map science-keyword->iso-keyword-string science-keywords))])
+         (u/generate-descriptive-keywords "place" (:SpatialKeywords c))
+         (u/generate-descriptive-keywords "temporal" (:TemporalKeywords c))
+         (u/generate-descriptive-keywords (:AncillaryKeywords c))
+         (platform/generate-platform-keywords platforms)
+         (platform/generate-instrument-keywords platforms)
+         [:gmd:resourceConstraints
+          [:gmd:MD_LegalConstraints
+           [:gmd:useLimitation (char-string (:UseConstraints c))]
+           [:gmd:useLimitation
+            [:gco:CharacterString (str "Restriction Comment:" (-> c :AccessConstraints :Description))]]
+           [:gmd:otherConstraints
+            [:gco:CharacterString (str "Restriction Flag:" (-> c :AccessConstraints :Value))]]]]
+         (generate-publication-references (:PublicationReferences c))
+         [:gmd:language (char-string (or (:DataLanguage c) "eng"))]
+         [:gmd:extent
+          [:gmd:EX_Extent {:id "boundingExtent"}
+           [:gmd:description
+            [:gco:CharacterString (extent-description-string c)]]
+           (spatial/spatial-extent-elements c)
+           (for [temporal (:TemporalExtents c)
+                 rdt (:RangeDateTimes temporal)]
+             [:gmd:temporalElement
+              [:gmd:EX_TemporalExtent
+               [:gmd:extent
+                [:gml:TimePeriod {:gml:id (u/generate-id)}
+                 [:gml:beginPosition (:BeginningDateTime rdt)]
+                 [:gml:endPosition (su/nil-to-empty-string (:EndingDateTime rdt))]]]]])
+           (for [temporal (:TemporalExtents c)
+                 date (:SingleDateTimes temporal)]
+             [:gmd:temporalElement
+              [:gmd:EX_TemporalExtent
+               [:gmd:extent
+                [:gml:TimeInstant {:gml:id (u/generate-id)}
+                 [:gml:timePosition date]]]]])]]
+         [:gmd:processingLevel
           [:gmd:MD_Identifier
-           [:gmd:code (char-string (:EntryId c))]
-           [:gmd:version (char-string (:Version c))]]]]]
-       [:gmd:abstract (char-string (:Abstract c))]
-       [:gmd:purpose {:gco:nilReason "missing"} (char-string (:Purpose c))]
-       [:gmd:status
-        (when-let [collection-progress (:CollectionProgress c)]
-          [:gmd:MD_ProgressCode
-           {:codeList (str (:ngdc code-lists) "#MD_ProgressCode")
-            :codeListValue (str/lower-case collection-progress)}
-           collection-progress])]
-       (when-let [projects (:Projects c)]
-         [:gmd:descriptiveKeywords (generate-projects-keywords projects)])
-       (when-let [science-keywords (:ScienceKeywords c)]
-         [:gmd:descriptiveKeywords (generate-descriptive-keywords
-                                     (map science-keyword->iso-keyword-string science-keywords)
-                                     "theme")])
-       (when-let [spatial-keywords (:SpatialKeywords c)]
-         [:gmd:descriptiveKeywords (generate-descriptive-keywords spatial-keywords "place")])
-       (when-let [temporal-keywords (:TemporalKeywords c)]
-         [:gmd:descriptiveKeywords (generate-descriptive-keywords temporal-keywords "temporal")])
-       (when-let [ancillary-keywords (:AncillaryKeywords c)]
-         [:gmd:descriptiveKeywords (generate-descriptive-keywords ancillary-keywords)])
-       [:gmd:resourceConstraints
-        [:gmd:MD_LegalConstraints
-         [:gmd:useLimitation (char-string (:UseConstraints c))]
-         [:gmd:useLimitation
-          [:gco:CharacterString (str "Restriction Comment:" (-> c :AccessConstraints :Description))]]
-         [:gmd:otherConstraints
-          [:gco:CharacterString (str "Restriction Flag:" (-> c :AccessConstraints :Value))]]]]
-       (generate-publication-references (:PublicationReferences c))
-       [:gmd:language (char-string (or (:DataLanguage c) "eng"))]
-       [:gmd:extent
-        [:gmd:EX_Extent {:id "boundingExtent"}
-         (spatial/spatial-extent-elements c)
-         (for [temporal (:TemporalExtents c)
-               rdt (:RangeDateTimes temporal)]
-           [:gmd:temporalElement
-            [:gmd:EX_TemporalExtent
-             [:gmd:extent
-              [:gml:TimePeriod {:gml:id (iso/generate-id)}
-               [:gml:beginPosition (:BeginningDateTime rdt)]
-               [:gml:endPosition (su/nil-to-empty-string (:EndingDateTime rdt))]]]]])
-         (for [temporal (:TemporalExtents c)
-               date (:SingleDateTimes temporal)]
-           [:gmd:temporalElement
-            [:gmd:EX_TemporalExtent
-             [:gmd:extent
-              [:gml:TimeInstant {:gml:id (iso/generate-id)}
-               [:gml:timePosition date]]]]])]]
-       [:gmd:processingLevel
-        [:gmd:MD_Identifier
-         [:gmd:code (char-string (-> c :ProcessingLevel :Id))]
-         [:gmd:description (char-string (-> c :ProcessingLevel :ProcessingLevelDescription))]]]]]
-     [:gmd:contentInfo
-      [:gmd:MD_ImageDescription
-       [:gmd:attributeDescription ""]
-       [:gmd:contentType ""]
-       [:gmd:processingLevelCode
-        [:gmd:MD_Identifier
-         [:gmd:code (char-string (-> c :ProcessingLevel :Id))]
-         [:gmd:description (char-string (-> c :ProcessingLevel :ProcessingLevelDescription))]]]]]
-     (generate-distributions (:Distributions c))
-     [:gmd:dataQualityInfo
-      [:gmd:DQ_DataQuality
-       [:gmd:scope
-        [:gmd:DQ_Scope
-         [:gmd:level
-          [:gmd:MD_ScopeCode
-           {:codeList (str (:ngdc code-lists) "#MD_ScopeCode")
-            :codeListValue "series"}
-           "series"]]]]
-       [:gmd:report
-        [:gmd:DQ_AccuracyOfATimeMeasurement
-         [:gmd:measureIdentification
+           [:gmd:code (char-string (-> c :ProcessingLevel :Id))]
+           [:gmd:description (char-string (-> c :ProcessingLevel :ProcessingLevelDescription))]]]]]
+       [:gmd:contentInfo
+        [:gmd:MD_ImageDescription
+         [:gmd:attributeDescription ""]
+         [:gmd:contentType ""]
+         [:gmd:processingLevelCode
           [:gmd:MD_Identifier
-           [:gmd:code
-            (char-string "PrecisionOfSeconds")]]]
-         [:gmd:result
-          [:gmd:DQ_QuantitativeResult
-           [:gmd:valueUnit ""]
-           [:gmd:value
-            [:gco:Record {:xsi:type "gco:Real_PropertyType"}
-             [:gco:Real (:PrecisionOfSeconds (first (:TemporalExtents c)))]]]]]]]]]
-     [:gmi:acquisitionInformation
-      [:gmi:MI_AcquisitionInformation
-       (generate-projects (:Projects c))
-       (generate-platforms (:Platforms c))]]]))
-
+           [:gmd:code (char-string (-> c :ProcessingLevel :Id))]
+           [:gmd:description (char-string (-> c :ProcessingLevel :ProcessingLevelDescription))]]]]]
+       (generate-distributions (:Distributions c))
+       [:gmd:dataQualityInfo
+        [:gmd:DQ_DataQuality
+         [:gmd:scope
+          [:gmd:DQ_Scope
+           [:gmd:level
+            [:gmd:MD_ScopeCode
+             {:codeList (str (:ngdc u/code-lists) "#MD_ScopeCode")
+              :codeListValue "series"}
+             "series"]]]]
+         [:gmd:report
+          [:gmd:DQ_AccuracyOfATimeMeasurement
+           [:gmd:measureIdentification
+            [:gmd:MD_Identifier
+             [:gmd:code
+              (char-string "PrecisionOfSeconds")]]]
+           [:gmd:result
+            [:gmd:DQ_QuantitativeResult
+             [:gmd:valueUnit ""]
+             [:gmd:value
+              [:gco:Record {:xsi:type "gco:Real_PropertyType"}
+               [:gco:Real (:PrecisionOfSeconds (first (:TemporalExtents c)))]]]]]]]]]
+       [:gmi:acquisitionInformation
+        [:gmi:MI_AcquisitionInformation
+         (platform/generate-instruments platforms)
+         (generate-projects (:Projects c))
+         (platform/generate-platforms platforms)]]])))
+


Setting up a default for the integration path.

--- src/vignette/util/integration.clj
+++ src/vignette/util/integration.clj
@@ -5,7 +5,10 @@
                               [s3 :as vs3])
             [aws.sdk.s3 :as s3]
             [clojure.java.io :as io]
-            [clojure.java.shell :refer (sh)]))
+            [clojure.java.shell :refer (sh)])
+  (:use [environ.core]))
+
+(def integration-path (env :vignette-integration-root "/tmp/integration"))

 (def default-map {:wikia "bucket"
                   :top-dir "a"
@@ -20,11 +23,13 @@
          sample-files)))

 (defn create-integration-env
-  [path]
-  (let [local-store (create-local-object-storage path)
+  ([path]
+   (let [local-store (create-local-object-storage path)
         image-store (create-local-image-storage local-store)]
     (every? true? (map #(save-original image-store (:file-on-disk %) %)
                        (get-sample-image-maps)))))
+  ([]
+   (create-integration-env integration-path)))

 (defn setup-integration
   ([image-store]


Trim all whitespace fluff from the vubis export

--- src/catalog/vubis.clj
+++ src/catalog/vubis.clj
@@ -161,7 +161,7 @@
   "Get the subfield text for the given `path` in the given `record`.
   Returns nil if there is no such subfield"
   [record path]
-  (some-> (apply xml1-> record path) text))
+  (some-> (apply xml1-> record path) text string/trim))

 (defn get-year
   "Grab the date year out of a string. Return nil if `s` cannot be


* src/clj/cljs/core.clj: namespace str in assert macro

--- src/clj/cljs/core.clj
+++ src/clj/cljs/core.clj
@@ -491,12 +491,12 @@
      (when *assert*
        `(when-not ~x
           (throw (js/Error.
-                  (str "Assert failed: " (cljs.core/pr-str '~x)))))))
+                  (cljs.core/str "Assert failed: " (cljs.core/pr-str '~x)))))))
   ([x message]
      (when *assert*
        `(when-not ~x
           (throw (js/Error.
-                  (str "Assert failed: " ~message "\n" (cljs.core/pr-str '~x))))))))
+                  (cljs.core/str "Assert failed: " ~message "\n" (cljs.core/pr-str '~x))))))))

 (defmacro ^{:private true} assert-args [fnname & pairs]
   `(do (when-not ~(first pairs)


Fix regexp of file path

Fix regexp of file path

--- src/cljam/io/util.clj
+++ src/cljam/io/util.clj
@@ -153,5 +153,5 @@
     #"(?i)\.vcf" :vcf
     #"(?i)\.bcf$" :bcf
     #"(?i)\.bed" :bed
-    #"(?i)\.wig$" :wig
+    #"(?i)\.wig" :wig
     (throw (IllegalArgumentException. "Invalid file type"))))


doc update for normaliser

doc update for normaliser

--- src/cortex/layers.clj
+++ src/cortex/layers.clj
@@ -47,7 +47,7 @@
       (util/empty-array shape))))

 (defn scale
-  "Creates a scaling layer with the specified shape and multiplication factor
+  "Creates a linear scaling layer with the specified shape and multiplication factor
    An optional constant offset may also be provided"
   ([shape factor]
     (scale shape factor nil))
@@ -126,7 +126,8 @@
     (cortex.impl.wiring.Combine. combine-fn nil {:gradient-fn gradient-fn})))

 (defn normaliser
-  "Constructs a normaliser of the given shape"
+  "Constructs a normaliser of the given shape. A normaliser layer scales input to mean 0.0 and s.d. 1.0,
+   Adjusting scaling factors over time during training as new input is provided."
   ([shape]
     (normaliser shape nil))
   ([shape {:keys [learn-rate normaliser-factor] :as options}]


Clean up key generation tests

Clean up key generation tests

--- test/caesium/crypto/sign_test.clj
+++ test/caesium/crypto/sign_test.clj
@@ -22,14 +22,11 @@
   (u/unhexify "6bd710a368c1249923fc7a1610747403040f0cc30815a00f9ff548a896bbda0b4eb2ca19ebcf917f0f34200a9edbad3901b64ab09cc5ef7b9bcc3c40c0ff7509"))

 (deftest generate-signing-keys-test
-  (testing "Simply generates new keypairs"
-    (is (let [kp1 (s/generate-signing-keys)
-              kp2 (s/generate-signing-keys)]
-          (and (not (u/array-eq (:public kp1) (:public kp2)))
-               (not (u/array-eq (:secret kp1) (:secret kp2)))))))
-  (testing "Can generate expected public-key from secret seed"
-    (is (u/array-eq public
-                    (:public (s/generate-signing-keys secret))))))
+  (let [kp1 (s/generate-signing-keys)
+        kp2 (s/generate-signing-keys)]
+    (is (not (u/array-eq (:public kp1) (:public kp2))))
+    (is (not (u/array-eq (:secret kp1) (:secret kp2)))))
+  (is (u/array-eq public (:public (s/generate-signing-keys secret)))))

 (deftest sign-test
   (testing "Can sign a message"


Fix queue-name!

Fix queue-name!

--- backend/chemtrack/backend/util.cljs
+++ backend/chemtrack/backend/util.cljs
@@ -13,7 +13,7 @@

 (def sighting-out pr-str)

-(defn queue-name! [port]
+(defn queue-name! [{:keys [port]}]
   (go
     (let [{:keys [instance-id region]}
           (<! (instance-data/instance-identity!


[#2402] Adapt response on a.l.lib.user/create-invite

--- backend/src/akvo/lumen/lib/user.clj
+++ backend/src/akvo/lumen/lib/user.clj
@@ -65,16 +65,16 @@
   [emailer keycloak tenant-conn auth-type tenant location email author-claims]
   (cond
     (keycloak/tenant-member?
-     keycloak tenant email) (lib/bad-request
-                             {"reason" "Already tenant member"})
-    (p/user? keycloak email) (invite-to-tenant emailer tenant-conn auth-type location email
-                                       author-claims)
+     keycloak tenant email)  (lib/bad-request {"reason" "Already tenant member"})
+    (p/user? keycloak email) (do (invite-to-tenant emailer tenant-conn auth-type location email
+                                                   author-claims)
+                                 (lib/ok {}))
     :else
-    (let [tmp-password (:tmp-password (create-new-account keycloak tenant-conn email))
+    (let [tmp-password  (:tmp-password (create-new-account keycloak tenant-conn email))
           invitation-id (new-invitation-id tenant-conn author-claims email)
-          sender-email (get author-claims "email")]
-      (send-invitation-account-email emailer sender-email email location invitation-id tmp-password auth-type)))
-  (lib/ok {}))
+          sender-email  (get author-claims "email")]
+      (send-invitation-account-email emailer sender-email email location invitation-id tmp-password auth-type)
+      (lib/ok {}))))

 (defn active-invites [tenant-conn]
   (lib/ok {:invites (db.user/select-active-invites tenant-conn)}))


refined answer, now returning true/false or satisfiable. For not satisfiable we have to wait for PROBCORE-830

--- src/evalback/core.clj
+++ src/evalback/core.clj
@@ -115,15 +115,32 @@
 (defn json-result [formula res]
   (json/write-str (assoc res :input formula)))

+
+(defn expression-reply [bindings introduced]
+  (apply str (get bindings introduced "No solution computed.")
+         (if (< 1 (count bindings)) "\n\nSolution: \n" "")
+         (for [[k v] bindings] (if-not (= k introduced) (str "  " k "=" v "\n") ""))))
+
+(defn pp-result [has-free-vars? result]
+  (cond
+    (and has-free-vars? result) "satisfiable"
+    (and has-free-vars? (not result)) "not satisfiable"
+    (and (not has-free-vars?) result) "true"
+    :else "false"
+    ))
+
+(defn predicate-reply [result input bindings]
+  (let [has-free-vars? (seq bindings)]
+    (apply str "Predicate is " (pp-result has-free-vars? result) ".\n"
+           (top-level-implication? input)
+           (if has-free-vars? "\nSolution: \n" "")
+           (for [[k v] bindings] (str "  " k "=" v "\n")))))
+
+
 (defn valid-reply [result input introduced bindings]
   (if introduced
-    (apply str (get bindings introduced "No solution computed.")
-           (if (< 1 (count bindings)) "\n\nSolution: \n" "")
-           (for [[k v] bindings] (if-not (= k introduced) (str "  " k "=" v "\n") "")))
-    (apply str "Predicate is " (if result "satisfiable" "not satisfiable") ".\n"
-           (top-level-implication? input)
-           (if (seq bindings) "\nSolution: \n" "")
-           (for [[k v] bindings] (str "  " k "=" v "\n")))))
+    (expression-reply bindings introduced)
+    (predicate-reply result input bindings)))

 (defn old-json [{:keys [status result input introduced  bindings]}]
   (json/write-str


Implement full-featured table component #45 - each cell to be a focus root for performance reasons

--- src/flatgui/focus.clj
+++ src/flatgui/focus.clj
@@ -376,4 +376,32 @@
       (focus-state-child component old-focus-state this-mode)

       :else ; Neither event type - ignore
+      old-focus-state)))
+
+;; This is good for containers inside which it is still needed to manage focus, but which are
+;; completely detached (meaning focus traversal) from whole application component hierachy.
+;; User can still click into such containers, but they do not become parts of Tab/Ctrl+Tab traversal.
+;; In such case multiple containers may own focus at the same time so additional management
+;; may be needed (like drop focus when window is inactive or table row is not selected).
+;; Such containers have to be declared with these parameters:
+;; :closed-focus-root true
+;; :focus-state {:mode :has-focus
+;;               :focused-child nil}
+;; This is needed for performance reasons for containers with many children
+;; (like table where cells are children)
+(fg/defevolverfn simple-focus-state-evolver :focus-state
+  (let [reason (fg/get-reason)
+        this-mode (:mode old-focus-state)]
+    (cond
+
+      (keyboard/key-event? component)
+      (focus-state-keyboard component old-focus-state this-mode)
+
+      (mouse/mouse-left? component)
+      (focus-state-mouse component old-focus-state this-mode)
+
+      (fgc/child-reason? reason)
+      (focus-state-child component old-focus-state this-mode)
+
+      :else ; Neither event type - ignore
       old-focus-state)))


Add unassigned and unlabeled item types

Add unassigned and unlabeled item types

Unassigning a reviewer or removing a label would be considered as a
reviewer comment otherwise.

--- src/gitique/core.cljs
+++ src/gitique/core.cljs
@@ -70,7 +70,9 @@
   (let [classes-contain #(.contains (.-classList item) %)]
     (cond (classes-contain "discussion-commits") "commit-block"
           (classes-contain "discussion-item-assigned") "assigned"
+          (classes-contain "discussion-item-unassigned") "unassigned"
           (classes-contain "discussion-item-labeled") "labeled"
+          (classes-contain "discussion-item-unlabeled") "unlabeled"
           :else (if (= (util/child-text item ".author") creator) "owner-comment" "reviewer-comment"))))

 (defn- annotated-element [creator]


Fix wrong unquoting of path templating variables, was in the wrong place

--- src/googlica/core.clj
+++ src/googlica/core.clj
@@ -74,22 +74,19 @@
                  [[] path-template])
          first)))

-  ;; > (replace-path-vars "b/{bucket}/o/{object}")
+;; > (replace-path-vars "b/{bucket}/o/{object}")
 ;; => (str "b/" bucket "/o/" object)
 (defn generate-path [method]
-  (let [path-vector (template->path-vector
-                     (:path method)
-                     (->> method
-                          :parameters
-                          (filter (fn [[k v]](= "path" (:location v))))
-                          keys
-                          (map name)))]
-    `(str ~@path-vector)))
-
+  (template->path-vector (:path method)
+                         (->> method
+                              :parameters
+                              (filter (fn [[k v]](= "path" (:location v))))
+                              keys
+                              (map name))))

 (defn generate-request [base-url method]
   {:method (-> method :httpMethod s/lower-case keyword)
-   :url (str base-url (generate-path method))})
+   :url `(str ~base-url ~@(generate-path method))})

 (defn generate-function-from-method
   [base-url method]


:bug: Add missing canvas impl for some geom operations.

--- frontend/src/uxbox/main/geom.cljs
+++ frontend/src/uxbox/main/geom.cljs
@@ -24,6 +24,7 @@
     :icon (move-rect shape dpoint)
     :image (move-rect shape dpoint)
     :rect (move-rect shape dpoint)
+    :canvas (move-rect shape dpoint)
     :text (move-rect shape dpoint)
     :curve (move-path shape dpoint)
     :path (move-path shape dpoint)
@@ -65,6 +66,7 @@
   [shape position]
   (case (:type shape)
     :icon (absolute-move-rect shape position)
+    :canvas (absolute-move-rect shape position)
     :image (absolute-move-rect shape position)
     :rect (absolute-move-rect shape position)
     :circle (absolute-move-circle shape position)))


fix argument parsing

fix argument parsing

fix argument parsing in voltdb-init

--- src/jepsen/voltdb.clj
+++ src/jepsen/voltdb.clj
@@ -82,7 +82,7 @@

 (defn init-voltdb!
   "Starts the daemon with the given command."
-  [test host]
+  [host]
   (info host "initializing voltdbroot")
   (c/sudo username
           (c/cd voltroot


Compojure is grandfathered in. Fixes #164. (close enough)

With the regex factored out into its own def, it can be overcome in
~/.lein/init.clj:

(require 'leiningen.new)
(alter-var-root #'leiningen.new/project-name-blacklist (constantly #"^$"))

--- src/leiningen/new.clj
+++ src/leiningen/new.clj
@@ -1,6 +1,6 @@
 (ns leiningen.new
   "Create a new project skeleton."
-  (:use [leiningen.core :only [ns->path]]
+  (:use [leiningen.core :only [ns->path abort]]
         [clojure.java.io :only [file]]
         [clojure.string :only [join]])
   (:import (java.util Calendar)))
@@ -38,13 +38,15 @@
                       (str "Distributed under the Eclipse Public"
                            " License, the same as Clojure.\n")])))

+(def project-name-blacklist #"(?i)(?<!(clo|compo))jure")
+
 (defn new
   "Create a new project skeleton."
   ([project-name]
      (leiningen.new/new project-name (name (symbol project-name))))
   ([project-name project-dir]
-     (when (re-find #"(?i)(?<!clo)jure" project-name)
-       (throw (IllegalArgumentException. "*jure names are no longer allowed.")))
+     (when (re-find project-name-blacklist project-name)
+       (abort "Sorry, *jure names are no longer allowed."))
      (let [project-name (symbol project-name)
            group-id (namespace project-name)
            artifact-id (name project-name)


Working towards the next release.

Working towards the next release.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject cljs-bach "0.3.0"
+(defproject cljs-bach "0.4.0-SNAPSHOT"
   :description "A Clojurescript wrapper for the Web Audio API."
   :license {:name "MIT" }
   :dependencies [[org.clojure/clojure "1.7.0"]


Bumped to 0.8.0

Bumped to 0.8.0


Version 0.3.13-SNAPSHOT

Version 0.3.13-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject ancient-clj "0.3.12"
+(defproject ancient-clj "0.3.13-SNAPSHOT"
   :description "Maven Version Utilities for Clojure"
   :url "https://github.com/xsc/ancient-clj"
   :license {:name "MIT License"


Update dependencies.

Update dependencies.

--- project.clj
+++ project.clj
@@ -20,8 +20,8 @@
     [org.clojure/core.incubator "0.1.3"] ; Functions proposed for inclusion in Clojure https://github.com/clojure/core.incubator
     [cheshire "5.5.0"] ; JSON de/encoding https://github.com/dakrone/cheshire
     [org.flatland/ordered "1.5.3"] ; Ordered hash map https://github.com/flatland/ordered
-    [ring/ring-devel "1.4.0-RC2"] ; Web application library https://github.com/ring-clojure/ring
-    [ring/ring-core "1.4.0-RC2"] ; Web application library https://github.com/ring-clojure/ring
+    [ring/ring-devel "1.4.0"] ; Web application library https://github.com/ring-clojure/ring
+    [ring/ring-core "1.4.0"] ; Web application library https://github.com/ring-clojure/ring
     [http-kit "2.1.19"] ; Web Server http://http-kit.org/
     [compojure "1.3.4"] ; Web routing https://github.com/weavejester/compojure
     [liberator "0.13"] ; WebMachine (REST API server) port to Clojure https://github.com/clojure-liberator/liberator


Add byte-streams for type conversions

Add byte-streams for type conversions

--- project.clj
+++ project.clj
@@ -7,7 +7,8 @@
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.8.0"]
                  [com.github.jnr/jnr-ffi "2.0.9"]
-                 [commons-codec/commons-codec "1.10"]]
+                 [commons-codec/commons-codec "1.10"]
+                 [byte-streams "0.2.2"]]
   :main ^:skip-aot caesium.core
   :target-path "target/%s"
   :profiles {:uberjar {:aot :all}


added clojure-1.4.0-beta1 to lein multi configuration.  Should it also be in bin/version ?

--- project.clj
+++ project.clj
@@ -17,6 +17,7 @@
   :multi-deps {"1.2.0" [[org.clojure/clojure "1.2.0"]]
                "1.2.1" [[org.clojure/clojure "1.2.1"]]
                "1.3.0" [[org.clojure/clojure "1.3.0"]]
+               "1.4.0" [[org.clojure/clojure "1.4.0-beta1"]]
                :all [[ordered "1.0.0"]
                      [org.clojure/math.combinatorics "0.0.1"]
                      [org.clojure/algo.monads "0.1.0"]


Version 0.4.6

Version 0.4.6

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject kixi/terraboot "0.4.6-SNAPSHOT"
+(defproject kixi/terraboot "0.4.6"
   :description "Terraform modules for kixi framework"
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"


Release version 0.3.5.

Release version 0.3.5.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject inet.data "0.3.5-SNAPSHOT"
+(defproject inet.data "0.3.5"
   :description "Represent and manipulate various Internet entities as data."
   :url "http://github.com/llasram/inet.data"
   :license {:name "Eclipse Public License"


Update dependencies.

Update dependencies.

--- project.clj
+++ project.clj
@@ -14,20 +14,20 @@
   ;; All profile dependencies
   :dependencies [
     [org.clojure/clojure "1.9.0-alpha10"] ; Lisp on the JVM http://clojure.org/documentation
-    [environ "1.0.3"] ; Environment settings from different sources https://github.com/weavejester/environ
-    [com.taoensso/timbre "4.7.0"] ; Logging https://github.com/ptaoussanis/timbre
+    [environ "1.1.0"] ; Environment settings from different sources https://github.com/weavejester/environ
+    [com.taoensso/timbre "4.7.3"] ; Logging https://github.com/ptaoussanis/timbre
     [raven-clj "1.4.2"] ; Interface to Sentry error reporting https://github.com/sethtrain/raven-clj
     [com.stuartsierra/component "0.3.1"] ; Component Lifecycle
-    [amazonica "0.3.67"] ; A comprehensive Clojure client for the entire Amazon AWS api https://github.com/mcohen01/amazonica
+    [amazonica "0.3.73"] ; A comprehensive Clojure client for the entire Amazon AWS api https://github.com/mcohen01/amazonica
     [hiccup "1.0.5"] ; HTML rendering https://github.com/weavejester/hiccup
     [cheshire "5.6.3"] ; JSON encoding / decoding https://github.com/dakrone/cheshire
-    [manifold "0.1.5-alpha2"] ; Async programming tools https://github.com/ztellman/manifold
+    [manifold "0.1.6-alpha1"] ; Async programming tools https://github.com/ztellman/manifold
     [clj-time "0.12.0"] ; Date and time lib https://github.com/clj-time/clj-time
   ]

   ;; All profile plugins
   :plugins [
-    [lein-environ "1.0.3"] ; Get environment settings from different sources https://github.com/weavejester/environ
+    [lein-environ "1.1.0"] ; Get environment settings from different sources https://github.com/weavejester/environ
   ]

   :profiles {