CMR-1892: Added tests.

CMR-1892: Added tests.

--- system-int-test/test/cmr/system_int_test/search/collection_highlights_search_test.clj
+++ system-int-test/test/cmr/system_int_test/search/collection_highlights_search_test.clj
@@ -153,14 +153,20 @@
            (search/find-concepts-json :collection {"options[highlights][begin-tag]" "
"}))))

   (testing "snippet-length and num-fragments must be valid integers"
+    (are [param value error]
+         (= {:status 400 :errors [error]}
+            (search/find-concepts-json :collection
+                                       {:include-highlights true
+                                        (format "options[highlights][%s]" param) value}))
+         "snippet-length" "FOO" "snippet-length [FOO] option for highlights is not a valid integer."
+         "snippet-length" 10.5 "snippet-length [10.5] option for highlights is not a valid integer."
+         "snippet-length" -5 "snippet-length [-5] option for highlights must be an integer greater than 0."
+         "num-fragments" "FOO" "num-fragments [FOO] option for highlights is not a valid integer."
+         "num-fragments" 10.5 "num-fragments [10.5] option for highlights is not a valid integer."
+         "num-fragments" -5 "num-fragments [-5] option for highlights must be an integer greater than 0."))
+
+  (testing "invalid highlights options"
     (is (= {:status 400
-            :errors ["snippet-length [FOO] option for highlights is not a valid integer."
-                     "num-fragments [10.5] option for highlights is not a valid integer."]}
+            :errors ["Option [bad_option] is not supported for param [highlights]"]}
            (search/find-concepts-json :collection {:include-highlights true
-                                                   "options[highlights][snippet-length]" "FOO"
-                                                   "options[highlights][num-fragments]" 10.5}))))
-
-  (testing "include_highlights must be set to true for highlights options"
-    (is (= {:status 400
-            :errors ["Highlights options are not allowed unless the include-highlights is true."]}
-           (search/find-concepts-json :collection {"options[highlights][begin-tag]" "
"})))))
+                                                   "options[highlights][bad-option]" "
"})))))


Update lein profile deps

Update lein profile deps

--- etc/lein/profiles.clj
+++ etc/lein/profiles.clj
@@ -1,11 +1,11 @@
-{:repl {:dependencies [^:displace [org.clojure/clojure "1.10.1"]
-                       [lambdaisland/kaocha "0.0-601"]
-                       [nrepl "0.6.0"]
-                       [org.clojure/tools.namespace "0.3.1"]]
+{:repl {
+        :dependencies [^:displace [org.clojure/clojure "1.10.1"]
+                 [lambdaisland/kaocha "1.0.672"]
+                 [nrepl "0.8.0"]
+                 [org.clojure/tools.namespace "0.3.1"]]
         :repl-options {:color false}}
- :user {:dependencies [^:displace [org.clojure/clojure "1.10.1"]
-                       ]
-        :plugins [[lein-ancient "0.6.15"]]}
-
- :kaocha {:dependencies [[lambdaisland/kaocha "0.0-601"]]}
- }
+ :user {
+        :dependencies [^:displace [org.clojure/clojure "1.10.1"]]
+  :plugins [[lein-ancient "0.6.15"]]}
+ :kaocha {
+          :dependencies [[lambdaisland/kaocha "1.0.672"]]}}


added back flatten to long-term trends analysis

--- src/clj/forma/trends/analysis.clj
+++ src/clj/forma/trends/analysis.clj
@@ -118,8 +118,9 @@
   (let [params [freq start-idx end-idx spectral-ts reli-ts]
         clean-ts (apply clean-tele-trends params)
         cofactor-tele (lengthening-ts start-idx end-idx cofactor-ts)]
-    (transpose [(map hansen-stat clean-ts)
-                (map long-stats clean-ts cofactor-tele)])))
+    (map flatten
+         (transpose [(map hansen-stat clean-ts)
+                     (map long-stats clean-ts cofactor-tele)]))))

 (defn trend-mat
   "returns a (`len` x 2) matrix, with first column of ones; and second


finished a working draft of whiz and whoopbang to provide maps, based on a reference period and start- and end-periods for estimation.

--- src/clj/forma/trends/analysis.clj
+++ src/clj/forma/trends/analysis.clj
@@ -4,11 +4,6 @@
         [clojure.contrib.math :only (sqrt)])
   (:require [incanter.core :as i]
             [incanter.stats :as s]))
-
-;; NOTE Currently, the NDVI and reliability sample time-series comes from the NDVI
-;; trends presentation.  We will have to start a test data file at
-;; some point, but I don't want to fuck with the directory structure
-;; right now, while I am learning to navigate the project.

 ;; The first few functions are more general, and could be pulled into,
 ;; say, the matrix operation namespace.  For now, we will leave them
@@ -40,9 +35,11 @@
   [f window xs]
   (pmap f (partition window 1 xs)))

-;; TODO: document this with examples
-
 (defn make-monotonic
+  "move through a collection `coll` picking up the min or max values, depending
+  on the value of `comparator` which can be either `min` or `max`.  This is very
+  similar, I think, to the `reduce` function, but with side effects that print
+  into a vector."
   [comparator coll]
   (reduce (fn [acc val]
             (conj acc
@@ -84,13 +81,8 @@
   (let [offset (+ long-block window)
         [x y z] (map #(-> % (- offset) (+ 2)) [ref-pd start-pd end-pd])
         full-ts (whoop-full ts reli-ts long-block window)]
-    (apply array-map
-           (interleave
-            [:reference :for-est]
-            (map (partial subvec full-ts) [(dec x) (dec y)] [x z])))))
-
-;; {:reference (subvec full-ts (dec x) x)
-;;      :for-est (subvec full-ts (dec y) z)}
+    {:reference (subvec full-ts (dec x) x)
+     :for-est   (subvec full-ts (dec y) z)}))

 ;; WHIZBANG

@@ -145,7 +137,6 @@
       (catch IllegalArgumentException e
         (repeat (count attributes) 0)))))

-
 (def
   ^{:doc "force the collection of only the OLS coefficients and t-statistics
   from the `long-trend-general` function, since this is what we have used for
@@ -161,8 +152,6 @@
   (for [x (range start-index (inc end-index))]
     (subvec base-vec 0 x)))

-;; TODO: make whizbang accept date strings. do the same for whoopbang.
-
 (defn estimate-thread
   "The first vector in `nested-vector` should be the dependent
   variable, and the rest of the vectors should be the cofactors.
@@ -177,7 +166,13 @@
 (defn whizbang
   "force whizbang into an output map where the tuple for the reference
   period is separate from the tuples for all other time periods -
-  those time periods that are used for est(imation) ... `for-est`!."
+  those time periods that are used for est(imation) ... `for-est`!.
+  NOTE: the reference, start, and end period for estimation have to
+  correspond to the element index from the start of the time-series.
+  That is, the date string will have to already be passed through the
+  datetime->period function in the date-time namespace.  For example,
+  in our original application, the integer 71 (corresponding to Dec 2005)
+  is passed in as `ref-pd`."
   [ref-pd start-pd end-pd t-series & cofactors]
   {:pre [(vector? t-series)
          (every? #{true} (vec (map vector? cofactors)))]}


make Fisk card title appear in orange in log message

--- src/clj/game/cards-identities.clj
+++ src/clj/game/cards-identities.clj
@@ -170,7 +170,7 @@
                           :msg "gain 1 [Credits]" :effect (effect (gain :credit 1))}}}

    "Laramy Fisk: Savvy Investor"
-   {:events {:no-action {:effect (effect (system-msg "can be forced to draw by clicking on Laramy Fisk"))
+   {:events {:no-action {:effect (effect (system-msg "can be forced to draw by clicking on Laramy Fisk: Savvy Investor"))
                          :req (req (and run
                                         (is-central? (:server run))
                                         (not current-ice)


Going to make behaviors more stable and encapsulated.

--- src/cljc/flocking/simulation.cljc
+++ src/cljc/flocking/simulation.cljc
@@ -28,13 +28,15 @@
         (wall-force pos [x miny])
         (wall-force pos [x maxy])))

-;(defmulti steer (fn [boid-state behavior] (:type behavior)))
-;(defmethod steer :wander [boid-state behavior]
-;  (assoc-in boid-state [:forces :wander] (rules/wander boid-state behavior)))
+(defmulti steer (fn [boid-state behavior] (:type behavior)))
+(defmethod steer :wander [boid-state behavior]
+  (assoc-in boid-state [:forces :wander] (rules/wander boid-state behavior)))
+(defmethod steer :default [boid_state _] boid_state)

 ;Encapsulate each behavior such that it contributes if present and does nothing if not.
 (defn sim-boid [{:keys [state max-speed behaviors] :as boid-state } boids dt world ap av]
   (let [[pos vel] state
+        x (for [b behaviors] (steer state b))
         separation-acceleration (rules/separate state (:separation behaviors) boids)
         alignment-acceleration (rules/align state (:alignment behaviors) av)
         cohesion-acceleration (rules/cohere state (:cohesion behaviors) ap)


gameboard improvements

gameboard improvements

--- src/cljs/netrunner/gameboard.cljs
+++ src/cljs/netrunner/gameboard.cljs
@@ -52,9 +52,9 @@
                        (send-command "play" {:card card}))
    (or (= (first zone) "rig")
        (and (= (first zone) "servers")
-            (:rezzed card))) (if (> (count abilities) 1)
-                               (-> (om/get-node owner "abilities") js/$ .toggle)
-                               (send-command "ability" {:card card :ability 0}))
+            (:rezzed card))) (let [count (count abilities)]
+                               (cond (> count 1) (-> (om/get-node owner "abilities") js/$ .toggle)
+                                     (= count 1) (send-command "ability" {:card card :ability 0})))
    (and (= (first zone) "servers")
         (not (:rezzed card))) (send-command "rez" {:card card})))

@@ -250,7 +250,7 @@
     [:div.server {:class (when (= (:side @game-state) :runner) "opponent")}
      [:div.ices (for [ice ices] (om/build card-view ice {:opts {:flipped (not (:rezzed ice))}}))]
      [:div.content {:class (when (= (count content) 1) "center")}
-      (for [card content] (om/build card-view card {:opts {:flipped (not (:rezzed card))}}))
+      (for [card (reverse content)] (om/build card-view card {:opts {:flipped (not (:rezzed card))}}))
       (when opts (om/build label content {:opts opts}))]])))

 (defmulti board-view #(get-in % [:identity :side]))


Fix bug preventing editor from showing up

--- src/clojure/nightcode/editors.clj
+++ src/clojure/nightcode/editors.clj
@@ -211,7 +211,7 @@
   [path]
   (let [editor-pane (s/select @utils/ui-root [:#editor-pane])]
     ; create new editor if necessary
-    (when (and path (contains? @editors path))
+    (when (and path (not (contains? @editors path)))
       (when-let [view (or (create-editor path)
                           (create-logcat path))]
         (swap! editors assoc path view)


Don't allow undo/redo shortcuts in bottom panes

--- src/clojure/nightcode/editors.clj
+++ src/clojure/nightcode/editors.clj
@@ -329,8 +329,6 @@
             (processKeyBinding [ks e condition pressed]
               (proxy-super processKeyBinding ks e condition pressed)))
     (.setAntiAliasingEnabled true)
-    (.setSyntaxEditingStyle (get styles "clj"))
-    (.setLineWrap true)
     apply-settings!))
   ([path]
     (let [extension (get-extension path)]
@@ -409,7 +407,19 @@
 (defn create-console
   []
   (let [text-area (create-text-area)
-        completer (create-completer text-area "clj")]
+        completer (create-completer text-area "clj")
+        consume-commands #{KeyEvent/VK_Z KeyEvent/VK_Y}]
+    (doto text-area
+      (.setSyntaxEditingStyle (get styles "clj"))
+      (.setLineWrap true)
+      (.addKeyListener
+        (reify KeyListener
+          (keyReleased [this e] nil)
+          (keyTyped [this e] nil)
+          (keyPressed [this e]
+            (when (and @shortcuts/is-down?
+                       (contains? consume-commands (.getKeyCode e)))
+              (.consume e))))))
     (.install completer text-area)
     (JConsole. text-area)))


Fix undo again

Fix undo again

--- src/clojure/nightcode/editors.clj
+++ src/clojure/nightcode/editors.clj
@@ -390,14 +390,15 @@
         text (join \newline lines)]
     (if (:indent-type state)
       (let [tags (ts/str->tags text)
-            {:keys [lines cursor-position]} (add-indent text-area lines text tags state)
+            {:keys [lines cursor-position] :as state} (add-indent text-area lines text tags state)
             new-text (join \newline lines)]
         (.setText text-area new-text)
-        (set-cursor-position! text-area (first cursor-position) (second cursor-position)))
+        (set-cursor-position! text-area (first cursor-position) (second cursor-position))
+        state)
       (do
         (.setText text-area text)
-        (set-cursor-position! text-area start-pos end-pos)))
-    state))
+        (set-cursor-position! text-area start-pos end-pos)
+        state))))

 (defn init-parinfer!
   [^TextEditorPane text-area extension edit-history preprocess?]
@@ -648,6 +649,9 @@
             (update-buttons! editor-pane text-area))
           (removeUpdate [this e]
             (update-buttons! editor-pane text-area))))
+      (add-watch edit-history :update-edit-history
+        (fn [_ _ _ _]
+          (update-buttons! editor-pane text-area)))
       ; initialize parinfer
       (init-parinfer! text-area extension edit-history true)
       (update-buttons! editor-pane text-area)


Adding emacs-clojure-vagrant to the projects list.

--- resources/projects.clj
+++ resources/projects.clj
@@ -97,4 +97,10 @@
  {:name "Slamhound"
   :url "https://github.com/technomancy/slamhound"
   :description "Blow your namespace to bits and reconstruct it from the pieces."}
+
+ :emacs-clojure-vagrant
+ {:name "emacs-clojure-vagrant"
+  :url "https://github.com/Seajure/emacs-clojure-vagrant"
+  :description "An easy development environment for clojure."}
  }
+


[#2215] Use by default auth0

[#2215] Use by default auth0

Still feature flag behind, so we can select keycloak using same
approach
?auth=keycloak

--- backend/src/akvo/lumen/endpoint/env.clj
+++ backend/src/akvo/lumen/endpoint/env.clj
@@ -17,7 +17,7 @@
   (fn [{tenant :tenant
         query-params :query-params
         :as request}]
-    (let [auth-type (get query-params "auth" "keycloak")
+    (let [auth-type (get query-params "auth" "auth0")
           [auth-url auth-client-id] (condp = auth-type
                                       "keycloak" (auth-data keycloak-public-client)
                                       "auth0" (auth-data auth0-public-client))]


make the user-joined-at query only match on assertions

--- src/braid/core/server/db/common.clj
+++ src/braid/core/server/db/common.clj
@@ -30,7 +30,7 @@
          :where
          [?u :user/id ?user-id]
          [?g :group/id ?group-id]
-         [?g :group/user ?t ?tx ?op]
+         [?g :group/user ?t ?tx true]
          [?tx :db/txInstant ?inst]]
        (d/history (db/db))
        user-id


cleanup db client #332

cleanup db client
#332

--- src/clj/swarmpit/couchdb/client.clj
+++ src/clj/swarmpit/couchdb/client.clj
@@ -124,108 +124,108 @@
   []
   (find-doc {} "secret"))

-;; Docker user
-
-(defn dockerusers
+;; Registry Dockerhub
+
+(defn dockerhubs
   [owner]
   (if (nil? owner)
-    (find-docs "dockeruser")
+    (find-docs "dockerhub")
     (find-docs {"$or" [{:owner {"$eq" owner}}
-                       {:public {"$eq" true}}]} "dockeruser")))
-
-(defn dockeruser
+                       {:public {"$eq" true}}]} "dockerhub")))
+
+(defn dockerhub
   ([id]
    (get-doc id))
   ([username owner]
    (find-doc {:username username
-              :owner    owner} "dockeruser")))
-
-(defn dockeruser-exist?
+              :owner    owner} "dockerhub")))
+
+(defn dockerhub-exist?
   [docker-user]
   (some? (find-doc {:username {"$eq" (:username docker-user)}
-                    :owner    {"$eq" (:owner docker-user)}} "dockeruser")))
-
-(defn create-dockeruser
+                    :owner    {"$eq" (:owner docker-user)}} "dockerhub")))
+
+(defn create-dockerhub
   [docker-user]
-  (-> (assoc docker-user :type "dockeruser")
-      (create-doc)))
-
-(defn update-dockeruser
+  (-> (assoc docker-user :type "dockerhub")
+      (create-doc)))
+
+(defn update-dockerhub
   [docker-user delta]
   (let [allowed-delta (dissoc delta :_id :_rev :username)]
     (update-doc docker-user allowed-delta)))

-(defn delete-dockeruser
+(defn delete-dockerhub
   [docker-user]
   (delete-doc docker-user))

-;; Registry
-
-(defn registries
+;; Registry v2
+
+(defn registries-v2
   [owner]
   (if (nil? owner)
-    (find-docs "registry")
+    (find-docs "v2")
     (find-docs {"$or" [{:owner {"$eq" owner}}
-                       {:public {"$eq" true}}]} "registry")))
-
-(defn registry
+                       {:public {"$eq" true}}]} "v2")))
+
+(defn registry-v2
   ([id]
    (get-doc id))
   ([name owner]
    (find-doc {:name  name
-              :owner owner} "registry")))
-
-(defn registry-exist?
+              :owner owner} "v2")))
+
+(defn registry-v2-exist?
   [registry]
   (some? (find-doc {:name  {"$eq" (:name registry)}
-                    :owner {"$eq" (:owner registry)}} "registry")))
-
-(defn create-registry
+                    :owner {"$eq" (:owner registry)}} "v2")))
+
+(defn create-v2-registry
   [registry]
-  (-> (assoc registry :type "registry")
-      (create-doc)))
-
-(defn update-registry
+  (-> (assoc registry :type "v2")
+      (create-doc)))
+
+(defn update-v2-registry
   [registry delta]
   (let [allowed-delta (dissoc delta :_id :_rev :name)]
     (update-doc registry allowed-delta)))

-(defn delete-registry
+(defn delete-v2-registry
   [registry]
   (delete-doc registry))

-;; AWS ECR
-
-(defn ecrs
+;; Registry AWS ECR
+
+(defn registries-ecr
   [owner]
   (if (nil? owner)
     (find-docs "ecr")
     (find-docs {"$or" [{:owner {"$eq" owner}}
                        {:public {"$eq" true}}]} "ecr")))

-(defn ecr
+(defn registry-ecr
   ([id]
    (get-doc id))
   ([user owner]
    (find-doc {:user  user
               :owner owner} "ecr")))

-(defn ecr-exist?
+(defn registry-ecr-exist?
   [ecr]
   (some? (find-doc {:user  {"$eq" (:user ecr)}
                     :owner {"$eq" (:owner ecr)}} "ecr")))

-(defn create-ecr
+(defn create-ecr-registry
   [ecr]
   (-> (assoc ecr :type "ecr")
       (create-doc)))

-(defn update-ecr
+(defn update-ecr-registry
   [ecr delta]
   (let [allowed-delta (dissoc delta :_id :_rev)]
     (update-doc ecr allowed-delta)))

-(defn delete-ecr
+(defn delete-ecr-registry
   [ecr]
   (delete-doc ecr))


Small fix

Small fix

--- src/cljs/salava/badge/ui/modal.cljs
+++ src/cljs/salava/badge/ui/modal.cljs
@@ -258,7 +258,8 @@
         (check-badge id)

         ;;Endorse-badge
-        (when-not owner? [endr/endorse-badge id])]]
+        (when (and (session/get :user) (not owner?)) [endr/endorse-badge id])
+        #_(when-not owner? [endr/endorse-badge id])]]

       (when-not (empty? alignment)


Add coercions, fix documentation

Add coercions, fix documentation

--- src/clojure/neko/listeners/view.clj
+++ src/clojure/neko/listeners/view.clj
@@ -26,13 +26,19 @@
 (defmacro on-click
   "Takes a body of expressions and yields a View.OnClickListener object that
   will invoke the body.  The body takes an implicit argument 'view' that is the
-  view that was clicked." [& body]
+  view that was clicked."
+  [& body]
   `(on-click-call (fn [~'view] ~@body)))

 (defn on-create-context-menu-call
   "Takes a function and yields a View.OnCreateContextMenuListener object that
-  will invoke the function.  This function must take the three arguments
-  described in on-create-context-menu."
+  will invoke the function.  This function must take the following three
+  arguments:
+
+  menu: the context menu that is being built
+  view: the view for which the context menu is being built
+  info: extra information about the item for which the context menu should be
+        shown.  This information will vary depending on the class of view."
   [handler-fn]
   (reify android.view.View$OnCreateContextMenuListener
     (onCreateContextMenu [this menu view info]
@@ -71,8 +77,10 @@

 (defn on-focus-change-call
   "Takes a function and yields a View.OnFocusChangeListener object that will
-  invoke the function.  This function must take the three arguments This
-  function must take the two arguments described in on-focus-change."
+  invoke the function.  This function must take the following two arguments:
+
+  view:     the view whose state has changed
+  focused?: the new focuse state for view"
   [handler-fn]
   (reify android.view.View$OnFocusChangeListener
     (onFocusChange [this view focused?]
@@ -90,12 +98,18 @@

 (defn on-key-call
   "Takes a function and yields a View.OnKeyListener object that will invoke the
-  function.  This function must take the three arguments and return a boolean
-  value as described in on-key."
+  function.  This function must take the following three arguments:
+
+  view:     the view the key has been dispatched to
+  key-code: the code for the physical key that was pressed
+  event:    the KeyEvent object containing full information about the event
+
+  The function should evaluate to a truthy value if it has consumed the event.
+  Otherwise, it should evaluate to false or nil."
   [handler-fn]
   (reify android.view.View$OnKeyListener
     (onKey [this view key-code event]
-      (handler-fn view key-code event))))
+      (boolean (handler-fn view key-code event)))))

 (defmacro on-key
   "Takes a body of expressions and yields a View.OnKeyListener object that will
@@ -105,8 +119,8 @@
   key-code: the code for the physical key that was pressed
   event:    the KeyEvent object containing full information about the event

-  The body should evaluate to true if it has consumed the event.  Otherwise, it
-  should evaluate to false."
+  The body should evaluate to a truthy value if it has consumed the event.
+  Otherwise, it should evaluate to false or nil."
   [& body]
   `(on-key-call (fn [~'view ~'key-code ~'event] ~@body)))

@@ -143,18 +157,18 @@
 (defn on-long-click-call
   "Takes a function and yields a View.OnLongClickListener object that will
   invoke the function.  This function must take one argument, the view that was
-  clicked, and must evaluate to true if it has consumed the long click, false
-  otherwise."
+  clicked, and must evaluate to a truthy value if it has consumed the long
+  click, false or nil otherwise."
   [handler-fn]
   (reify android.view.View$OnLongClickListener
     (onLongClick [this view]
-      (handler-fn view))))
+      (boolean (handler-fn view)))))

 (defmacro on-long-click
   "Takes a body of expressions and yields a View.OnLongClickListener object
   that will invoke the body.  The body takes an implicit argument 'view' that
-  is the view that was clicked and held.  It should also evaluate to true if it
-  consumes the long click, false otherwise."
+  is the view that was clicked and held.  The body should also evaluate to a
+  truthy value if it consumes the long click, false or nil otherwise."
   [& body]
   `(on-long-click-call (fn [~'view] ~@body)))

@@ -179,12 +193,17 @@

 (defn on-touch-call
   "Takes a function and yields a View.OnTouchListener object that will invoke
-  the function.  This function must take two arguments and return a boolean
-  value as described in on-touch."
+  the function.  This function must take the following two arguments:
+
+  view:  the view the touch event has been dispatched to
+  event: the MotionEvent object containing full information about the event
+
+  It should also evaluate to a truthy value if it consumes the event, false or
+  nil otherwise."
   [handler-fn]
   (reify android.view.View$OnTouchListener
     (onTouch [this view event]
-      (handler-fn view event))))
+      (boolean (handler-fn view event)))))

 (defmacro on-touch
   "Takes a body of expressions and yields a View.OnTouchListener object that
@@ -193,6 +212,7 @@
   view:  the view the touch event has been dispatched to
   event: the MotionEvent object containing full information about the event

-  It should also evaluate to true if it consumes the event, false otherwise."
+  It should also evaluate to a truthy value if it consumes the event, false or
+  nil otherwise."
   [& body]
   `(on-touch-call (fn [~'view ~'event] ~@body)))


open SRL functions for external specific processing

--- src/clojure/zensols/nlparse/srl.clj
+++ src/clojure/zensols/nlparse/srl.clj
@@ -187,7 +187,7 @@
         "aux" "meta" "intj" "parataxis" "csubj" "preconj" "csubjpass" "neg"
         "number" "possessive" "expl" "predet"]))

-(defn- label
+(defn label
   "Label (classify) and return the tokenized sequence **tokens** of a sentence.

   * **tokens** are a sequence of strings that make up a sentence"
@@ -199,7 +199,7 @@
       mapify-parsed-sentences
       first))

-(defn- parse [panon]
+(defn parse [panon]
   (->> panon
        :sents
        (map (fn [sent]


Extract async-reader2 cache read out to reduce method size

--- src/com/wsscode/pathom/connect.cljc
+++ src/com/wsscode/pathom/connect.cljc
@@ -824,6 +824,28 @@
           ::p/continue))
       ::p/continue)))

+(defn- async-read-cache-read
+  [env resolver-sym e batch? processing-sequence trace-data input]
+  (p/cached-async env [resolver-sym e]
+    (fn []
+      (go-catch
+        (if (and batch? processing-sequence)
+          (pt/tracing env (assoc trace-data ::pt/event ::call-resolver-batch)
+            (let [_              (pt/trace env (assoc trace-data ::pt/event ::call-resolver-with-cache))
+                  items          (->> processing-sequence
+                                      (map-async-serial #(entity-select-keys env % input)) <?
+                                      (filterv #(all-values-valid? % input))
+                                      (distinct))
+                  _              (pt/trace env {::pt/event ::batch-items-ready
+                                                ::items    items})
+                  batch-result   (<?maybe (call-resolver env items))
+                  _              (pt/trace env {::pt/event    ::batch-result-ready
+                                                ::items-count (count batch-result)})
+                  linked-results (zipmap items batch-result)]
+              (cache-batch env resolver-sym linked-results)
+              (get linked-results e)))
+          (<?maybe (call-resolver env e)))))))
+
 (defn async-reader2
   "Like reader2, but supports async values on resolver return."
   [{::keys   [indexes max-resolver-weight]
@@ -847,26 +869,7 @@
                               ::sym        resolver-sym
                               ::input-data e}
                   response   (if cache?
-                               (<?maybe
-                                 (p/cached-async env [resolver-sym e]
-                                   (fn []
-                                     (go-catch
-                                       (if (and batch? processing-sequence)
-                                         (pt/tracing env (assoc trace-data ::pt/event ::call-resolver-batch)
-                                           (let [_              (pt/trace env (assoc trace-data ::pt/event ::call-resolver-with-cache))
-                                                 items          (->> processing-sequence
-                                                                     (map-async-serial #(entity-select-keys env % input)) <?
-                                                                     (filterv #(all-values-valid? % input))
-                                                                     (distinct))
-                                                 _              (pt/trace env {::pt/event ::batch-items-ready
-                                                                               ::items    items})
-                                                 batch-result   (<?maybe (call-resolver env items))
-                                                 _              (pt/trace env {::pt/event    ::batch-result-ready
-                                                                               ::items-count (count batch-result)})
-                                                 linked-results (zipmap items batch-result)]
-                                             (cache-batch env resolver-sym linked-results)
-                                             (get linked-results e)))
-                                         (<?maybe (call-resolver env e)))))))
+                               (<?maybe (async-read-cache-read env resolver-sym e batch? processing-sequence trace-data input))
                                (<?maybe (call-resolver env e)))
                   response   (or response {})
                   replan     (fn [error]


BIO entities don't have direct `in taxon` links.

Per a converation with Bill, attaching `in taxon` [1] properties
directly to BIO entities violates OWL semantics.  The preferred
mechanism for determining this relationship is to go via the
`someValuesOf` restriction on the property.

To avoid confusion (and incorrect queries) the incorrect relationship
should simply not be built.

[1] http://purl.obolibrary.org/obo/RO_0002162

--- kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/taxon/taxon.clj
+++ kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/taxon/taxon.clj
@@ -26,11 +26,9 @@
 ;; }

 `{:name "uniprot-in-taxon"
-  :head (
-         (?/r1 rdf/type owl/Restriction)
+  :head ((?/r1 rdf/type owl/Restriction)
          (?/r1 owl/onProperty obo/RO_0002162) ; in_taxon
          (?/r1 owl/someValuesFrom ?/taxon)
-
          (?/protein rdfs/subClassOf ?/r1))
   :body
   ((_/fv0 kiao/hasTemplate iaouniprot/UniProtFileRecord_primaryAccessionDataField1)
@@ -53,12 +51,9 @@
 }

 `{:name "uniprot-sparse-in-taxon"
-  :head ((?/protein obo/RO_0002162 ?/taxon) ; in_taxon
-
-         (?/r1 rdf/type owl/Restriction)
+  :head ((?/r1 rdf/type owl/Restriction)
          (?/r1 owl/onProperty obo/RO_0002162) ; in_taxon
          (?/r1 owl/someValuesFrom ?/taxon)
-
          (?/protein rdfs/subClassOf ?/r1))
   :body
   ((_/fv0 kiao/hasTemplate iaouniprot/SparseUniProtFileRecord_primaryAccessionDataField1)
@@ -83,9 +78,7 @@

 `{:name "eg-in-taxon"
-  :head ((?/gene obo/RO_0002162 ?/taxon) ; in_taxon
-
-         (?/r1 rdf/type owl/Restriction)
+  :head ((?/r1 rdf/type owl/Restriction)
          (?/r1 owl/onProperty obo/RO_0002162) ; in_taxon
          (?/r1 owl/someValuesFrom ?/taxon)

@@ -104,17 +97,14 @@
 }

-;; This rule assigns taxons to bio-entities represented by RefSeq IDs (so genes, proteins, RNAs...)
+;; This rule assigns taxons to bio-entities represented by RefSeq IDs (so
+;; genes, proteins, RNAs...)
 `{:name "refseq-in-taxon"
-  :head ((?/bioentity obo/RO_0002162 ?/taxon) ; in_taxon
-
-         (?/r1 rdf/type owl/Restriction)
+  :head ((?/r1 rdf/type owl/Restriction)
          (?/r1 owl/onProperty obo/RO_0002162) ; in_taxon
          (?/r1 owl/someValuesFrom ?/taxon)
-
          (?/bioentity rdfs/subClassOf ?/r1))

-
   :body (;;(_/record kiao/hasTemplate iaorefseq/RefSeqReleaseCatalogFileDataSchema1)
          ~@(kabob/rtv _/record
                       iaorefseq/RefSeqReleaseCatalogFileData_refseqIdDataField1 _/refseqIce
@@ -125,47 +115,3 @@
   :reify ([?/r1 {:ln (:restriction)
                  :ns "kbio" :prefix "R_"}])
 }
-
-
-
-;; `{:name "uniprot-in-taxon"
-;;   :head ((?/protein obo/inTaxon ?/taxon)
-
-;;          (?/r1 rdf/type owl/Restriction)
-;;          (?/r1 owl/onProperty obo/inTaxon)
-;;          (?/r1 owl/someValuesFrom ?/taxon)
-
-;;          (?/protein rdfs/subClassOf ?/r1))
-
-
-;;   :body
-;;   (~@(kabob/rtv _/record
-;;         iaouniprot/UniProtIDMappingFileData_taxonomyIDDataField1 _/taxonIce
-;;         iaouniprot/UniProtIDMappingFileData_uniProtAccessionIDDataField1
-;;                                                                  _/uniprotIce)
-;;    (_/uniprotIce obo/IAO_0000219 ?/protein)
-;;    (_/taxonIce obo/IAO_0000219 ?/taxon))
-
-;;   :reify (?/r1)
-;; }
-
-;; `{:name "eg-in-taxon"
-;;   :head ((?/gene obo/inTaxon ?/taxon)
-
-;;          (?/r1 rdf/type owl/Restriction)
-;;          (?/r1 owl/onProperty obo/inTaxon)
-;;          (?/r1 owl/someValuesFrom ?/taxon)
-
-;;          (?/gene rdfs/subClassOf ?/r1))
-
-
-;;   :body (;;(_/record kiao/hasTemplate iaoeg/EntrezGeneInfoFileDataSchema1)
-;;          ~@(kabob/rtv _/record
-;;                       iaoeg/EntrezGeneInfoFileData_geneIDDataField1 _/egIce
-;;                       iaoeg/EntrezGeneInfoFileData_taxonIDDataField1 _/taxonIce)
-;;          (_/egIce obo/IAO_0000219 ?/gene)
-;;          (_/taxonIce obo/IAO_0000219 ?/taxon))
-
-;;   :reify (?/r1)
-;; }
-


Hide index spans

Hide index spans

--- src/day8/re_frame/trace/app_db.cljs
+++ src/day8/re_frame/trace/app_db.cljs
@@ -5,6 +5,11 @@
             [day8.re-frame.trace.localstorage :as localstorage]
             [day8.re-frame.trace.components :as components]))

+(devtools.prefs/set-pref! :header-style "")
+
+;; Hide the index spans on the left hand of collections. Shows how many elements in a collection.
+(devtools.prefs/set-pref! :none-style "display: none")
+(devtools.prefs/set-pref! :index-tag [:span :none-style])

 (defn string->css [css-string]
   "This function converts jsonml css-strings to valid css maps for hiccup.
@@ -16,17 +21,7 @@
        (reduce (fn [acc [property value]]
                  (assoc acc (keyword property) value)) {})))

-(def config {:well-known-types #{"cljs.core/Keyword"}
-
-             :render-bools     false
-             :render-strings   false
-             :render-numbers   false
-             :render-keywords  false
-             :render-symbols   false
-             :render-instances false
-             :render-types     false
-             :render-functions false
-             })
+(def config {:initial-hierarchy-depth-budget false})

 (declare jsonml->hiccup)

@@ -86,7 +81,7 @@
             (and @expanded?
               (or (string? data)
                   (number? data)))  [:div {:style {:margin "10px 0"}} data]
-            @expanded?              (jsonml->hiccup (cljs-devtools/header-api-call data config :extra)))]])))
+            @expanded?              (jsonml->hiccup (cljs-devtools/header-api-call data config)))]])))

 (defn render-state  [data]
   (let [subtree-input  (r/atom "")


playing around with mock-sessions

playing around with mock-sessions

--- src/er_cassandra/session/mock.clj
+++ src/er_cassandra/session/mock.clj
@@ -27,6 +27,10 @@
   [statement-responses]
   (->MapMockSession statement-responses (atom [])))

+;; need a statement-matcher, not just a literal statement...
+;; maybe there should be a bunch of "query matchers" and
+;; one or more expectation statements which have to be given
+;; for the test to pass
 (defrecord ListMockSession [statement-responses statement-log-atom]
   Session
   (execute [_ statement]


Fix tests on Travis CI.

Fix tests on Travis CI.

--- profiles.clj
+++ profiles.clj
@@ -17,6 +17,8 @@
            {"phantomjs"
             ["phantomjs" :runner
              "dev-resources/public/js/beatha.js"]}}}
+
+ :tdd [:shared]

  :dev [:shared
        {:source-paths ["dev-resources/tools/http" "dev-resources/tools/repl"]


[WM] bump immutant to 2.0.1

[WM] bump immutant to 2.0.1

--- resources/leiningen/new/kraken/project.clj
+++ resources/leiningen/new/kraken/project.clj
@@ -9,7 +9,7 @@
                  [com.novemberain/langohr "3.2.0"]
                  [democracyworks/datomic-toolbox "1.0.0" :exclusions [com.datomic/datomic-pro]]
                  [com.datomic/datomic-pro "0.9.5153" :exclusions [joda-time]]
-                 [org.immutant/core "2.0.0"]
+                 [org.immutant/core "2.0.1"]
                  [democracyworks/kehaar "0.3.0"]]
   :plugins [[lein-immutant "2.0.0"]]
   :main ^:skip-aot {{name}}.core


[WM] bump clojure to 1.7.0-RC1

[WM] bump clojure to 1.7.0-RC1

--- resources/leiningen/new/kraken/project.clj
+++ resources/leiningen/new/kraken/project.clj
@@ -3,7 +3,7 @@
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[org.clojure/clojure "1.7.0-alpha5"]
+  :dependencies [[org.clojure/clojure "1.7.0-RC1"]
                  [org.clojure/tools.logging "0.3.1"]
                  [turbovote.resource-config "0.1.4"]
                  [com.novemberain/langohr "3.2.0"]


whitespace

whitespace

--- resources/leiningen/new/tenzing/build.boot
+++ resources/leiningen/new/tenzing/build.boot
@@ -2,8 +2,8 @@
  :source-paths    {{{source-paths}}}
  :resource-paths  #{"resources"}
  :dependencies '[[adzerk/boot-cljs      "0.0-2411-3" :scope "test"]
-                 [adzerk/boot-cljs-repl "0.1.7"       :scope "test"]
-                 [adzerk/boot-reload    "0.2.0"       :scope "test"]{{{deps}}}])
+                 [adzerk/boot-cljs-repl "0.1.7"      :scope "test"]
+                 [adzerk/boot-reload    "0.2.0"      :scope "test"]{{{deps}}}])

 (require
  '[adzerk.boot-cljs      :refer [cljs]]


corrected wrong endings for 2nd 3rd plur fut span

--- src/babel/espanol/morphology/verbs.cljc
+++ src/babel/espanol/morphology/verbs.cljc
@@ -136,16 +136,16 @@
      ;; <second person plural future>

      (and (= person :2nd) (= number :plur) vosotros)
-     (str stem "ais")
+     (str stem "éis")

      (and (= person :2nd) (= number :plur) ustedes)
-     (str stem "an")
+     (str stem "án")

      ;; </second person plural future>

      ;; <third person plural future>
      (and (= person :3rd) (= number :plur))
-     (str stem "an")
+     (str stem "án")

      ;; </third person plural future>


Refactored card functions

Refactored card functions

--- src/clj/funstructor/cards_functions.clj
+++ src/clj/funstructor/cards_functions.clj
@@ -8,17 +8,22 @@

 ;; TODO card accessor

+(defn apply-to-cards
+  "Get access to clojure"
+  [game-map player-key]
+  (partial update-in game-map [player-key :cards]))
+
 (defn take-card
   "Add card to player state"
   [game-map player-key card]
-  (update-in game-map [player-key :cards]
-             (fn [v] (conj v card))))
+  ((apply-to-cards game-map player-key)
+   (fn [v] (conj v card))))

 (defn delete-card
   "Delete card from player state"
   [game-map player-key card-pos]
-  (update-in game-map [player-key :cards]
-             (fn [v] (u/delete-from-vector v card-pos))))
+  ((apply-to-cards game-map player-key)
+   (fn [v] (u/delete-from-vector v card-pos))))

 (defn use-card
   "Player Key:  UUID of player


finish playlist lesson design

finish playlist lesson design

--- src/cljs/daveconservatoire/site/ui.cljs
+++ src/cljs/daveconservatoire/site/ui.cljs
@@ -761,16 +761,26 @@

   Object
   (render [this]
-    (let [{:keys [youtube/id playlist-item/title playlist-item/text]} (om/props this)]
+    (let [{:keys [youtube/id playlist-item/title playlist-item/text]} (om/props this)
+          {:keys [set-selected selected-index playlist-items]} (om/get-computed this)]
       (dom/div nil
         (dom/div #js {:className "vendor"} (ytp/youtube-player {:videoId id}))
-        (dom/div #js {:className "classroom-slider coda-slider-wrapper arrows" :style #js {:padding 0}}
-          (dom/div #js {:style {:width 20}})
+        (dom/div #js {:className "classroom-slider coda-slider-wrapper arrows"}
+          (dom/div #js {:className "coda-nav-left", :id "coda-nav-left-1"}
+            (dom/a #js {:href     "#"
+                        :onClick  #(set-selected (dec selected-index))
+                        :disabled (= 0 selected-index)}
+              "«"))
           (dom/div #js {:className "coda-slider" :style {:height 169}}
             (dom/div #js {:className "panel" :style {:display "block"}}
               (dom/div #js {:className "panel-wrapper"}
                 (dom/h2 #js {:className "title"} title)
-                (dom/p nil text)))))))))
+                (dom/p nil text))))
+          (dom/div #js {:className "coda-nav-right", :id "coda-nav-right-1"}
+            (dom/a #js {:href     "#"
+                        :onClick  #(set-selected (inc selected-index))
+                        :disabled (= (dec (count playlist-items)) selected-index)}
+              "»")))))))

 (def lesson-playlist-item (om/factory LessonPlaylistItem))

@@ -799,21 +809,9 @@
           (dom/div #js {:className "span9"}
             (dom/div #js {:className "lesson-content"}
               (if item
-                (lesson-playlist-item item))
-              (dom/div #js {:className "classroom-slider coda-slider-wrapper arrows" :style #js {:padding 0}}
-                (dom/div #js {:className "coda-nav-left", :id "coda-nav-left-1"}
-                  (dom/a #js {:href     "#"
-                              :onClick  #(set-selected (dec selected-index))
-                              :disabled (= 0 selected-index)}
-                    "«"))
-                (dom/div #js {:className "coda-slider", :id "coda-slider-1", :style {:height 169}}
-                  (dom/div #js {:className "panel", :style {:display "block"}}
-                    (dom/div #js {:className "panel-wrapper"})))
-                (dom/div #js {:className "coda-nav-right", :id "coda-nav-right-1"}
-                  (dom/a #js {:href     "#"
-                              :onClick  #(set-selected (inc selected-index))
-                              :disabled (= (dec (count playlist-items)) selected-index)}
-                    "»"))))
+                (lesson-playlist-item (om/computed item {:set-selected   set-selected
+                                                         :selected-index selected-index
+                                                         :playlist-items playlist-items}))))
             (lesson-pagination pagination)))))))

 (def lesson-playlist (om/factory LessonPlaylist))


texture by keywords

texture by keywords

--- src/cljs/infinitelives/pixi/sprite.cljs
+++ src/cljs/infinitelives/pixi/sprite.cljs
@@ -1,6 +1,7 @@
 (ns infinitelives.pixi.sprite
   (:require [PIXI]
             [infinitelives.utils.vec2 :as vec2]
+            [infinitelives.pixi.texture :as texture]
             )
 )

@@ -16,7 +17,7 @@
                    xhandle 0.5 yhandle 0.5
                    scale 1
                    alpha 1}}]
-  (let [s (PIXI/Sprite. texture)]
+  (let [s (PIXI/Sprite. (if (keyword? texture) (texture/get texture) texture))]
     (set! (.-anchor s) (make-point xhandle yhandle))
     (set! (.-x s) x)
     (set! (.-y s) y)
@@ -57,7 +58,9 @@
    (set! (.-scale sprite) (make-point sx sy))))

 (defn set-texture! [sprite tex]
-  (.setTexture sprite tex))
+  (if (keyword? tex)
+    (.setTexture sprite (texture/get tex))
+    (.setTexture sprite tex)))

 (defn get-pos


Fixed inconsistencies in the deprecation warning messages of commands

--- src/com/puppetlabs/puppetdb/command.clj
+++ src/com/puppetlabs/puppetdb/command.clj
@@ -310,9 +310,14 @@
         (scf-storage/replace-catalog! catalog timestamp catalog-hash-debug-dir)))
     (log/info (format "[%s] [%s] %s" id (command-names :replace-catalog) certname))))

+(defn warn-deprecated
+  "Logs a deprecation warning message for the given `command` and `version`"
+  [version command]
+  (log/warn (format "command '%s' version %s is deprecated, use the latest version" command version)))
+
 (defmethod process-command! [(command-names :replace-catalog) 1]
   [{:keys [version payload] :as command} options]
-  (log/warn "command 'replace catalog' version 1 is deprecated, use the latest version")
+  (warn-deprecated version "replace catalog")
   (when-not (string? payload)
     (throw (IllegalArgumentException.
              (format "Payload for a '%s' v1 command must be a JSON string."
@@ -321,12 +326,12 @@

 (defmethod process-command! [(command-names :replace-catalog) 2]
   [{:keys [version] :as  command} options]
-  (log/warn "command 'replace catalog' version 2 is deprecated, use the latest version")
+  (warn-deprecated version "replace catalog")
   (replace-catalog* command options))

 (defmethod process-command! [(command-names :replace-catalog) 3]
   [{:keys [version] :as  command} options]
-  (log/warn "command 'replace catalog' version 2 is deprecated, use the latest version")
+  (warn-deprecated version "replace catalog")
   (replace-catalog* command options))

 (defmethod process-command! [(command-names :replace-catalog) 4]
@@ -336,7 +341,8 @@
 ;; Fact replacement

 (defmethod process-command! [(command-names :replace-facts) 1]
-  [command config]
+  [{:keys [version] :as command} config]
+  (warn-deprecated version "replace facts")
   (-> command
       (assoc :version 2)
       (update-in [:payload] #(upon-error-throw-fatality (json/parse-string %)))
@@ -386,11 +392,12 @@

 (defmethod process-command! [(command-names :store-report) 1]
   [{:keys [version] :as command} {:keys [db]}]
-  (log/warn "command 'store report' version 1 is deprecated, use the latest version")
+  (warn-deprecated version "store report")
   (store-report* 1 db command))

 (defmethod process-command! [(command-names :store-report) 2]
   [{:keys [version] :as command} {:keys [db] :as config}]
+  (warn-deprecated version "store report")
   (store-report* 2 db command))

 (defmethod process-command! [(command-names :store-report) 3]


Remove json- from response builder

Remove json- from response builder

--- src/silly_image_store/handler.clj
+++ src/silly_image_store/handler.clj
@@ -16,7 +16,7 @@
 (defn- request-url [{scheme :scheme, {host "host"} :headers, uri :uri}]
   (str (name scheme) "://" host uri))

-(defn- json-list-response-builder [request]
+(defn- list-response-builder [request]
   (let [base-url (request-url request)
         to-json (fn [n] {:name n :url (str base-url "/" n)})]
     (fn [names] (map to-json names))))
@@ -36,9 +36,9 @@
     {:body (into {} links)}))

 (defn- list-images-route [request bucket]
-  (let [json-list-response (json-list-response-builder request)
+  (let [list-response (list-response-builder request)
         image-names (store/list-images images-dir bucket)]
-    (json-list-response image-names)))
+    (list-response image-names)))

 (defn- serve-image-route [bucket image]
   (let [image-file (store/load-image images-dir bucket image)]
@@ -49,9 +49,9 @@
     (or image-file (not-found "random"))))

 (defn- list-buckets-route [request]
-  (let [json-list-response (json-list-response-builder request)
+  (let [list-response (list-response-builder request)
         bucket-names (store/list-image-dirs images-dir)]
-    (json-list-response bucket-names)))
+    (list-response bucket-names)))

 (defroutes app-routes
   (GET "/" [:as request] (root-route request "" [:images :buckets :random]))


carry-logging: better docstring

carry-logging: better docstring

--- contrib/logging/src/carry_logging/core.cljs
+++ contrib/logging/src/carry_logging/core.cljs
@@ -2,7 +2,7 @@
   (:require))

 (defn add
-  "Will print all signals and actions to console."
+  "Will print all signals and actions to console with using the specified prefix string."
   ([spec] (add spec ""))
   ([spec prefix]
    {:pre [(:control spec) (:reconcile spec)]}


chore(lein): removed project.clj for ccw.core

--- ccw.core/project.clj
+++ ccw.core/project.clj
@@ -1,15 +0,0 @@
-(defproject ccw.core "0.0.1-SNAPSHOT"
-  :description "Counterclockwise"
-  :license {:name "Eclipse Public License"
-            :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[org.clojure/clojure "1.5.1"]
-                 [org.clojure/clojure-contrib "1.2.0"]
-                 [leiningen "2.3.4"]
-                 [org.clojure/tools.nrepl "0.2.3"]
-                 [org.clojure/core.incubator "0.1.0"]
-                 [com.cemerick/drawbridge "0.0.6"]
-                 [net.cgrand/parsley "0.9.1"]
-                 [ccw/ccw.server "0.1.1"]
-                 ]
-  :source-paths []
-  :plugins [[ccw/lein-ccw-deps "0.1.0"]])


adding route for update current player

adding route for update current player

--- cartagena-engine/src/cartagena/server.clj
+++ cartagena-engine/src/cartagena/server.clj
@@ -10,6 +10,10 @@
 (def default-players [{:name "tanya" :color :orange} {:name "rusty" :color :black}])
 (defroutes app-routes
            (GET "/" [] "
Hello World
")
+
+           (POST "/update-active-player" req
+             (let [{:keys [actions-remaining current-player player-order]} (:body req)]
+               (response/response (engine/update-current-player actions-remaining current-player player-order))))

            (POST "/play-card" req
              (let [{:keys [player icon from-space board discard-pile]} (:body req)]


updated dependencies and builds

updated dependencies and builds


Remove global source path, should not be needed

--- project.clj
+++ project.clj
@@ -19,7 +19,6 @@
                                     "dev-resources/private/test/node/compiled"         ;; node-test, node-simple-test
                                     "resources/public/js/compiled"                     ;; min
                                     "out" :target-path]
-  :source-paths ["src/cljs"]
   :hooks [leiningen.cljsbuild]
   :min-lein-version "2.0.0"
   :jvm-opts ^:replace ["-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1" "-Xverify:none"]


Prepare for next release cycle.

Prepare for next release cycle.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject org.onyxplatform/onyx-datomic "0.10.0.0-beta2"
+(defproject org.onyxplatform/onyx-datomic "0.10.0.0-SNAPSHOT"
   :description "Onyx plugin for Datomic"
   :url "https://github.com/onyx-platform/onyx-datomic"
   :license {:name "Eclipse Public License"


[#5] Remove ClojureScript dependencies

[#5] Remove ClojureScript dependencies

--- project.clj
+++ project.clj
@@ -4,43 +4,18 @@
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [org.clojure/clojurescript "0.0-2371"]
                  [com.cognitect/transit-clj "0.8.259"]
                  [com.datomic/datomic-free "0.9.5078"]
                  [datomic-schema-grapher "0.0.1"]
-                 [enfocus "2.1.0"]
                  [compojure "1.2.2"]
                  [http-kit "2.1.18"]
                  [javax.servlet/servlet-api "2.5"]
                  [environ "1.0.0"]
-                 [cljs-ajax "0.3.3"]
                  [com.taoensso/timbre "3.3.1"]
-                 [figwheel "0.1.5-SNAPSHOT"]
                  ]
-  :plugins [[lein-cljsbuild "1.0.3"]
-            [lein-figwheel "0.1.5-SNAPSHOT"]
-            [datomic-schema-grapher "0.0.1"]
+  :plugins [[datomic-schema-grapher "0.0.1"]
             [lein-environ "1.0.0"]]

-  :cljsbuild {
-              :builds [{:id "dev"
-                        :source-paths ["src" "src-cljs-dev"]
-                        :compiler {:output-to "resources/public/js/compiled/dev.js"
-                                   :output-dir "resources/public/js/compiled/out"
-                                   :optimizations :none
-                                   :source-map true}}
-                       {:id "prod"
-                        :source-paths ["src"]
-                        :compiler {
-                                   :output-to "resources/public/js/main.js"
-                                   :optimizations :advanced
-                                   :pretty-print false}}]}
   :ring {:handler kmg.core/app}
   :main kmg.core
-  :aot [kmg.core]
-  :figwheel {
-             :http-server-root "public" ;; default and assumes "resources"
-             :server-port 3449 ;; default
-             :css-dirs ["public/resources/css"] ;; watch and update CSS
-             :ring-handler kmg.core/app
-             })
+  :aot [kmg.core])


Version 0.1.1-SNAPSHOT

Version 0.1.1-SNAPSHOT


lein-release plugin: preparing 0.134 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject maestro "0.134-SNAPSHOT"
+(defproject maestro "0.134"
   :description "Maestro service"
   :license  "https://github.com/mixradio/mr-maestro/blob/master/LICENSE"


Update dependencies.

Update dependencies.

--- project.clj
+++ project.clj
@@ -4,7 +4,7 @@
   :license {:name "Apache 2.0"
             :url "http://www.apache.org/licenses/LICENSE-2.0"}
   :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
-                 [buddy/buddy-core "0.10.0"]
+                 [buddy/buddy-core "0.11.0"]
                  [clojurewerkz/scrypt "1.2.0"]]
   :source-paths ["src/clojure"]
   :java-source-paths ["src/java"]


Finished with version 0.1.0. Update the version.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject falkland-cms "0.1.0-SNAPSHOT"
+(defproject falkland-cms "0.1.0"
   :description "Falkland CMS is a Content/Collection Management System written in Clojure, ClojureScript and CouchDB."
   :url "https://github.com/SnootyMonkey/Falkland-CMS/"
   :license {:name "Mozilla Public License v2.0"


Updated Clojure version to 1.8.0-RC4

Updated Clojure version to 1.8.0-RC4

--- project.clj
+++ project.clj
@@ -5,7 +5,7 @@
         :url "https://github.com/uncomplicate/clojurecl"}
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[org.clojure/clojure "1.8.0-RC3"]
+  :dependencies [[org.clojure/clojure "1.8.0-RC4"]
                  [org.jocl/jocl "0.2.0-RC00"]
                  [org.clojure/core.async "0.2.374"]
                  [vertigo "0.1.4"]]


Update jruby, too

Update jruby, too

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
 (defproject zweikopf "1.0.1"
   :description "jruby clojure interop"
   :dependencies [[org.clojure/clojure "1.8.0"]
-                 [org.jruby/jruby-complete "1.7.10"]])
+                 [org.jruby/jruby-complete "9.1.6.0"]])


pump version

pump version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject sync "0.9.11"
+(defproject sync "0.9.12-SNAPSHOT"
   :description "sync is a Leiningen plugin to sync same code base between different clojure projects"
   :url "https://github.com/otto-de/leinsync"
   :license {:name "Eclipse Public License"


lein-release plugin: preparing 0.46 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject shuppet "0.46-SNAPSHOT"
+(defproject shuppet "0.46"
   :description "Shuppet service"
   :url "http://wikis.in.nokia.com/NokiaMusicArchitecture/Shuppet"


Back to SNAPSHOT.

Back to SNAPSHOT.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject lein-ancient "0.4.2"
+(defproject lein-ancient "0.4.3-SNAPSHOT"
   :description "Check your Projects for outdated Dependencies."
   :url "https://github.com/xsc/lein-ancient"
   :dependencies [[org.clojure/data.xml "0.0.7"]


Bump version to 4.2.3.2-SNAPSHOT

Bump version to 4.2.3.2-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(def pdb-version "4.2.3.1")
+(def pdb-version "4.2.3.2-SNAPSHOT")

 (defn deploy-info
   "Generate deployment information from the URL supplied and the username and


Rename war file to ROOT.war to try and get it to deploy at root of domain

--- project.clj
+++ project.clj
@@ -27,5 +27,5 @@
                       [lein-kibit "0.0.8"]
                       [jonase/eastwood "0.2.1"]]
             :ring {:handler      checkin.handler/app
-                   :uberwar-name "loneworkercheckin.war"}
+                   :uberwar-name "ROOT.war"}
             :aliases {"run-proxied" ["with-profile" "proxied" "ring" "server"]})


Version 0.9.0-alpha5-SNAPSHOT

Version 0.9.0-alpha5-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject ch.sbs/mdr2 "0.9.0-alpha4"
+(defproject ch.sbs/mdr2 "0.9.0-alpha5-SNAPSHOT"

   :description "A Production Management Tool for DAISY Talking Books"
   :url "https://github.com/sbsdev/mdr2"


Bump piggieback

Bump piggieback

--- project.clj
+++ project.clj
@@ -43,7 +43,7 @@
              :dev {:plugins [[jonase/eastwood "0.3.14"]]
                    :global-vars {*warn-on-reflection* true}
                    :dependencies [[org.clojure/clojurescript "1.9.946"]
-                                  [cider/piggieback "0.4.1"]
+                                  [cider/piggieback "0.5.2"]
                                   [leiningen-core "2.9.5"]
                                   [commons-io/commons-io "2.8.0"]]
                    :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}


Added kryonet dep.

Added kryonet dep.

--- project.clj
+++ project.clj
@@ -9,7 +9,8 @@
                  [org.yaml/snakeyaml "1.9"]
                  [commons-io "1.4"]
                  [storm/libthrift7 "0.7.0"]
-                 [jackknife "0.1.1"]
+                 [edb/kryonet "1.0.4"]
+                 [jackknife "0.1.2"]
                  [hadoop-util "0.2.7"]
                  [cascading.kryo "0.1.5"]
                  [com.sleepycat/je "5.0.34"]


(PDB-1307) Update to tk-jetty 1.3.0

(PDB-1307) Update to tk-jetty 1.3.0

--- project.clj
+++ project.clj
@@ -16,7 +16,7 @@
            "0.0-dev-build"))))))

 (def tk-version "1.1.0")
-(def tk-jetty9-version "1.2.0")
+(def tk-jetty9-version "1.3.0")
 (def ks-version "1.0.0")

 (defproject puppetdb (version-string)


bump clojure 1.8.0-RC5 to 1.8.0

bump clojure 1.8.0-RC5 to 1.8.0

--- project.clj
+++ project.clj
@@ -26,7 +26,7 @@
                                   [compojure "1.4.0" :exclusions [org.clojure/clojure]]]}
              :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
              :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}
-             :1.8 {:dependencies [[org.clojure/clojure "1.8.0-RC5"]]}
+             :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}
              }

   :plugins [[lein-midje "3.2"]


Upgraded dependencies

Upgraded dependencies

--- project.clj
+++ project.clj
@@ -1,6 +1,6 @@
 (defproject vorrichtung "0.8.4"
   :dependencies [[org.clojure/clojure "1.8.0"]
-                 [org.clojure/clojurescript "1.8.51"]
+                 [org.clojure/clojurescript "1.9.36"]
                  [com.cognitect/transit-cljs "0.8.237"]
                  [reagent "0.5.1"]
                  [re-frame "0.7.0"]]


selfdual2d.clj: uses less Java and more Clojure for D-symbol functionality

--- clojure/org/gavrog/clojure/selfdual2d.clj
+++ clojure/org/gavrog/clojure/selfdual2d.clj
@@ -1,31 +1,22 @@
 (ns org.gavrog.clojure.selfdual2d
   (:use (org.gavrog.clojure
-          [delaney]))
+          [delaney]
+          [generators :only [results]]
+          [branchings2d :only [branchings]]))
   (:import (org.gavrog.jane.fpgroups SmallActionsIterator)
-           (org.gavrog.jane.numbers Whole)
-           (org.gavrog.joss.dsyms.basic DSymbol)
-           (org.gavrog.joss.dsyms.derived FundamentalGroup DSCover Covers)
-           (org.gavrog.joss.tilings Tiling)
-           (org.gavrog.joss.dsyms.generators DefineBranching2d))
+           (org.gavrog.joss.dsyms.derived FundamentalGroup DSCover)
+           (org.gavrog.joss.tilings Tiling))
   (:gen-class))
-
-(defn self-dual? [ds] (= ds (.dual ds)))
-
-(defn minimal? [ds] (.isMinimal ds))

 (defn euclidean? [ds] (= (curvature ds 1) 0))

 (defn proto-euclidean? [ds] (>= (curvature ds 1) 0))

-(defn good-face-sizes? [ds]
-  (let [t (map #(.m ds 0 1 %) (orbit-reps ds [0 1]))]
-    (and (<= (count (distinct t)) 2) (some #(= 3 %) t))))
-
 (defn- good-node [net pos v]
   (not (empty? (.goodCombinations net (.allIncidences net v) pos))))

 (defn convex? [ds]
-  (if-let [net (try (.getSkeleton (Tiling. ds))
+  (if-let [net (try (.getSkeleton (Tiling. (java-dsymbol ds)))
                  (catch IllegalArgumentException e))]
     (let [pos (.barycentricPlacement net)]
       (every? (partial good-node net pos)
@@ -36,9 +27,9 @@
     (reduce #(and %1 (apply %2 args)) true preds)))

 (defn d-sets [max-size]
-  (let [G (FundamentalGroup. (DSymbol. "1:1,1,1:0,0"))]
+  (let [G (FundamentalGroup. (java-dsymbol "1:1,1,1"))]
     (filter (andp self-dual? proto-euclidean?)
-            (map #(.flat (DSCover. G %))
+            (map #(dsymbol (DSCover. G %))
                  (SmallActionsIterator. (.getPresentation G) max-size false)))))

 (defn print-seq [xs format-item format-summary]
@@ -52,12 +43,12 @@
 (defn d-syms [max-size]
   (let [good? (andp self-dual? minimal? euclidean? convex?)]
     (for [dset (d-sets max-size)
-          dsym (lazy-seq (DefineBranching2d. dset 3 3 Whole/ZERO))
+          dsym (results (branchings dset))
           :when (good? dsym)]
-    (.canonical dsym))))
+    (canonical dsym))))

 ;; Main entry point when used as a script
 (defn -main [& args]
   (print-seq (d-syms (Integer/parseInt (first args)))
-             str
+             print-str
              #(str "# Generated " %1 " symbols in " %2 " seconds.")))


Revert to showing username instead of mention name

--- src/yetibot/core/models/users.clj
+++ src/yetibot/core/models/users.clj
@@ -27,7 +27,7 @@
   ([username user-info] (create-user username true user-info))
   ([username active? {:keys [id] :as user-info}]
    (let [id (str (or id username))
-         mention-name (or (:mention-name user-info) username)] ; use username as the id if nil
+         mention-name username] ; mention name breaks pure-text representation of user
      (merge user-info {:username username
                        :name username ; alias for backward compat
                        :mention-name mention-name


Update to reflect API changes

Update to reflect API changes

--- minicraft/desktop/src-common/minicraft/core.clj
+++ minicraft/desktop/src-common/minicraft/core.clj
@@ -86,14 +86,14 @@
         (= keycode (key-code :space))
         (e/attack entities me))))
   :on-touch-down
-  (fn [{:keys [screen-x screen-y]} entities]
+  (fn [{:keys [x y]} entities]
     (let [entity (->> entities (filter :is-me?) first)
           min-x (/ (game :width) 3)
           max-x (* (game :width) (/ 2 3))
           min-y (/ (game :height) 3)
           max-y (* (game :height) (/ 2 3))]
       (cond
-        (and (< min-x screen-x max-x) (< min-y screen-y max-y))
+        (and (< min-x x max-x) (< min-y y max-y))
         (e/attack entity entities)))))

 (defscreen text-screen


Fix: A dance is the collection of moves

Fix: A dance is the collection of moves

We are doing a billion dances, not moves

--- src/advent_2017/day_16.cljc
+++ src/advent_2017/day_16.cljc
@@ -45,7 +45,6 @@
   (let [final-positions (iterate #(reduce apply-dance-move % data) starting-position)
         period          (loop [final-positions (rest final-positions) counter 1]
                           (if (= starting-position (first final-positions))
-                            (* counter (count data))
-                            (recur (rest final-positions) (inc counter))))
-        [start offset] ((juxt quot rem) (rem 1000000000 period) (count data))]
-    (apply str (reduce apply-dance-move (nth final-positions start) (take offset data)))))
+                            counter
+                            (recur (rest final-positions) (inc counter))))]
+    (apply str (nth final-positions (rem 1000000000 period)))))


fix chat channel order

fix chat channel order


fix helmsman-definition so it doesn't break for apps without routes


explain-tests with phantom. disable test.

--- test/cljc/spec_tools/core_test.cljc
+++ test/cljc/spec_tools/core_test.cljc
@@ -268,7 +268,7 @@
                                         :spec spec/int?
                                         :value "12"})
              (st/explain-data spec/int? "12")))
-      (is (.startsWith
+      #_(is (.startsWith
             (with-out-str (st/explain spec/int? "12"))
             "val: \"12\" fails predicate: int?\n"))))
   (testing "with conforming"


fixed names in test

fixed names in test

--- test/forma/trends/analysis_test.clj
+++ test/forma/trends/analysis_test.clj
@@ -160,7 +160,7 @@
 ;; "Elapsed time: 5650.48 msecs"

-(def total-tap
+(def ts-tap
   (vec (repeat 2 {:start 0 :end 271 :ndvi ndvi :reli reli :rain rain})))

 (defn long-trend-results
@@ -174,15 +174,12 @@
   (let [ndvi (vector (:ndvi m))
         reli (vector (:reli m))
         rain (vector (:rain m))])
-  (vec (transpose (telescoping-long-trend 23 135 136 ndvi reli rain))))
-
-(defn short-trend-results
-  [m]
-  )
+  (transpose (telescoping-long-trend 23 135 136 ndvi reli rain)))
+

 (def long-trend-query
   (<- [?han-stat ?long-drop ?long-tstat]
-      (total-tap ?ts-map)
+      (ts-tap ?ts-map)
       (long-trend-results ?ts-map :> ?han-stat ?long-drop ?long-tstat)
       (:distinct false)))


allow for "spec" argument: if supplied, only run the named demo

--- src/babel/english/demo.cljc
+++ src/babel/english/demo.cljc
@@ -7,7 +7,7 @@

 (declare run-demo-with)

-(defn demo [ & [n]]
+(defn demo [ & [n spec]]
   (let [demo-specs
         [{:demo-name "Dog noun phrases"
           :synsem {:cat :noun
@@ -44,7 +44,11 @@
                                          (do
                                            (println (fo expression))))
                                        expressions))))))
-                demo-specs))))
+                (if spec
+                  (filter #(= (:demo-name %)
+                              spec)
+                          demo-specs)
+                  demo-specs)))))

 (defn run-demo-with [ & [n spec]]
   "print out _n_ generated sentences to stdout."


+(def rule-matcher); (defn rule-matcher-reducer)

--- src/babel/italiano/lab.cljc
+++ src/babel/italiano/lab.cljc
@@ -373,6 +373,28 @@
                         babel.generate/index-fn index-fn]
                 (time (generate spec model))))))))

+;; this is a lot like a lexical compilation default map.
+(def rule-matcher
+  {{:root {:italiano {:italiano "chiamarsi"}}}
+   chiamarsi-grammar
+
+   {:tense :present
+    :aspect :perfect}
+   present-perfect-grammar
+
+   {:tense :future}
+   future-grammar})
+
+(defn rule-matcher-reducer [input-spec]
+  (reduce
+   clojure.set/union
+   (map (fn [key-in-rule-matcher]
+          (let [result (unify key-in-rule-matcher input-spec)]
+            (if (= :fail result)
+              nil
+              (get rule-matcher key-in-rule-matcher))))
+        (keys rule-matcher))))
+
 (defn generate-for-verbcoach
   "generate sentences efficiently given specific constraints."
   []
@@ -393,41 +415,16 @@
        (let [chosen-spec
              (unify (first (shuffle specs))
                     (first (shuffle tense-specs)))]
-         (let [generate-with-grammar
-               (cond
-                 (not (= :fail
-                         (unify
-                          chosen-spec
-                          {:root {:italiano {:italiano "chiamarsi"}}})))
-                 (filter (fn [rule-structure]
-                           (contains? chiamarsi-grammar
-                                      (u/get-in rule-structure [:rule])))
-                         (:grammar model))
-
-                 (not (= :fail
-                         (unify(u/get-in chosen-spec [:synsem :sem])
-                               {:tense :present
-                                :aspect :perfect})))
-                 (filter (fn [rule-structure]
-                           (contains? present-perfect-grammar
-                                      (u/get-in rule-structure [:rule])))
-                         (:grammar model))
-
-                 (not (= :fail
-                         (unify (u/get-in chosen-spec [:synsem :sem])
-                                {:tense :future})))
-                 (filter (fn [rule-structure]
-                           (contains? future-grammar
-                                      (u/get-in rule-structure [:rule])))
-                         (:grammar model))
-                 true
-                 ;; else use entire model
-                 (do
-                   (log/warn "using entire model: will be slow.")
-                   (:grammar model)))]
+         (let [generate-with-grammar-set
+               (rule-matcher-reducer chosen-spec)
+               grammar
+               (filter (fn [rule-structure]
+                         (contains? generate-with-grammar-set
+                                    (u/get-in rule-structure [:rule])))
+                       (:grammar model))]
            (morph (binding [babel.generate/println? false
                             babel.generate/truncate? true
-                            babel.generate/grammar generate-with-grammar]
+                            babel.generate/grammar grammar]
                     (time (generate chosen-spec model))))))))))

 (defn stampare