need with-conn for migration

need with-conn for migration

--- src/chat/server/migrate.clj
+++ src/chat/server/migrate.clj
@@ -47,33 +47,34 @@
 (defn migrate-2015-08-26
   "schema change for invites"
   []
-  (d/transact db/*conn*
-    [
-     ; invitations
-     {:db/ident :invite/id
-      :db/valueType :db.type/uuid
-      :db/cardinality :db.cardinality/one
-      :db/unique :db.unique/identity
-      :db/id #db/id [:db.part/db]
-      :db.install/_attribute :db.part/db}
-     {:db/ident :invite/group
-      :db/valueType :db.type/ref
-      :db/cardinality :db.cardinality/one
-      :db/id #db/id [:db.part/db]
-      :db.install/_attribute :db.part/db}
-     {:db/ident :invite/from
-      :db/valueType :db.type/ref
-      :db/cardinality :db.cardinality/one
-      :db/id #db/id [:db.part/db]
-      :db.install/_attribute :db.part/db}
-     {:db/ident :invite/to
-      :db/valueType :db.type/string
-      :db/cardinality :db.cardinality/one
-      :db/id #db/id [:db.part/db]
-      :db.install/_attribute :db.part/db}
-     {:db/ident :invite/created-at
-      :db/valueType :db.type/instant
-      :db/cardinality :db.cardinality/one
-      :db/id #db/id [:db.part/db]
-      :db.install/_attribute :db.part/db}
-     ]))
+  (db/with-conn
+    (d/transact db/*conn*
+      [
+       ; invitations
+       {:db/ident :invite/id
+        :db/valueType :db.type/uuid
+        :db/cardinality :db.cardinality/one
+        :db/unique :db.unique/identity
+        :db/id #db/id [:db.part/db]
+        :db.install/_attribute :db.part/db}
+       {:db/ident :invite/group
+        :db/valueType :db.type/ref
+        :db/cardinality :db.cardinality/one
+        :db/id #db/id [:db.part/db]
+        :db.install/_attribute :db.part/db}
+       {:db/ident :invite/from
+        :db/valueType :db.type/ref
+        :db/cardinality :db.cardinality/one
+        :db/id #db/id [:db.part/db]
+        :db.install/_attribute :db.part/db}
+       {:db/ident :invite/to
+        :db/valueType :db.type/string
+        :db/cardinality :db.cardinality/one
+        :db/id #db/id [:db.part/db]
+        :db.install/_attribute :db.part/db}
+       {:db/ident :invite/created-at
+        :db/valueType :db.type/instant
+        :db/cardinality :db.cardinality/one
+        :db/id #db/id [:db.part/db]
+        :db.install/_attribute :db.part/db}
+       ])))


Fix render coordinates

Fix render coordinates

--- src/chessground/render.cljs
+++ src/chessground/render.cljs
@@ -6,10 +6,15 @@
 (defn piece [{color :color role :role}]
   (str "

"))

-(defn square [key pos p]
+(defn square [key pos p white]
   (let [style (apply str (map (fn [[k v]] (str (name k) ":" v ";")) pos))
-        coord-y (if (= (subs key 0 1) "a") (str "data-coord-y='" (subs key 1 2) "' ") "")
-        coord-x (if (= (subs key 1 2) "1") (str "data-coord-x='" (subs key 0 1) "' ") "")
+        coord-y (if white
+                  (if (= (subs key 0 1) "a") (str "data-coord-y='" (subs key 1 2) "' ") "")
+                  (if (= (subs key 0 1) "h") (str "data-coord-y='" (subs key 1 2) "' ") ""))
+
+        coord-x (if white
+                  (if (= (subs key 1 2) "1") (str "data-coord-x='" (subs key 0 1) "' ") "")
+                  (if (= (subs key 1 2) "8") (str "data-coord-x='" (subs key 0 1) "' ") ""))
         piece-html (when p (piece p))]
     (str "
" piece-html "
")))

@@ -23,7 +28,7 @@
                             pos {(if white :left :right) (str (* (- file-n 1) 12.5) "%")
                                  (if white :bottom :top) (str (* (- rank 1) 12.5) "%")}
                             p (chess/get-piece c key)]]
-                  (square key pos p))]
+                  (square key pos p white))]
     (str "
" (apply str squares) "
")))

 (defn spare-pieces [state color klass]


Ensure sorting of numerals map

Ensure sorting of numerals map


Fix filestore cljs test.

Fix filestore cljs test.

--- test/konserve/filestore_test.cljs
+++ test/konserve/filestore_test.cljs
@@ -12,20 +12,13 @@

 (enable-console-print!)

-(defmethod cljs.test/report [:cljs.test/default :end-run-tests] [m]
-  (if (cljs.test/successful? m)
-    (println "Success!")
-    (println "FAIL")))
-
 (use-fixtures :once
   {:before
    (fn []
      (async done
             (go (delete-store "/tmp/konserve-fs-nodejs-test")
                 (def store (<! (new-fs-store "/tmp/konserve-fs-nodejs-test")))
-                (done))))
-   :after
-   #(do (prn "DONE"))})
+                (done))))})

 (deftest filestore-test
   (testing "Test the file store functionality."
@@ -44,7 +37,6 @@
                                                                          (close! ch)))
                                                        (.on rs "error" (fn [err] (prn err)))
                                                        ch)))]
-               ;; TODO on-pipe callback
                (is (= (<! (k/get-in store [:foo]))
                       nil))
                (<! (k/assoc-in store [:foo] :bar))
@@ -64,8 +56,5 @@
                         #{})))
                (done))))))

-;;add error tests

 (run-tests)
-
-


CLJS-358: eliminate state shared among Rhino REPL envs; can now restart REPL / use >1 Rhino REPL per Clojure runtime

--- src/clj/cljs/repl/rhino.clj
+++ src/clj/cljs/repl/rhino.clj
@@ -7,7 +7,6 @@
 ;; You must not remove this notice, or any other, from this software.

 (ns cljs.repl.rhino
-  (:refer-clojure :exclude [loaded-libs])
   (:require [clojure.string :as string]
             [clojure.java.io :as io]
             [cljs.compiler :as comp]
@@ -17,12 +16,11 @@
            [org.mozilla.javascript Context ScriptableObject]))

 (def current-repl-env (atom nil))
-(def loaded-libs (atom #{}))

 ;;todo - move to core.cljs, using js
 (def ^String bootjs (str "goog.require = function(rule){"
                          "Packages.clojure.lang.RT[\"var\"](\"cljs.repl.rhino\",\"goog-require\")"
-                         ".invoke(rule);}"))
+                         ".invoke(___repl_env, rule);}"))

 (defprotocol IEval
   (-eval [this env filename line]))
@@ -66,8 +64,8 @@
        :value (.toString ex)
        :stacktrace (stacktrace ex)})))

-(defn goog-require [rule]
-  (when-not (contains? @loaded-libs rule)
+(defn goog-require [repl-env rule]
+  (when-not (contains? @(:loaded-libs repl-env) rule)
     (let [repl-env @current-repl-env
           path (string/replace (comp/munge rule) \. java.io.File/separatorChar)
           cljs-path (str path ".cljs")
@@ -82,22 +80,22 @@
         (if-let [res (io/resource js-path)]
           (-eval (io/reader res) repl-env js-path 1)
           (throw (Exception. (str "Cannot find " cljs-path " or " js-path " in classpath")))))
-      (swap! loaded-libs conj rule))))
+      (swap! (:loaded-libs repl-env) conj rule))))

 (defn load-javascript [repl-env ns url]
-  (let [missing (remove #(contains? @loaded-libs %) ns)]
+  (let [missing (remove #(contains? @(:loaded-libs repl-env) %) ns)]
     (when (seq missing)
       (do (try
             (-eval (io/reader url) repl-env (.toString url) 1)
             ;; TODO: don't show errors for goog/base.js line number 105
             (catch Throwable ex (println (.getMessage ex))))
-          (swap! loaded-libs (partial apply conj) missing)))))
+          (swap! (:loaded-libs repl-env) (partial apply conj) missing)))))

 (defn rhino-setup [repl-env]
   (let [env (ana/empty-env)
         scope (:scope repl-env)]
     (repl/load-file repl-env "cljs/core.cljs")
-    (swap! loaded-libs conj "cljs.core")
+    (swap! (:loaded-libs repl-env) conj "cljs.core")
     (repl/evaluate-form repl-env
                         env
                         "<cljs repl>"
@@ -110,7 +108,7 @@
                         "<cljs repl>"
                         '(set! *print-fn* (fn [x] (.print js/out x))))))

-(defrecord RhinoEnv []
+(defrecord RhinoEnv [loaded-libs]
   repl/IJavaScriptEnv
   (-setup [this]
     (rhino-setup this))
@@ -128,10 +126,13 @@
         scope (.initStandardObjects cx)
         base (io/resource "goog/base.js")
         deps (io/resource "goog/deps.js")
-        new-repl-env (merge (RhinoEnv.) {:cx cx :scope scope})]
+        new-repl-env (merge (RhinoEnv. (atom #{})) {:cx cx :scope scope})]
     (assert base "Can't find goog/base.js in classpath")
     (assert deps "Can't find goog/deps.js in classpath")
     (swap! current-repl-env (fn [old] new-repl-env))
+    (ScriptableObject/putProperty scope
+                                  "___repl_env"
+                                  (Context/javaToJS new-repl-env scope))
     (with-open [r (io/reader base)]
       (-eval r new-repl-env "goog/base.js" 1))
     (-eval bootjs new-repl-env "bootjs" 1)


Update the comment on get-pipeline-configuration

Closes #34.

Signed-off-by: Baptiste Fontaine <b5165a7b35036554758540da420ba755bd52cdab@oscaro.com>

--- src/clj/datasplash/core.clj
+++ src/clj/datasplash/core.clj
@@ -1029,7 +1029,7 @@
    (wait-pipeline-result pip-res nil)))

 (defn get-pipeline-configuration
-  {:doc "Returns a map corresponding to the bean of options. With arity one, can be called on a Pipeline. With arity zero, returns the same thing inside a ParDo."
+  {:doc "Returns a map corresponding to the bean of options. Must be called inside a function wrapping a ParDo, e.g. ds/map or ds/mapcat"
    :added "0.1.0"}
   ([]
    (when-let [^DoFn$ProcessContext c *context*]


Commented JFrame launcher.

Commented JFrame launcher.

--- src/clj/mazegen/swingui.clj
+++ src/clj/mazegen/swingui.clj
@@ -62,4 +62,4 @@
 (defn -main [& args]
   (launch JFrame/EXIT_ON_CLOSE))

-(launch JFrame/DISPOSE_ON_CLOSE)
+;(launch JFrame/DISPOSE_ON_CLOSE)


Supports for titles and subtitles in pie charts

--- src/clj_flotr/generator.clj
+++ src/clj_flotr/generator.clj
@@ -73,7 +73,9 @@
                                     vertical-lines
                                     show-legend
                                     legend-position
-                                    legend-background]}]
+                                    legend-background
+                                    title
+                                    subtitle]}]
     [:div {:id id :style (str "width:" width ";height:" height)}
         [:script {:type "text/javascript"}
             (str "Flotr.draw($('" id "'), [")
@@ -92,7 +94,10 @@
                       show: "             (bool->string show-legend) ",
                       position: '"        (or legend-position "ne") "',
                       backgroundColor: '" (or legend-background "#D2E8FF") "',
-                  }});")]])
+                  }"
+                  (if title    (str ", title: '" title "'"))
+                  (if subtitle (str ", subtitle: '" subtitle "'"))
+                  "});")]])

 (defn line-chart
     "Creates a simple bar chart. Please look at the function named


Write out extra fields for each meta info in VCF file

--- src/cljam/io/vcf/writer.clj
+++ src/cljam/io/vcf/writer.clj
@@ -49,57 +49,63 @@
     (cstr/upper-case (name k))
     (->camelCaseString k)))

+(defn- add-extra-fields
+  [fields m required-keys]
+  (reduce-kv (fn [fields k v]
+               (conj fields (str (->camelCaseString k) "=\"" v "\"")))
+             fields
+             (apply dissoc m required-keys)))
+
+(defn- pack-meta-info
+  [fields m required-keys]
+  (cstr/join \, (add-extra-fields fields m required-keys)))
+
 (defn- stringify-meta-info-contig
   [m]
-  (->> (cond-> [(str "ID=" (:id m))
-                (str "length=" (:length m))
-                (str "assembly=" (:assembly m))
-                (str "md5=" (:md-5 m))]
-         (:species m) (conj (str "species=\"" (:species m) "\""))
-         (:taxonomy m) (conj (str "taxonomy=" (:taxonomy m)))
-         (:idx m) (conj (str "idx=" (:idx m))))
-       (cstr/join \,)))
+  (-> [(str "ID=" (:id m))
+       (str "length=" (:length m))
+       (str "assembly=" (:assembly m))
+       (str "md5=" (:md-5 m))]
+      (pack-meta-info m [:id :length :assembly :md-5])))

 (defn- stringify-meta-info-info
   [m]
-  (->> (cond-> [(str "ID=" (:id m))
-                (str "Number=" (nil->dot (:number m)))
-                (str "Type=" (nil->dot (:type m)))
-                (str "Description=\"" (:description m) "\"")]
-         (:source m) (conj (str "Source=" (:source m)))
-         (:version m) (conj (str "Version=" (:version m)))
-         (:idx m) (conj (str "idx=" (:idx m))))
-       (cstr/join \,)))
+  (-> [(str "ID=" (:id m))
+       (str "Number=" (nil->dot (:number m)))
+       (str "Type=" (nil->dot (:type m)))
+       (str "Description=\"" (:description m) "\"")]
+      (cond->
+        (:source m) (conj (str "Source=" (:source m)))
+        (:version m) (conj (str "Version=" (:version m))))
+      (pack-meta-info m [:id :number :type :description :source :version])))

 (defn- stringify-meta-info-filter
   [m]
-  (->> (cond-> [(str "ID=" (:id m))
-                (str "Description=\"" (:description m) "\"")]
-         (:idx m) (conj (str "idx=" (:idx m))))
-       (cstr/join \,)))
+  (-> [(str "ID=" (:id m))
+       (str "Description=\"" (:description m) "\"")]
+      (pack-meta-info m [:id :description])))

 (defn- stringify-meta-info-format
   [m]
-  (->> (cond-> [(str "ID=" (:id m))
-                (str "Number=" (nil->dot (:number m)))
-                (str "Type=" (nil->dot (:type m)))
-                (str "Description=\"" (:description m) "\"")]
-         (:idx m) (conj (str "idx=" (:idx m))))
-       (cstr/join \,)))
+  (-> [(str "ID=" (:id m))
+       (str "Number=" (nil->dot (:number m)))
+       (str "Type=" (nil->dot (:type m)))
+       (str "Description=\"" (:description m) "\"")]
+      (pack-meta-info m [:id :number :type :description])))

 (defn- stringify-meta-info-alt
   [m]
-  (->> [(str "ID=" (:id m))
-        (str "Description=\"" (:description m) "\"")]
-       (cstr/join \,)))
+  (-> [(str "ID=" (:id m))
+       (str "Description=\"" (:description m) "\"")]
+      (pack-meta-info m [:id :description])))

 (defn- stringify-meta-info-sample
   [m]
-  (->> [(str "ID=" (:id m))
-        (str "Genomes=" (:genomes m))
-        (str "Mixture=" (:mixture m))
-        (str "Description=\"" (:description m) "\"")]
-       (cstr/join \,)))
+  (-> [(str "ID=" (:id m))
+       (str "Genomes=" (:genomes m))
+       (str "Mixture=" (:mixture m))
+       (str "Description=\"" (:description m) "\"")]
+      (pack-meta-info m [:id :genomes :mixture :description])))

 (defn- stringify-meta-info-pedigree
   [m]


Fix Value Histogram Update

Fix Value Histogram Update

I had an empty seq if there is no value histogram. Using seq solves the problem.

--- src/cljs/lens/workbook.cljs
+++ src/cljs/lens/workbook.cljs
@@ -155,7 +155,7 @@
     (when-not (if (s/is-numeric? item) (:value-histogram item) (:question item))
       (load-term! owner :lens/find-item opts id)))
   (did-update [_ _ _]
-    (when-let [value-histogram (value-hist item)]
+    (when-let [value-histogram (seq (value-hist item))]
       (clear-chart (cell-id opts id))
       (draw-item-chart (cell-id opts id) value-histogram)))
   (render [_]


Added utility functions

Added utility functions

min-vec, cut-vec and sort-paths together manage
sorting paths of different depth lexicographically
(meaning /a/b/c/d goes before /b).

Also, binary tree from Joy of Clojure,
and some less than working attempts on
graph building...

--- src/cljs/repodoc/utils.cljs
+++ src/cljs/repodoc/utils.cljs
@@ -37,3 +37,64 @@
       (not (= result 0)) result
       (nil? value1) 0 ; value2 will be nil as well
       :else (recur rest1 rest2))))
+
+(defn add-to-map
+  "Addind values into :children of keys path
+  trying to keep whatever other values
+  the target map has"
+  [data keys val]
+  (update-in data
+             keys
+             (fn [old]
+               (if (nil? old)
+                 {:children [val]}
+                 (if (:children old)
+                   (update old :children
+                           (fn [older & arg]
+                             (conj older val))
+                   (assoc old :children [val])))))))
+
+;; Binary tree from JoC 2nd edition listing 9.1
+(defrecord TreeNode [val l r])
+
+(defn xconj [t v]
+  (println t v)
+  (cond
+    (nil? t)       (TreeNode. v nil nil)
+    (< v (:val t)) (TreeNode. (:val t) (xconj (:l t) v) (:r t))
+    :else          (TreeNode. (:val t) (:l t) (xconj (:r t) v))))
+
+(defn xseq [t]
+  (when t
+    (concat (xseq (:l t)) [(:val t)] (xseq (:r t)))))
+
+(def sample-tree (reduce xconj nil [3 5 2 4 6]))
+(xseq sample-tree)
+
+(defrecord GitTree [name tree])
+
+(defn build-git-tree [t name tree]
+  "Build a tree node for given name
+  and add given list of names from the tree under it"
+  (cond
+    (nil? tree) (GitTree. name nil "blob")
+    :else (GitTree. name (map build-git-tree tree) "tree")))
+
+(defn min-vec
+  "Return largest vectors length"
+  [vecs]
+  (apply min (map count vecs)))
+
+(defn cut-vec
+  "Returns vectors cut to the size
+  of smallest vector"
+  [& vecs]
+  (let [size (min-vec vecs)]
+    (map #(subvec % 0 (min (count %) size)) vecs)))
+
+(defn sort-paths
+  "Sort paths lexicographically by comparing
+  path items directly and cutting vec length to
+  equal"
+  [paths]
+  (sort #(apply compare (cut-vec %1 %2)) paths))


if 500 + error text plain empty message displayed fix

--- src/cljs/swarmpit/ajax.cljs
+++ src/cljs/swarmpit/ajax.cljs
@@ -33,6 +33,9 @@
          (= "swarmpit" (:x-backend-server headers))) (router/set-location {:handler :unauthorized})
     (= 404 status) (router/set-route {:handler :not-found})
     (= 500 status) (message/error (str (or (:cause body) "Server request failed")))
+    (= 502 status) (message/error "Server request failed. Bad Gateway")
+    (= 503 status) (message/error "Server request failed. Service Unavailable")
+    (= 504 status) (message/error "Server request failed. Gateway Timeout")
     :else (message/error (str (or (:error body) body "Server request failed")))))

 (defn- command


add ideas of todos to clean that up

add ideas of todos to clean that up

--- src/cljs/triboard/core.cljs
+++ src/cljs/triboard/core.cljs
@@ -16,7 +16,11 @@
 (enable-console-print!)
 (set! *assert* true) ;; Set to true for the debug mode

-;; TODO - Try to bring some domain vocabulary here: it gets too complicated to trace
+;; TODO - Extract the game notion: the undo and stacking of different turns
+;; TODO - Rework the connection with AI: the AI should not be in the game (could be function)
+;; TODO - Move the assembling of the display in view
+;; TODO - Rework the queue system to have something simpler
+
 ;; TODO - http://www.w3schools.com/howto/howto_js_sidenav.asp
 ;; TODO - http://www.w3schools.com/svg/svg_grad_radial.asp


♻ Use explicit true? for checking permissions

Why:
- Guard against a possible bug that instead of `true` as the leaf,
  it's actually not a leaf but contains another map

--- src/territory_bro/infra/permissions.clj
+++ src/territory_bro/infra/permissions.clj
@@ -6,6 +6,7 @@
   (:require [medley.core :refer [dissoc-in]])
   (:import (territory_bro NoPermitException)))

+;; TODO: rename resource-ids to context or scope?
 (defn- path [user-id [permission & resource-ids]]
   (assert (keyword? permission) {:permission permission})
   (assert (every? some? resource-ids) {:resource-ids resource-ids})
@@ -25,7 +26,7 @@
   (cond
     (empty? permit) false
     ;; has exact permit?
-    (get-in state (path user-id permit)) true
+    (true? (get-in state (path user-id permit))) true
     ;; has broader permit?
     :else (recur state user-id (drop-last permit))))


Remove unused event in chessboard example.

--- examples/chessboard/src/cljs/chessboard/core.cljs
+++ examples/chessboard/src/cljs/chessboard/core.cljs
@@ -70,14 +70,6 @@
                  :selected-square (if (empty? new-moves)
                                     nil
                                     square)))))))
-
-
-(re-frame/reg-event-db
-  :do-move
-  (fn [db [_ move]]
-    (-> db
-        (assoc :selected-square nil :candidate-moves [])
-        (update :game #(chess/add-uci-move % (chess/move-to-uci move))))))

 ;; Views


CMR-8775: Control access to Generic API ingest interfaces with a new CMR configuration (#1782)

* CMR-8775: Adding toggle for generic ingest

* Add config for turning off ingest capability of specified concepts

* CMR-8775: Fixing comments

* Improving the comments in two functions

* CMR-8775: Addressing PR comments

* Fixing a few comments to make them more clear

* CMR-8775: Addressing PR comments

* Fixing message punctuation
* Removing unnecessary configuration for tests on function

* CMR-8775: Control access to Generic API ingest interfaces with a new CMR configuration

* Remove ingest capability from selected generic concepts
* AWS parameter store is expecting a JSON for a value, form this simply changes the parser to accommodate that instead

--- common-lib/src/cmr/common/config.clj
+++ common-lib/src/cmr/common/config.clj
@@ -237,10 +237,10 @@
 (defconfig generic-ingest-disabled-list
   "This is a toggle to prevent specified generic concepts from being ingested into CMR,
    Should be an array of keys with the name of the schema to be blocked from ingest.
-   Example [:grid :order-option], would prevent grids and order options from being ingested into CMR
+   Example [\"grid\",\"order-option\"], would prevent grids and order options from being ingested into CMR
    if no concepts should be blocked from ingest set to an empty array"
   {:default []
-   :parser #(json/parse-string % true)})
+   :parser #(vec (map (fn [item] (keyword item)) (json/parse-string %)))})

 (defn check-env-vars
   "Checks any environment variables starting with CMR_ are recognized as known environment variables.


(TK-258) Remove No rules loaded exception

Addresses: https://github.com/puppetlabs/trapperkeeper-authorization/pull/2#discussion_r37577923

--- src/puppetlabs/trapperkeeper/services/authorization/authorization_service.clj
+++ src/puppetlabs/trapperkeeper/services/authorization/authorization_service.clj
@@ -19,6 +19,5 @@

   (wrap-with-authorization-check
     [this handler]
-    (if-let [rules (get-in (service-context this) [:rules])]
-      (wrap-authorization-check handler rules)
-      (throw (IllegalStateException. (str "ERROR: No rules loaded."))))))
+    (let [rules (get-in (service-context this) [:rules])]
+      (wrap-authorization-check handler rules))))


Remove www. from urls when filtering

Remove www. from urls when filtering

--- src/tabswitcher/utils.cljs
+++ src/tabswitcher/utils.cljs
@@ -1,4 +1,4 @@
 (ns tabswitcher.utils)

 (defn format-result [url]
-  (clojure.string/replace url #"(^https?://)|(\?.+)" ""))
+  (clojure.string/replace url #"(^https?://(www\.)?)|(\?.+)" ""))


Don't use :use

Don't use :use

--- test/clojurewerkz/cassaforte/async_test.clj
+++ test/clojurewerkz/cassaforte/async_test.clj
@@ -1,9 +1,9 @@
 (ns clojurewerkz.cassaforte.async-test
-  (:require [clojurewerkz.cassaforte.test-helper :as th])
-  (:use clojurewerkz.cassaforte.cql
-        clojurewerkz.cassaforte.client
-        clojure.test
-        clojurewerkz.cassaforte.query))
+  (:require [clojurewerkz.cassaforte.test-helper :as th]
+            [clojurewerkz.cassaforte.cql :refer :all]
+            [clojurewerkz.cassaforte.client :refer :all]
+            [clojure.test :refer :all]
+            [clojurewerkz.cassaforte.query :refer :all]))

 (use-fixtures :each th/initialize!)


Second attempt to fix Travis

Second attempt to fix Travis

--- test/clojurewerkz/cassaforte/async_test.clj
+++ test/clojurewerkz/cassaforte/async_test.clj
@@ -10,15 +10,16 @@
 (deftest async-test
   (th/test-combinations
    (let [record {:name "Alex" :city "Munich" :age (int 19)}
-         result (atom nil)]
+         result (atom nil)
+         finished? (promise)]
      (insert :users record)
-
-     (add-watch result :result
-                (fn [_ _ _ res]
-                  (is (= record (first res)))
-                  (is (= record
-                         (first (get-result (async (select :users))))))))

      (set-callbacks
       (async (select :users))
-      :success (fn [r] (reset! result r))))))
+      :success (fn [r] (reset! result r) (deliver finished? true)))
+
+     @finished?
+
+     (is (= record (first @result)))
+     (is (= record
+            (first (get-result (async (select :users)))))))))


Fill progress bar with content

Fill progress bar with content

--- frontend/src/cruncher/communication/progress.cljs
+++ frontend/src/cruncher/communication/progress.cljs
@@ -5,20 +5,40 @@
             [goog.dom :as gdom]
             [cruncher.communication.auth :as auth]
             [cruncher.communication.main :as com]
+            [cruncher.config :as config]
             [cruncher.utils.extensions]
             [cruncher.utils.lib :as lib]
             [cruncher.utils.views :as vlib]))

+(defn update-progress-handler
+  "Set new app state with the progress information from the API."
+  [response]
+  (lib/update-progress-status! (com/process-response response)))

+(defn query-status
+  "Make ajax request to request status of the crunching-progress."
+  []
+  (let [url (:status-delete config/api)]
+    (com/ajax-get url update-progress-handler)))

 (defui ProgressBar
   Object
   (render [this]
-    (dom/div #js {:className "progress"}
-             (dom/div #js {:className "progress-bar progress-bar-striped active"
-                           :role "progressbar"
-                           :aria-valuenow "70"
-                           :aria-valuemin "0"
-                           :aria-valuemax "100"
-                           :style #js {:width "40%"}}))))
+    (let [progress (lib/get-progress-status)
+          to-delete (:to-delete progress)
+          deleted (:deleted progress)
+          percent (* 100 (/ deleted to-delete))]
+      (dom/div nil
+               (vlib/button-primary #(println (lib/get-progress-status)) "Get progress status")
+               " "
+               (vlib/button-primary #(query-status) "Query")
+               (dom/br nil)
+               (dom/br nil)
+               (dom/div #js {:className "progress"}
+                        (dom/div #js {:className     "progress-bar progress-bar-striped active"
+                                      :role          "progressbar"
+                                      :aria-valuenow percent
+                                      :aria-valuemin 0
+                                      :aria-valuemax to-delete
+                                      :style         #js {:width (str percent "%")}}))))))
 (def progress-bar (om/factory ProgressBar))


apply anti-forgery only to api endpoints to make okta post requests work

--- src/clj/conference_rating/handler.clj
+++ src/clj/conference_rating/handler.clj
@@ -1,5 +1,5 @@
 (ns conference-rating.handler
-  (:require [compojure.core :refer [GET POST defroutes routes]]
+  (:require [compojure.core :refer [GET POST context defroutes routes]]
             [compojure.route :refer [not-found resources]]
             [ring.middleware.defaults :refer [site-defaults wrap-defaults secure-api-defaults]]
             [ring.util.response :refer [created response redirect]]
@@ -91,22 +91,32 @@
        (filter (matches-series q))
        (distinct)))

+(defn- with-anti-forgery [handler]
+  (if (env :dev)
+    handler
+    (wrap-anti-forgery handler)))
+
+(defn api-routes [db]
+  (with-anti-forgery
+    (routes
+      (GET "/conferences" [] (response (get-conferences db)))
+      (GET "/conferences/:id" [id] (response (get-conference id db)))
+      (GET "/conferences/:id/ratings" [id] (get-conference-ratings id db))
+      (POST "/conferences/:id/ratings" [id :as request] (add-rating id (:body request) db))
+      (POST "/conferences/" request (add-conference (:body request) db))
+      (GET "/series/suggestions" {params :params} (response (series-suggestions  db (:q params)))))))
+
 (defn create-routes [db]
   (routes
-   (GET "/api/conferences" [] (response (get-conferences db)))
-   (GET "/api/conferences/:id" [id] (response (get-conference id db)))
-   (GET "/api/conferences/:id/ratings" [id] (get-conference-ratings id db))
-   (POST "/api/conferences/:id/ratings" [id :as request] (add-rating id (:body request) db))
-   (POST "/api/conferences/" request (add-conference (:body request) db))
-   (GET "/api/series/suggestions" {params :params} (response (series-suggestions  db (:q params))))
-   (resources "/")
-   (GET "/css/reagent-forms.css" [] (response (-> "reagent-forms.css"
-                                                  clojure.java.io/resource
-                                                  slurp)))
-   okta/okta-routes
-   (GET "/login" [] (redirect "/"))
-   (GET "/" [] (home-page))
-   (not-found "Not Found")))
+    (context "/api" [] (api-routes db))
+    (resources "/")
+    (GET "/css/reagent-forms.css" [] (response (-> "reagent-forms.css"
+                                                   clojure.java.io/resource
+                                                   slurp)))
+    okta/okta-routes
+    (GET "/login" [] (redirect "/"))
+    (GET "/" [] (home-page))
+    (not-found "Not Found")))

 (defn ring-settings [ssl-redirect-disabled]
   (-> secure-api-defaults


remove old macro namespace

remove old macro namespace

--- src/clj/infinitelives/pixi/macros.clj
+++ src/clj/infinitelives/pixi/macros.clj
@@ -1,113 +0,0 @@
-(ns infinitelives.pixi.macros)
-
-(defmacro ^:private assert-args
-  [& pairs]
-  `(do (when-not ~(first pairs)
-         (throw (IllegalArgumentException.
-                 (str (first ~'&form) " requires " ~(second pairs) " in " ~'*ns* ":" (:line (meta ~'&form))))))
-       ~(let [more (nnext pairs)]
-          (when more
-            (list* `assert-args more)))))
-
-(defmacro get-layer [canvas layer]
-  `(or
-    (-> ~canvas :layer ~layer)
-    (throw (js/Error (str "canvas layer " ~layer " not found.")))
-    ))
-
-(defmacro with-sprite* [canvas layer bindings & body]
-  (assert-args
-   (vector? bindings) "a vector for its binding"
-   (even? (count bindings)) "an even number of forms in binding vector")
-
-  (if (pos? (count bindings))
-    (let [symb (first bindings) val (second bindings)]
-      `(let [parent# (if (keyword? ~layer) (get-layer ~canvas ~layer) ~layer)
-             ~symb ~val]
-         (try (.addChild parent# ~symb)
-              (with-sprite ~canvas ~layer ~(subvec bindings 2) ~@body)
-              (finally (.removeChild parent# ~symb)))))
-    `(do ~@body)))
-
-(defmacro with-sprite [& body]
-  (cond
-    (vector? (first body))
-    `(with-sprite*
-       (infinitelives.pixi.canvas/get-default-canvas) (infinitelives.pixi.canvas/get-default-layer)
-       ~(first body)
-       ~@(next body))
-
-    (vector? (second body))
-    `(with-sprite*
-       (infinitelives.pixi.canvas/get-default-canvas) ~(first body)
-       ~(second body)
-       ~@(nnext body))
-
-    :default
-    `(with-sprite* ~@body)))
-
-(comment
-  (macroexpand-1 '(with-sprite [a (ms)] a b c)))
-
-(defmacro with-layered-sprite [bindings & body]
-  (assert-args
-   (vector? bindings) "a vector for its binding"
-   (= 0 (mod (count bindings) 3)) "triplets of forms in binding vector")
-
-  (if (pos? (count bindings))
-    (let [symb (first bindings)
-          layer (second bindings)
-          val (nth bindings 2)]
-      `(let [~symb ~val
-             canvas# (infinitelives.pixi.canvas/get-default-canvas)]
-         (try (.addChild
-               (get-layer canvas# ~layer)
-               ~symb)
-              (with-layered-sprite ~(subvec bindings 3) ~@body)
-              (finally (.removeChild
-                        (get-layer canvas# ~layer)
-                        ~symb)))))
-    `(do ~@body)))
-
-(defmacro with-sprite-set* [canvas layer bindings & body]
-  (assert-args
-   (vector? bindings) "a vector for its binding"
-   (even? (count bindings)) "an even number of forms in binding vector")
-
-  (if (pos? (count bindings))
-    (let [symb (first bindings) val (second bindings)]
-      `(let [~symb ~val]
-         (try
-           (doseq [sprite# ~symb]
-             (.addChild (get-layer ~canvas ~layer) sprite#))
-           (with-sprite-set ~canvas ~layer ~(subvec bindings 2) ~@body)
-           (finally (doseq [sprite# ~symb]
-                      (.removeChild (get-layer ~canvas ~layer) sprite#))))))
-    `(do ~@body)))
-
-(defmacro with-sprite-set [& body]
-  (cond
-    (vector? (first body))
-    `(with-sprite-set*
-       (infinitelives.pixi.canvas/get-default-canvas) (infinitelives.pixi.canvas/get-default-layer)
-       ~(first body)
-       ~@(next body))
-
-    (vector? (second body))
-    `(with-sprite-set*
-       (infinitelives.pixi.canvas/get-default-canvas) ~(first body)
-       ~(second body)
-       ~@(nnext body))
-
-    :default
-    `(with-sprite-set* ~@body)))
-
-
-(defmacro while-let
-    "Repeatedly executes body while test expression is true, evaluating the body with binding-form bound to the value of test."
-    [bindings & body]
-    (let [form (first bindings) test (second bindings)]
-        `(loop [~form ~test]
-             (when ~form
-                 ~@body
-                 (recur ~test)))))


fix pandect.impl.checksum ns declaration

according to clojure spec `only` should be keyword

--- src/clojure/pandect/impl/checksum.clj
+++ src/clojure/pandect/impl/checksum.clj
@@ -3,7 +3,7 @@
              [core :refer :all]
              [hash-generator :refer :all]
              [hmac-generator :refer :all]]
-            [pandect.utils.convert :as c only [long->4-bytes]])
+            [pandect.utils.convert :as c :only [long->4-bytes]])
   (:import [java.util.zip Adler32 CRC32]))

 (set! *warn-on-reflection* true)


add collections stats

add collections stats

--- src/metabase/util/stats.clj
+++ src/metabase/util/stats.clj
@@ -149,7 +149,7 @@
   "Get metrics based on user records
   TODO: get activity in terms of created questions, pulses and dashboards"
   []
-  (let [users (db/select 'User)]
+  (let [users (db/select ['User :is_active :is_superuser :last_login :google_auth])]
     {:users (apply add-summaries (map user-dims users))}))

@@ -157,7 +157,7 @@
   "Get metrics based on groups:
   TODO characterize by # w/ sql access, # of users, no self-serve data access"
   []
-  (let [groups (db/select 'PermissionsGroup)]
+  (let [groups (db/select ['PermissionsGroup :id])]
     {:groups (count groups)}))

 ;; Artifact Metrics
@@ -173,15 +173,15 @@
   "Get metrics based on questions
   TODO characterize by # executions and avg latency"
   []
-  (let [questions (db/select 'Card)]
+  (let [questions (db/select ['Card :id :query_type])]
     {:questions (apply add-summaries (map question-dims questions))}))

 (defn- dashboard-metrics
   "Get metrics based on dashboards
   TODO characterize by # of revisions, and created by an admin"
   []
-  (let [dashboards (db/select 'Dashboard)
-        dashcards (db/select 'DashboardCard)]
+  (let [dashboards (db/select ['Dashboard :id :creator_id])
+        dashcards (db/select ['DashboardCard :id :card_id :dashboard_id])]
     {:dashboards (count dashboards)
      :num_dashs_per_user (medium-histogram dashboards :creator_id)
      :num_cards_per_dash (medium-histogram dashcards :dashboard_id)
@@ -191,9 +191,9 @@
   "Get mes based on pulses
   TODO: characterize by non-user account emails, # emails"
   []
-  (let [pulses (db/select 'Pulse)
-        pulsecards (db/select 'PulseCard)
-        pulsechannels (db/select 'PulseChannel)]
+  (let [pulses (db/select ['Pulse :id :creator_id])
+        pulsecards (db/select ['PulseCard :id :card_id :pulse_id])
+        pulsechannels (db/select ['PulseChannel :channel_type :schedule_type])]
     {:pulses (count pulses)
      :pulse_types (frequencies (map :channel_type pulsechannels))
      :pulse_schedules (frequencies (map :schedule_type pulsechannels))
@@ -205,10 +205,22 @@
 (defn- label-metrics
   "Get metrics based on labels"
   []
-  (let [labels (db/select 'CardLabel)]
+  (let [labels (db/select 'Label)
+        cardlabels (db/select ['CardLabel :card_id :label_id])]
     {:labels (count labels)
-     :num_labels_per_card (micro-histogram labels :card_id)
-     :num_cards_per_label (medium-histogram labels :label_id)}))
+     :num_labels_per_card (micro-histogram cardlabels :card_id)
+     :num_cards_per_label (medium-histogram cardlabels :label_id)}))
+
+
+(defn collection-metrics
+  "Get metrics on collection usage"
+  []
+  (let [collections (db/select 'Collection)
+        cards (db/select ['Card :collection_id])]
+    {:collections (count collections)
+     :num_cards_per_collection (medium-histogram cards :collection_id)}
+    )
+  )

 ;; Metadata Metrics
 (defn- database-dims
@@ -220,14 +232,14 @@
 (defn- database-metrics
   "Get metrics based on databases"
   []
-  (let [databases (db/select 'Database)]
+  (let [databases (db/select ['Database :id :is_full_sync])]
     {:databases (apply add-summaries (map database-dims databases))}))

 (defn- table-metrics
   "Get metrics based on tables"
   []
-  (let [tables (db/select 'Table)]
+  (let [tables (db/select ['Table :id :db_id :schema])]
     {:tables (count tables)
      :num_per_database (medium-histogram tables :db_id)
      :num_per_schema (medium-histogram tables :schema)}))
@@ -236,21 +248,21 @@
 (defn- field-metrics
   "Get metrics based on fields"
   []
-  (let [fields (db/select 'Field)]
+  (let [fields (db/select ['Field :id :table_id])]
     {:fields (count fields)
      :num_per_table (medium-histogram fields :table_id)}))

 (defn- segment-metrics
   "Get metrics based on segments"
   []
-  (let [segments (db/select 'Segment)]
+  (let [segments (db/select ['Segment :id])]
     {:segments (count segments)}))

 (defn- metric-metrics
   "Get metrics based on metrics"
   []
-  (let [metrics (db/select 'Metric)]
+  (let [metrics (db/select ['Metric :id])]
     {:metrics (count metrics)}))

@@ -291,6 +303,7 @@
                      :metric (metric-metrics)
                      :group (group-metrics)
                      :label (label-metrics)
+                     :collection (collection-metrics)
                      :execution (execution-metrics)}}))


remove unused function

remove unused function

--- src/metabase/util/stats.clj
+++ src/metabase/util/stats.clj
@@ -277,14 +277,6 @@
      :by_status (frequencies (map :status executions))
      :num_per_user (large-histogram executions :executor_id)
      :num_by_latency (bin-latencies executions)}))
-
-
-(defn- get-map-metrics
-  "Get metrics based on custom geojson maps
-  TODO figure out how to get at these"
-  []
-  (let [maps (db/select 'Segment)]
-    {:maps (count maps)}))

 (defn get-anonymous-usage-stats


More layer docs

More layer docs

--- src/cortex/impl/layers.cljc
+++ src/cortex/impl/layers.cljc
@@ -211,6 +211,7 @@
 (defn blas-gemv-cutoff ^long [] 500000)

 (defn linear-forward!
+  "Linear backward pass.  Returns module updated with a new output."
   [this input]
   (let [weights (:weights this)
         bias (:bias this)
@@ -231,7 +232,7 @@

 (defn linear-backward!
-  "linear backward pass.  Returns a new input gradient."
+  "Linear backward pass.  Returns module updated with a new input gradient."
   [this input output-gradient]
   (let [weights (:weights this)
         bias (:bias this)
@@ -265,8 +266,8 @@
 #?(:cljs (register-module cortex.impl.layers.Linear))
 (defrecord Linear [weights bias]
   cp/PModule
-  (calc [this input]
-    (linear-forward! this input))
+    (calc [this input]
+      (linear-forward! this input))

     (output [this]
       (:output this))


Require SubnetIds in AWS::Lambda::Function.VpcConfig (#94)

This was the very first spec I checked while investigating the feasibility of issue #93.

Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html

--- src/crucible/aws/lambda.clj
+++ src/crucible/aws/lambda.clj
@@ -6,8 +6,7 @@

 (s/def ::security-group-ids (s/* (spec-or-ref string?)))

-(s/def ::vpc-config (s/keys :req [::security-group-ids]
-                            :opt [::subnet-ids]))
+(s/def ::vpc-config (s/keys :req [::security-group-ids ::subnet-ids]))

 (s/def ::timeout (spec-or-ref (s/and pos-int? #(<= % (* 5 60)))))


added burning ship to ex34

added burning ship to ex34

--- examples/ex34_ducks_kalisets.clj
+++ examples/ex34_ducks_kalisets.clj
@@ -66,14 +66,16 @@
                :kali4 (fn [z c] (v/add (c/sin (v/abs (c/reciprocal z))) c))
                :kali2l (fn [z c] (c/log (v/add (v/abs (c/reciprocal z)) c)))
                :kali3l (fn [z c] (c/log (v/add (v/abs (c/reciprocal (c/sq z))) c)))
-               :kali4l (fn [z c] (c/log (v/add (c/sin (v/abs (c/reciprocal z))) c)))
+               :kali4l (fn [z c] (c/log (v/add (c/sinh (v/abs (c/reciprocal z))) c)))
                :kalinewa (fn [z c]
                            (let [nz (v/abs (v/add (c/mult z c) c/ONE))]
                              (v/add nz (c/reciprocal nz))))
                :kalinew (fn [z c]
                           (let [nz (v/add (c/mult z c) c/ONE)]
                             (v/add nz (c/reciprocal nz))))
-               :kaliabs (fn [z c] (v/add (v/abs (c/div z c)) c))})
+               :kaliabs (fn [z c] (v/add (v/abs (c/div z c)) c))
+               :my (fn [z c] (c/sec (v/abs (v/add z c))))
+               :burningship-log (fn [^Vec2 z c] (c/log (v/add (c/sq (v/abs z)) c)))})

 ;; Randomize 'c' parameter
 (def rand-c {:ducks #(Vec2. (r/drand 0.2 0.95) (r/drand -0.25 -1.5))
@@ -90,11 +92,13 @@
              :kali4l #(Vec2. (r/drand -0.5 1.0) (r/drand -1.5 0.1))
              :kalinewa #(Vec2. (r/drand -1.5 1.5) (r/drand -1.5 1.5))
              :kalinew #(Vec2. (r/drand -1.5 1.5) (r/drand -1.5 1.5))
-             :kaliabs #(Vec2. (r/drand -0.8 -0.1) (r/drand -0.8 -0.1))})
+             :kaliabs #(Vec2. (r/drand -0.8 -0.1) (r/drand -0.8 -0.1))
+             :my #(Vec2. (r/drand -1.5 1.5) (r/drand -1.5 0))
+             :burningship-log #(Vec2. (r/drand 0.0 1.0) (r/drand -1.0 0.0))})

 (defn draw-ducks
   "Iterate and draw"
-  [canvas {:keys [c-const coloring-fn iter-fn ^double mlt]}]
+  [canvas {:keys [c-const coloring-fn iter-fn ^double mlt var]}]
   (let [f (coloring-fns coloring-fn)
         iter (iter-fns iter-fn)
         ^Bounds cbounds @bounds
@@ -130,12 +134,12 @@
     (p/set-canvas-pixels! (p/filter-channels p/normalize-filter nil (p/get-canvas-pixels canvas))))
   (println "done!"))

-
 (defn new-fractal
   "Create new config and draw fractal"
   []
   (let [cfname (rand-nth (keys coloring-fns))
         itername (rand-nth (keys iter-fns))
+        itername :burningship-log
         conf {:c-const ((rand-c itername))
               :coloring-fn cfname
               :mlt (r/drand 1 3)


no more dependencies comment

no more dependencies comment

--- examples/progress_download.clj
+++ examples/progress_download.clj
@@ -1,6 +1,3 @@
-;; extra required dependencies for this example:
-;; :dependencies [[commons-io "2.4"]]
-
 (ns clj-http.examples.progress-download
   (:require [clj-http.client :as http]
             [clojure.java.io :refer [output-stream]])


not working yet but using more latest populate fn

--- test/celestial/integration/remoters.clj
+++ test/celestial/integration/remoters.clj
@@ -4,39 +4,35 @@
     [celestial.persistency.types :as t]
     [celestial.persistency.systems :as s]
     [celestial.fixtures.data :refer (redis-deploy redis-runall redis-prox-spec redis-type)]
-    [celestial.fixtures.populate :refer (add-users)]
     [celestial.fixtures.core :refer (with-defaults)]
-    [celestial.redis :refer (clear-all)]
     [me.raynes.fs :refer (exists?)]
+    [celestial.integration.workflows.common :refer (spec get-spec)]
+    [celestial.fixtures.populate :refer (populate-system)]
     [celestial.workflows :refer (reload destroy)]
     [celestial.model :refer (rconstruct)]
     remote.capistrano)
   (:use midje.sweet))

 (with-defaults
-  (with-state-changes [(before :facts (do (clear-all) (t/add-type redis-type) (add-users)))]
+  (with-state-changes [(before :facts (populate-system redis-type redis-prox-spec))]
     (fact "basic deploy" :integration :capistrano
-      (let [id (s/add-system redis-prox-spec)
-            spec (assoc redis-prox-spec :system-id id)
-            cap (rconstruct redis-deploy {:target "192.168.3.200"})]
-         (reload spec)
+      (let [cap (rconstruct redis-deploy {:target "192.168.3.200"})]
+         (reload (spec))
          (.setup cap)
          (exists? (:dst cap)) => truthy
          (.run cap)
          (.cleanup cap)
-         (destroy spec)
+         (destroy (spec)) => nil
          (exists? (:dst cap))  => falsey
-         (s/system-exists? id)  => falsey)))
+         )))

-    (fact "ruby runall" :integration :ruby :capistrano
-      (let [id (s/add-system redis-prox-spec)
-            spec (assoc redis-prox-spec :system-id id)
-            cap (rconstruct redis-runall {:target "192.168.3.200"}) ]
-         (reload spec)
+   (fact "ruby runall" :integration :ruby :capistrano
+      (let [cap (rconstruct redis-runall {:target "192.168.3.200"}) ]
+         (reload (spec))
          (.setup cap)
          (exists? (:dst cap)) => truthy
          (.run cap)
          (.cleanup cap)
-         (destroy spec)
+         (destroy (spec)) => nil
          (exists? (:dst cap))  => falsey
          (s/system-exists? id)  => falsey)))


CMR-3701: Saved granule_parent_dependency_test.clj

--- system-int-test/test/cmr/system_int_test/ingest/granule_parent_dependency_test.clj
+++ system-int-test/test/cmr/system_int_test/ingest/granule_parent_dependency_test.clj
@@ -12,6 +12,7 @@
     [cmr.system-int-test.data2.collection :as dc]
     [cmr.system-int-test.data2.core :as d]
     [cmr.system-int-test.data2.granule :as dg]
+    [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c]
     [cmr.system-int-test.utils.dev-system-util :as dev-sys-util]
     [cmr.system-int-test.utils.humanizer-util :as hu]
     [cmr.system-int-test.utils.index-util :as index]
@@ -44,16 +45,16 @@
 ;; This test demonstrates how granule's platform references the collection's platform and its aliases
 ;; The platform aliases defined in the humanizer: "AM-1" is the alias for "Terra"
 (deftest granule-match-parent-collection-platform-alias-test
-  (let [psa1 (dc/psa {:name "a-float" :data-type :float :min-value 1.0 :max-value 10.0})
+  (let [psa1 (data-umm-c/additional-attribute {:Name "a-float" :DataType "FLOAT" :ParameterRangeBegin 1.0 :ParameterRangeEnd 10.0})
         gpsa (dg/psa "a-float" [7.0])
-        projects (dc/projects "proj")
+        projects (data-umm-c/projects "proj")
         mbr1 (umm-s/set-coordinate-system :geodetic (m/mbr 10 10 20 0))
         gran-spatial-rep (apply dg/spatial [mbr1])
-        two-d-cs {:name "BRAVO"
-                  :coordinate-1 {:min-value 100
-                                 :max-value 200}
-                  :coordinate-2 {:min-value 300
-                                 :max-value 400}}
+        two-d-cs {:TilingIdentificationSystemName "BRAVO"
+                  :Coordinate1 {:MinimumValue 100
+                                :MaximumValue 200}
+                  :Coordinate2 {:MinimumValue 300
+                                :MaximumValue 400}}
         g-two-d-cs (dg/two-d-coordinate-system
                      {:name "BRAVO"
                       :start-coordinate-1 110
@@ -61,14 +62,14 @@
                       :start-coordinate-2 300
                       :end-coordinate-2 328})

-        i1 (dc/instrument {:short-name "instrumentA"})
+        i1 (data-umm-c/instrument {:ShortName "instrumentA"})
         ir1 (dg/instrument-ref {:short-name "instrumentA"})
-        i2 (dc/instrument {:short-name "instrumentB"})
+        i2 (data-umm-c/instrument {:ShortName "instrumentB"})
         ir2 (dg/instrument-ref {:short-name "instrumentB"})

-        c-p1 (dc/platform {:short-name "Terra" :instruments [i1]})
-        c-p2 (dc/platform {:short-name "Foo"})
-        c-p3 (dc/platform {:short-name "AM-1" :instruments [i2]})
+        c-p1 (data-umm-c/platform {:ShortName "Terra" :Instruments [i1]})
+        c-p2 (data-umm-c/platform {:ShortName "Foo"})
+        c-p3 (data-umm-c/platform {:ShortName "AM-1" :Instruments [i2]})

         g-pr1 (dg/platform-ref {:short-name "Terra"})
         g-pr2 (dg/platform-ref {:short-name "Terra" :instrument-refs [ir1]})
@@ -79,37 +80,39 @@
         g-pr7 (dg/platform-ref {:short-name "AM-1" :instrument-refs [ir2]})
         g-pr8 (dg/platform-ref {:short-name "Bar"})

-        coll-data1 {:entry-title "short_name1_version"
-                    :short-name "short_name1"
-                    :version-id "version"
-                    :product-specific-attributes [psa1]
-                    :platforms [c-p1 c-p2]
-                    :organizations [(dc/org :distribution-center "Larc")]
-                    :science-keywords [(dc/science-keyword {:category "upcase"
-                                                            :topic "Cool"
-                                                            :term "Mild"})]
-                    :projects projects
-                    :spatial-coverage (dc/spatial {:gsr :geodetic})
-                    :two-d-coordinate-systems [two-d-cs]
-                    :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                    :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                    :ending-date-time "1967-12-12T07:00:00.000-05:00"}
-
-       coll-data2 {:entry-title "short_name2_version"
-                   :short-name "short_name2"
-                   :version-id "version"
-                   :product-specific-attributes [psa1]
-                   :platforms [c-p1 c-p3]
-                   :organizations [(dc/org :distribution-center "Larc")]
-                   :science-keywords [(dc/science-keyword {:category "upcase"
-                                                           :topic "Cool"
-                                                           :term "Mild"})]
-                   :projects projects
-                   :spatial-coverage (dc/spatial {:gsr :geodetic})
-                   :two-d-coordinate-systems [two-d-cs]
-                   :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                   :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                   :ending-date-time "1967-12-12T07:00:00.000-05:00"}
+        coll-data1 {:EntryTitle "short_name1_version"
+                    :ShortName "short_name1"
+                    :Version "version"
+                    :AdditionalAttributes [psa1]
+                    :Platforms [c-p1 c-p2]
+                    :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                    :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                            :Topic "Cool"
+                                                            :Term "Mild"})]
+                    :Projects projects
+                    :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                    :TilingIdentificationSystems [two-d-cs]
+                    :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                    :TemporalExtents [(data-umm-c/temporal-extent
+                                       {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                        :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}
+
+       coll-data2 {:EntryTitle "short_name2_version"
+                   :ShortName "short_name2"
+                   :Version "version"
+                   :AdditionalAttributes [psa1]
+                   :Platforms[c-p1 c-p3]
+                   :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                   :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                           :Topic "Cool"
+                                                           :Term "Mild"})]
+                   :Projects projects
+                   :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                   :TilingIdentificationSystems [two-d-cs]
+                   :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                   :TemporalExtents [(data-umm-c/temporal-extent
+                                      {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                       :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}

        gran-data1 {:platform-refs [g-pr1]
                    :spatial-coverage gran-spatial-rep
@@ -167,24 +170,24 @@
                    :beginning-date-time "1966-12-12T07:00:00.000-05:00"
                    :ending-date-time "1967-10-12T07:00:00.000-05:00"}

-        echo10-coll1 (dc/collection coll-data1)
-        _ (d/ingest "PROV1" echo10-coll1 {:format :echo10})
-        echo10-coll2 (dc/collection coll-data2)
-        _ (d/ingest "PROV1" echo10-coll2 {:format :echo10})
-
-        gran-Terra-coll1 (dg/granule echo10-coll1 gran-data1)
-        gran-AM-1-coll1 (dg/granule echo10-coll1 gran-data5)
-        gran-Foo-coll1 (dg/granule echo10-coll1 gran-data4)
-        gran-Bar-coll1 (dg/granule echo10-coll1 gran-data8)
-        gran-AM-1-InstrumentA-coll1 (dg/granule echo10-coll1 gran-data6)
-
-        gran-Terra-coll2 (dg/granule echo10-coll2 gran-data1)
-        gran-AM-1-coll2 (dg/granule echo10-coll2 gran-data5)
-        gran-AM-1-InstrumentA-coll2 (dg/granule echo10-coll2 gran-data6)
-        gran-AM-1-InstrumentB-coll2 (dg/granule echo10-coll2 gran-data7)
-        gran-Terra-InstrumentA-coll2 (dg/granule echo10-coll2 gran-data2)
-        gran-Terra-InstrumentB-coll2 (dg/granule echo10-coll2 gran-data3)
-        gran-Foo-coll2 (dg/granule echo10-coll2 gran-data4)]
+        echo10-coll1 (data-umm-c/collection coll-data1)
+        _ (d/ingest-umm-spec-collection "PROV1" echo10-coll1 {:format :echo10})
+        echo10-coll2 (data-umm-c/collection coll-data2)
+        _ (d/ingest-umm-spec-collection "PROV1" echo10-coll2 {:format :echo10})
+
+        gran-Terra-coll1 (dg/granule-with-umm-spec-collection echo10-coll1 (:concept-id echo10-coll1) gran-data1)
+        gran-AM-1-coll1 (dg/granule-with-umm-spec-collection echo10-coll1 (:concept-id echo10-coll1) gran-data5)
+        gran-Foo-coll1 (dg/granule-with-umm-spec-collection echo10-coll1 (:concept-id echo10-coll1) gran-data4)
+        gran-Bar-coll1 (dg/granule-with-umm-spec-collection echo10-coll1 (:concept-id echo10-coll1) gran-data8)
+        gran-AM-1-InstrumentA-coll1 (dg/granule-with-umm-spec-collection echo10-coll1 (:concept-id echo10-coll1) gran-data6)
+
+        gran-Terra-coll2 (dg/granule-with-umm-spec-collection echo10-coll2 (:concept-id echo10-coll2) gran-data1)
+        gran-AM-1-coll2 (dg/granule-with-umm-spec-collection echo10-coll2 (:concept-id echo10-coll2) gran-data5)
+        gran-AM-1-InstrumentA-coll2 (dg/granule-with-umm-spec-collection echo10-coll2 (:concept-id echo10-coll2) gran-data6)
+        gran-AM-1-InstrumentB-coll2 (dg/granule-with-umm-spec-collection echo10-coll2 (:concept-id echo10-coll2) gran-data7)
+        gran-Terra-InstrumentA-coll2 (dg/granule-with-umm-spec-collection echo10-coll2 (:concept-id echo10-coll2) gran-data2)
+        gran-Terra-InstrumentB-coll2 (dg/granule-with-umm-spec-collection echo10-coll2 (:concept-id echo10-coll2) gran-data3)
+        gran-Foo-coll2 (dg/granule-with-umm-spec-collection echo10-coll2 (:concept-id echo10-coll2) gran-data4)]

     (are3 [exp-errors gran]
           (is (= exp-errors
@@ -242,25 +245,25 @@
 ;; This test demonstrates how granule's tile references the collection's tile and its aliases.
 ;; The tile aliases defined in the humanizer: "SOURCE_TILE" is the alias for "REPLACEMENT_TILE"
 (deftest granule-match-parent-collection-tile-alias-test
-  (let [psa1 (dc/psa {:name "a-float" :data-type :float :min-value 1.0 :max-value 10.0})
+  (let [psa1 (data-umm-c/additional-attribute {:Name "a-float" :DataType "FLOAT" :ParameterRangeBegin 1.0 :ParameterRangeEnd 10.0})
         gpsa (dg/psa "a-float" [7.0])
-        i1 (dc/instrument {:short-name "instrument-Sn A"})
+        i1 (data-umm-c/instrument {:ShortName "instrument-Sn A"})
         ir1 (dg/instrument-ref {:short-name "instrument-Sn A"})
-        p1 (dc/platform {:short-name "platform-Sn A" :instruments [i1]})
+        p1 (data-umm-c/platform {:ShortName "platform-Sn A" :Instruments [i1]})
         pr1 (dg/platform-ref {:short-name "platform-Sn A" :instrument-refs [ir1]})
-        projects (dc/projects "proj")
+        projects (data-umm-c/projects "proj")
         mbr1 (umm-s/set-coordinate-system :geodetic (m/mbr 10 10 20 0))
         gran-spatial-rep (apply dg/spatial [mbr1])
-        c-two-d-cs-A {:name "SOURCE_TILE"
-                      :coordinate-1 {:min-value 100
-                                     :max-value 200}
-                      :coordinate-2 {:min-value 300
-                                     :max-value 400}}
-        c-two-d-cs-B {:name "REPLACEMENT_TILE"
-                      :coordinate-1 {:min-value 100
-                                     :max-value 200}
-                      :coordinate-2 {:min-value 300
-                                     :max-value 400}}
+        c-two-d-cs-A {:TilingIdentificationSystemName "SOURCE_TILE"
+                      :Coordinate1 {:MinimumValue 100
+                                    :MaximumValue 200}
+                      :Coordinate2 {:MinimumValue 300
+                                    :MaximumValue 400}}
+        c-two-d-cs-B {:TilingIdentificationSystemName "REPLACEMENT_TILE"
+                      :Coordinate1 {:MinimumValue 100
+                                    :MaximumValue 200}
+                      :Coordinate2 {:MinimumValue 300
+                                    :MaximumValue 400}}
         g-two-d-cs-A (dg/two-d-coordinate-system
                        {:name "SOURCE_TILE"
                         :start-coordinate-1 110
@@ -273,36 +276,38 @@
                         :end-coordinate-1 130
                         :start-coordinate-2 300
                         :end-coordinate-2 328})
-        coll-data-A {:entry-title "short_name_A_version"
-                     :short-name "short_name_A"
-                     :version-id "version"
-                     :product-specific-attributes [psa1]
-                     :platforms [p1]
-                     :organizations [(dc/org :distribution-center "Larc")]
-                     :science-keywords [(dc/science-keyword {:category "upcase"
-                                                             :topic "Cool"
-                                                             :term "Mild"})]
-                     :projects projects
-                     :spatial-coverage (dc/spatial {:gsr :geodetic})
-                     :two-d-coordinate-systems [c-two-d-cs-A]
-                     :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                     :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                     :ending-date-time "1967-12-12T07:00:00.000-05:00"}
-        coll-data-B {:entry-title "short_name_B_version"
-                     :short-name "short_name_B"
-                     :version-id "version"
-                     :product-specific-attributes [psa1]
-                     :platforms [p1]
-                     :organizations [(dc/org :distribution-center "Larc")]
-                     :science-keywords [(dc/science-keyword {:category "upcase"
-                                                             :topic "Cool"
-                                                             :term "Mild"})]
-                     :projects projects
-                     :spatial-coverage (dc/spatial {:gsr :geodetic})
-                     :two-d-coordinate-systems [c-two-d-cs-B]
-                     :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                     :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                     :ending-date-time "1967-12-12T07:00:00.000-05:00"}
+        coll-data-A {:EntryTitle "short_name_A_version"
+                     :ShortName "short_name_A"
+                     :Version "version"
+                     :AdditionalAttributes [psa1]
+                     :Platforms[p1]
+                     :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                     :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                             :Topic "Cool"
+                                                             :Term "Mild"})]
+                     :Projects projects
+                     :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                     :TilingIdentificationSystems [c-two-d-cs-A]
+                     :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                     :TemporalExtents [(data-umm-c/temporal-extent
+                                        {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                         :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}
+        coll-data-B {:EntryTitle "short_name_B_version"
+                     :ShortName "short_name_B"
+                     :Version "version"
+                     :AdditionalAttributes [psa1]
+                     :Platforms[p1]
+                     :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                     :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                             :Topic "Cool"
+                                                             :Term "Mild"})]
+                     :Projects projects
+                     :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                     :TilingIdentificationSystems [c-two-d-cs-B]
+                     :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                     :TemporalExtents [(data-umm-c/temporal-extent
+                                        {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                         :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}
         gran-data-A {:platform-refs [pr1]
                      :spatial-coverage gran-spatial-rep
                      :two-d-coordinate-system g-two-d-cs-A
@@ -315,14 +320,14 @@
                      :product-specific-attributes [gpsa]
                      :beginning-date-time "1966-12-12T07:00:00.000-05:00"
                      :ending-date-time "1967-10-12T07:00:00.000-05:00"}
-        echo10-coll-A (dc/collection coll-data-A)
-        _ (d/ingest "PROV1" echo10-coll-A {:format :echo10})
-        echo10-coll-B (dc/collection coll-data-B)
-        _ (d/ingest "PROV1" echo10-coll-B {:format :echo10})
-        gran-A-for-echo10-coll-A (dg/granule echo10-coll-A gran-data-A)
-        gran-B-for-echo10-coll-A (dg/granule echo10-coll-A gran-data-B)
-        gran-A-for-echo10-coll-B (dg/granule echo10-coll-B gran-data-A)
-        gran-B-for-echo10-coll-B (dg/granule echo10-coll-B gran-data-B)]
+        echo10-coll-A (data-umm-c/collection coll-data-A)
+        _ (d/ingest-umm-spec-collection "PROV1" echo10-coll-A {:format :echo10})
+        echo10-coll-B (data-umm-c/collection coll-data-B)
+        _ (d/ingest-umm-spec-collection "PROV1" echo10-coll-B {:format :echo10})
+        gran-A-for-echo10-coll-A (dg/granule-with-umm-spec-collection echo10-coll-A (:concept-id echo10-coll-A) gran-data-A)
+        gran-B-for-echo10-coll-A (dg/granule-with-umm-spec-collection echo10-coll-A (:concept-id echo10-coll-A) gran-data-B)
+        gran-A-for-echo10-coll-B (dg/granule-with-umm-spec-collection echo10-coll-B (:concept-id echo10-coll-B) gran-data-A)
+        gran-B-for-echo10-coll-B (dg/granule-with-umm-spec-collection echo10-coll-B (:concept-id echo10-coll-B) gran-data-B)]

     (are3 [exp-errors gran]
           (is (= exp-errors
@@ -355,31 +360,31 @@
 ;; "replacement_value": "GPS Receivers"
 ;; Note: this one also covers tile reference successful cases.
 (deftest granule-match-parent-collection-instrument-alias-test
-  (let [psa1 (dc/psa {:name "a-float" :data-type :float :min-value 1.0 :max-value 10.0})
+  (let [psa1 (data-umm-c/additional-attribute {:Name "a-float" :DataType "FLOAT" :ParameterRangeBegin 1.0 :ParameterRangeEnd 10.0})
         gpsa (dg/psa "a-float" [7.0])
-        projects (dc/projects "proj")
+        projects (data-umm-c/projects "proj")
         mbr1 (umm-s/set-coordinate-system :geodetic (m/mbr 10 10 20 0))
         gran-spatial-rep (apply dg/spatial [mbr1])

-        sA (dc/sensor {:short-name "GPS RECEIVERS"})
+        sA (data-umm-c/instrument {:ShortName "GPS RECEIVERS"})
         srA (dg/sensor-ref {:short-name "GPS RECEIVERS"})
-        iA (dc/instrument {:short-name "GPS RECEIVERS" :sensors [sA]})
+        iA (data-umm-c/instrument {:ShortName "GPS RECEIVERS" :ComposedOf [sA]})
         irA (dg/instrument-ref {:short-name "GPS RECEIVERS" :sensor-refs [srA]})
-        pA (dc/platform {:short-name "platform-Sn A" :instruments [iA]})
+        pA (data-umm-c/platform {:ShortName "platform-Sn A" :Instruments [iA]})
         prA (dg/platform-ref {:short-name "platform-Sn A" :instrument-refs [irA]})

-        sB (dc/sensor {:short-name "GPS Receivers"})
+        sB (data-umm-c/instrument {:ShortName "GPS Receivers"})
         srB (dg/sensor-ref {:short-name "GPS Receivers"})
-        iB (dc/instrument {:short-name "GPS Receivers" :sensors [sB]})
+        iB (data-umm-c/instrument {:ShortName "GPS Receivers" :ComposedOf [sB]})
         irB (dg/instrument-ref {:short-name "GPS Receivers" :sensor-refs [srB]})
-        pB (dc/platform {:short-name "platform-Sn A" :instruments [iB]})
+        pB (data-umm-c/platform {:ShortName "platform-Sn A" :Instruments [iB]})
         prB (dg/platform-ref {:short-name "platform-Sn A" :instrument-refs [irB]})

-        c-two-d-cs {:name "REPLACEMENT_TILE"
-                    :coordinate-1 {:min-value 100
-                                   :max-value 200}
-                    :coordinate-2 {:min-value 300
-                                   :max-value 400}}
+        c-two-d-cs {:TilingIdentificationSystemName "REPLACEMENT_TILE"
+                    :Coordinate1 {:MinimumValue 100
+                                  :MaximumValue 200}
+                    :Coordinate2 {:MinimumValue 300
+                                  :MaximumValue 400}}
         g-two-d-cs-A (dg/two-d-coordinate-system
                        {:name "SOURCE_TILE"
                         :start-coordinate-1 110
@@ -392,36 +397,38 @@
                         :end-coordinate-1 130
                         :start-coordinate-2 300
                         :end-coordinate-2 328})
-        coll-data-A {:entry-title "short_name_A_version"
-                     :short-name "short_name_A"
-                     :version-id "version"
-                     :product-specific-attributes [psa1]
-                     :platforms [pA]
-                     :organizations [(dc/org :distribution-center "Larc")]
-                     :science-keywords [(dc/science-keyword {:category "upcase"
-                                                             :topic "Cool"
-                                                             :term "Mild"})]
-                     :projects projects
-                     :spatial-coverage (dc/spatial {:gsr :geodetic})
-                     :two-d-coordinate-systems [c-two-d-cs]
-                     :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                     :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                     :ending-date-time "1967-12-12T07:00:00.000-05:00"}
-        coll-data-B {:entry-title "short_name_B_version"
-                     :short-name "short_name_B"
-                     :version-id "version"
-                     :product-specific-attributes [psa1]
-                     :platforms [pB]
-                     :organizations [(dc/org :distribution-center "Larc")]
-                     :science-keywords [(dc/science-keyword {:category "upcase"
-                                                             :topic "Cool"
-                                                             :term "Mild"})]
-                     :projects projects
-                     :spatial-coverage (dc/spatial {:gsr :geodetic})
-                     :two-d-coordinate-systems [c-two-d-cs]
-                     :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                     :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                     :ending-date-time "1967-12-12T07:00:00.000-05:00"}
+        coll-data-A {:EntryTitle "short_name_A_version"
+                     :ShortName "short_name_A"
+                     :Version "version"
+                     :AdditionalAttributes [psa1]
+                     :Platforms[pA]
+                     :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                     :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                             :Topic "Cool"
+                                                             :Term "Mild"})]
+                     :Projects projects
+                     :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                     :TilingIdentificationSystems [c-two-d-cs]
+                     :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                     :TemporalExtents [(data-umm-c/temporal-extent
+                                        {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                         :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}
+        coll-data-B {:EntryTitle "short_name_B_version"
+                     :ShortName "short_name_B"
+                     :Version "version"
+                     :AdditionalAttributes [psa1]
+                     :Platforms[pB]
+                     :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                     :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                             :Topic "Cool"
+                                                             :Term "Mild"})]
+                     :Projects projects
+                     :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                     :TilingIdentificationSystems [c-two-d-cs]
+                     :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                     :TemporalExtents [(data-umm-c/temporal-extent
+                                        {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                         :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}
         gran-data-A {:platform-refs [prA]
                      :spatial-coverage gran-spatial-rep
                      :two-d-coordinate-system g-two-d-cs-A
@@ -434,14 +441,14 @@
                      :product-specific-attributes [gpsa]
                      :beginning-date-time "1966-12-12T07:00:00.000-05:00"
                      :ending-date-time "1967-10-12T07:00:00.000-05:00"}
-        echo10-coll-A (dc/collection coll-data-A)
-        _ (d/ingest "PROV1" echo10-coll-A {:format :echo10})
-        echo10-coll-B (dc/collection coll-data-B)
-        _ (d/ingest "PROV1" echo10-coll-B {:format :echo10})
-        gran-A-for-echo10-coll-A (dg/granule echo10-coll-A gran-data-A)
-        gran-B-for-echo10-coll-A (dg/granule echo10-coll-A gran-data-B)
-        gran-A-for-echo10-coll-B (dg/granule echo10-coll-B gran-data-A)
-        gran-B-for-echo10-coll-B (dg/granule echo10-coll-B gran-data-B)]
+        echo10-coll-A (data-umm-c/collection coll-data-A)
+        _ (d/ingest-umm-spec-collection "PROV1" echo10-coll-A {:format :echo10})
+        echo10-coll-B (data-umm-c/collection coll-data-B)
+        _ (d/ingest-umm-spec-collection "PROV1" echo10-coll-B {:format :echo10})
+        gran-A-for-echo10-coll-A (dg/granule-with-umm-spec-collection echo10-coll-A (:concept-id echo10-coll-A) gran-data-A)
+        gran-B-for-echo10-coll-A (dg/granule-with-umm-spec-collection echo10-coll-A (:concept-id echo10-coll-A) gran-data-B)
+        gran-A-for-echo10-coll-B (dg/granule-with-umm-spec-collection echo10-coll-B (:concept-id echo10-coll-B) gran-data-A)
+        gran-B-for-echo10-coll-B (dg/granule-with-umm-spec-collection echo10-coll-B (:concept-id echo10-coll-B) gran-data-B)]

     (are3 [exp-errors gran]
           (is (= exp-errors
@@ -468,70 +475,67 @@
 ;; This tests demonstrates limitations of various collection formats because they do not support
 ;; fields referenced by a child granule.
 (deftest granule-match-parent-collection-test
-  (let [psa1 (dc/psa {:name "a-float" :data-type :float :min-value 1.0 :max-value 10.0})
+  (let [psa1 (data-umm-c/additional-attribute {:Name "a-float" :DataType "FLOAT" :ParameterRangeBegin 1.0 :ParameterRangeEnd 10.0})
         gpsa (dg/psa "a-float" [7.0])
-        i1 (dc/instrument {:short-name "instrument-Sn A"})
+        i1 (data-umm-c/instrument {:ShortName "instrument-Sn A"})
         ir1 (dg/instrument-ref {:short-name "instrument-Sn A"})
-        p1 (dc/platform {:short-name "platform-Sn A" :instruments [i1]})
+        p1 (data-umm-c/platform {:ShortName "platform-Sn A" :Instruments [i1]})
         pr1 (dg/platform-ref {:short-name "platform-Sn A" :instrument-refs [ir1]})
-        projects (dc/projects "proj")
+        projects (data-umm-c/projects "proj")
         mbr1 (umm-s/set-coordinate-system :geodetic (m/mbr 10 10 20 0))
         gran-spatial-rep (apply dg/spatial [mbr1])
-        two-d-cs {:name "BRAVO"
-                  :coordinate-1 {:min-value 100
-                                 :max-value 200}
-                  :coordinate-2 {:min-value 300
-                                 :max-value 400}}
+        two-d-cs {:TilingIdentificationSystemName "BRAVO"
+                  :Coordinate1 {:MinimumValue 100
+                                :MaximumValue 200}
+                  :Coordinate2 {:MinimumValue 300
+                                :MaximumValue 400}}
         g-two-d-cs (dg/two-d-coordinate-system
                      {:name "BRAVO"
                       :start-coordinate-1 110
                       :end-coordinate-1 130
                       :start-coordinate-2 300
                       :end-coordinate-2 328})
-        coll-data {:entry-title "short_name1_version"
-                   :short-name "short_name1"
-                   :version-id "version"
-                   :product-specific-attributes [psa1]
-                   :platforms [p1]
-                   :organizations [(dc/org :distribution-center "Larc")]
-                   :science-keywords [(dc/science-keyword {:category "upcase"
-                                                           :topic "Cool"
-                                                           :term "Mild"})]
-                   :projects projects
-                   :spatial-coverage (dc/spatial {:gsr :geodetic})
-                   :two-d-coordinate-systems [two-d-cs]
-                   :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                   :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                   :ending-date-time "1967-12-12T07:00:00.000-05:00"}
+        coll-data {:EntryTitle "short_name1_version"
+                   :ShortName "short_name1"
+                   :Version "version"
+                   :AdditionalAttributes [psa1]
+                   :Platforms[p1]
+                   :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                   :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                           :Topic "Cool"
+                                                           :Term "Mild"})]
+                   :Projects projects
+                   :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                   :TilingIdentificationSystems [two-d-cs]
+                   :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                   :TemporalExtents [(data-umm-c/temporal-extent
+                                      {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                       :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}
         gran-data {:platform-refs [pr1]
                    :spatial-coverage gran-spatial-rep
                    :two-d-coordinate-system g-two-d-cs
                    :product-specific-attributes [gpsa]
                    :beginning-date-time "1966-12-12T07:00:00.000-05:00"
                    :ending-date-time "1967-10-12T07:00:00.000-05:00"}
-        echo10-coll (dc/collection coll-data)
-        _ (d/ingest "PROV1" echo10-coll {:format :echo10})
-        dif-coll (dc/collection (assoc coll-data :entry-title "short_name2_version"
-                                       :short-name "short_name2"
-                                       :entry-id "short_name2_version"))
-        _ (d/ingest "PROV1" dif-coll {:format :dif})
-        dif10-coll (dc/collection (assoc coll-data :entry-title "short_name3_version"
-                                         :short-name "short_name3"
-                                         :entry-id "short_name3_version"))
-        _ (d/ingest "PROV1" dif10-coll {:format :dif10})
-        iso19115-coll (dc/collection (assoc coll-data :entry-title "short_name4_version"
-                                            :short-name "short_name4"
-                                            :entry-id "short_name4_version"))
-        _ (d/ingest "PROV1" iso19115-coll {:format :iso19115})
-        iso-smap-coll (dc/collection (assoc coll-data :entry-title "short_name5_version"
-                                            :short-name "short_name5"
-                                            :entry-id "short_name5_version"))
-        _ (d/ingest "PROV1" iso-smap-coll {:format :iso-smap})
-        gran-for-echo10-coll (dg/granule echo10-coll gran-data)
-        gran-for-dif-coll (dg/granule dif-coll gran-data)
-        gran-for-dif10-coll (dg/granule dif10-coll gran-data)
-        gran-for-iso19115-coll (dg/granule iso19115-coll gran-data)
-        gran-for-iso-smap-coll (dg/granule iso-smap-coll gran-data)]
+        echo10-coll (data-umm-c/collection coll-data)
+        _ (d/ingest-umm-spec-collection "PROV1" echo10-coll {:format :echo10})
+        dif-coll (data-umm-c/collection (assoc coll-data :EntryTitle "short_name2_version"
+                                       :ShortName "short_name2"))
+        _ (d/ingest-umm-spec-collection "PROV1" dif-coll {:format :dif})
+        dif10-coll (data-umm-c/collection (assoc coll-data :EntryTitle "short_name3_version"
+                                         :ShortName "short_name3"))
+        _ (d/ingest-umm-spec-collection "PROV1" dif10-coll {:format :dif10})
+        iso19115-coll (data-umm-c/collection (assoc coll-data :EntryTitle "short_name4_version"
+                                            :ShortName "short_name4"))
+        _ (d/ingest-umm-spec-collection "PROV1" iso19115-coll {:format :iso19115})
+        iso-smap-coll (data-umm-c/collection (assoc coll-data :EntryTitle "short_name5_version"
+                                            :ShortName "short_name5"))
+        _ (d/ingest-umm-spec-collection "PROV1" iso-smap-coll {:format :iso-smap})
+        gran-for-echo10-coll (dg/granule-with-umm-spec-collection echo10-coll (:concept-id echo10-coll) gran-data)
+        gran-for-dif-coll (dg/granule-with-umm-spec-collection dif-coll (:concept-id dif-coll) gran-data)
+        gran-for-dif10-coll (dg/granule-with-umm-spec-collection dif10-coll (:concept-id dif-coll) gran-data)
+        gran-for-iso19115-coll (dg/granule-with-umm-spec-collection iso19115-coll (:concept-id iso19115-coll) gran-data)
+        gran-for-iso-smap-coll (dg/granule-with-umm-spec-collection iso-smap-coll (:concept-id iso-smap-coll) gran-data)]

     (are3 [exp-errors gran]
           (is (= exp-errors
@@ -551,12 +555,11 @@

           "ISO19115 collection"
-          ["The following list of Tiling Identification System Names did not exist in the referenced parent collection: [BRAVO]."]
+          []
           gran-for-iso19115-coll

           "ISO-SMAP collection"
-          ["The following list of Tiling Identification System Names did not exist in the referenced parent collection: [BRAVO]."
-           "The following list of Additional Attributes did not exist in the referenced parent collection: [a-float]."
+          ["The following list of Additional Attributes did not exist in the referenced parent collection: [a-float]."
            "[Geometries] cannot be set when the parent collection's GranuleSpatialRepresentation is NO_SPATIAL"]
           gran-for-iso-smap-coll)))

@@ -565,56 +568,57 @@
 ;; collections in formats that don't support some things referenced by child granules, but we
 ;; do not.
 (deftest collection-format-change-test
-  (let [psa1 (dc/psa {:name "a-float" :data-type :float :min-value 1.0 :max-value 10.0})
+  (let [psa1 (data-umm-c/additional-attribute {:Name "a-float" :DataType "FLOAT" :ParameterRangeBegin 1.0 :ParameterRangeEnd 10.0})
         gpsa (dg/psa "a-float" [7.0])
-        i1 (dc/instrument {:short-name "instrument-Sn A"})
+        i1 (data-umm-c/instrument {:ShortName "instrument-Sn A"})
         ir1 (dg/instrument-ref {:short-name "instrument-Sn A"})
-        p1 (dc/platform {:short-name "platform-Sn A" :instruments [i1]})
+        p1 (data-umm-c/platform {:ShortName "platform-Sn A" :Instruments [i1]})
         pr1 (dg/platform-ref {:short-name "platform-Sn A" :instrument-refs [ir1]})
-        projects (dc/projects "proj")
+        projects (data-umm-c/projects "proj")
         mbr1 (umm-s/set-coordinate-system :geodetic (m/mbr 10 10 20 0))
         gran-spatial-rep (apply dg/spatial [mbr1])
-        two-d-cs {:name "BRAVO"
-                  :coordinate-1 {:min-value 100
-                                 :max-value 200}
-                  :coordinate-2 {:min-value 300
-                                 :max-value 400}}
+        two-d-cs {:TilingIdentificationSystemName "BRAVO"
+                  :Coordinate1 {:MinimumValue 100
+                                :MaximumValue 200}
+                  :Coordinate2 {:MinimumValue 300
+                                :MaximumValue 400}}
         g-two-d-cs (dg/two-d-coordinate-system
                      {:name "BRAVO"
                       :start-coordinate-1 110
                       :end-coordinate-1 130
                       :start-coordinate-2 300
                       :end-coordinate-2 328})
-        coll-data {:entry-title "short_name1_version"
-                   :short-name "short_name1"
-                   :version-id "version"
-                   :product-specific-attributes [psa1]
-                   :platforms [p1]
-                   :organizations [(dc/org :distribution-center "Larc")]
-                   :science-keywords [(dc/science-keyword {:category "upcase"
-                                                           :topic "Cool"
-                                                           :term "Mild"})]
-                   :projects projects
-                   :spatial-coverage (dc/spatial {:gsr :geodetic})
-                   :two-d-coordinate-systems [two-d-cs]
-                   :related-urls [(dc/related-url {:type "type" :url "http://www.foo.com"})]
-                   :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                   :ending-date-time "1967-12-12T07:00:00.000-05:00"}
+        coll-data {:EntryTitle "short_name1_version"
+                   :ShortName "short_name1"
+                   :Version "version"
+                   :AdditionalAttributes [psa1]
+                   :Platforms[p1]
+                   :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                   :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                           :Topic "Cool"
+                                                           :Term "Mild"})]
+                   :Projects projects
+                   :SpatialExtent (data-umm-c/spatial {:gsr "GEODETIC"})
+                   :TilingIdentificationSystems [two-d-cs]
+                   :RelatedUrls [(data-umm-c/related-url {:Type "type" :URL "http://www.foo.com"})]
+                   :TemporalExtents [(data-umm-c/temporal-extent
+                                      {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                       :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}
         gran-data {:platform-refs [pr1]
                    :spatial-coverage gran-spatial-rep
                    :two-d-coordinate-system g-two-d-cs
                    :product-specific-attributes [gpsa]
                    :beginning-date-time "1966-12-12T07:00:00.000-05:00"
                    :ending-date-time "1967-10-12T07:00:00.000-05:00"}
-        coll (dc/collection coll-data)
-        _ (d/ingest "PROV1" coll {:format :echo10})
-        gran (dg/granule coll gran-data)
+        coll (data-umm-c/collection coll-data)
+        _ (d/ingest-umm-spec-collection "PROV1" coll {:format :echo10})
+        gran (dg/granule-with-umm-spec-collection coll (:concept-id coll)  gran-data)
         _ (d/ingest "PROV1" gran {:format :echo10 :allow-failure? true})]
     (index/wait-until-indexed)

     (are [exp-errors metadata-format]
          (= exp-errors
-            (flatten (:errors (d/ingest "PROV1" coll {:format metadata-format
+            (flatten (:errors (d/ingest-umm-spec-collection "PROV1" coll {:format metadata-format
                                                       :allow-failure? true}))))
          ["Collection TilingIdentificationSystemName [BRAVO] is referenced by existing granules, cannot be removed. Found 1 granules."]
          :dif
@@ -622,11 +626,10 @@
          []
          :dif10

-         ["Collection TilingIdentificationSystemName [BRAVO] is referenced by existing granules, cannot be removed. Found 1 granules."]
+         []
          :iso19115

          ["Collection additional attribute [a-float] is referenced by existing granules, cannot be removed. Found 1 granules."
-          "Collection TilingIdentificationSystemName [BRAVO] is referenced by existing granules, cannot be removed. Found 1 granules."
           "Collection changing from GEODETIC granule spatial representation to NO_SPATIAL is not allowed when the collection has granules. Found 1 granules."]
          :iso-smap)))

@@ -646,18 +649,17 @@
 ;; An exception would be seen when ingesting the granule and processing the polygon with a default
 ;; GSR
 (deftest no-spatial-test
-  (let [coll-data1 {:entry-title "short_name1_version"
-                    :short-name "short_name1"
-                    :version-id "version"
-                    :organizations [(dc/org :distribution-center "Larc")]
-                    :science-keywords [(dc/science-keyword {:category "upcase"
-                                                            :topic "Cool"
-                                                            :term "Mild"})]
-                    :spatial-coverage (dc/spatial {:sr :cartesian
-                                                   :geometries [m/whole-world]
-                                                   :gsr :no-spatial})
-                    :beginning-date-time "1965-12-12T07:00:00.000-05:00"
-                    :ending-date-time "1967-12-12T07:00:00.000-05:00"}
+  (let [coll-data1 {:EntryTitle "short_name1_version"
+                    :ShortName "short_name1"
+                    :Version "version"
+                    :DataCenters [(data-umm-c/data-center ["DISTRIBUTOR"] "Larc")]
+                    :ScienceKeywords [(data-umm-c/science-keyword {:Category "upcase"
+                                                            :Topic "Cool"
+                                                            :Term "Mild"})]
+                    :SpatialExtent (data-umm-c/spatial {:gsr "NO_SPATIAL"})
+                    :TemporalExtents [(data-umm-c/temporal-extent
+                                       {:beginning-date-time "1965-12-12T07:00:00.000-05:00"
+                                        :ending-date-time "1967-12-12T07:00:00.000-05:00"})]}

         gran-data1 {:spatial-coverage
                       (dg/spatial
@@ -669,9 +671,9 @@
                     :beginning-date-time "1966-12-12T07:00:00.000-05:00"
                     :ending-date-time "1967-10-12T07:00:00.000-05:00"}

-        coll1 (dc/collection coll-data1)
-        _ (d/ingest "PROV1" coll1 {:format :iso19115})
-        gran1 (dg/granule coll1 gran-data1)
+        coll1 (data-umm-c/collection coll-data1)
+        _ (d/ingest-umm-spec-collection "PROV1" coll1 {:format :iso19115})
+        gran1 (dg/granule-with-umm-spec-collection coll1 (:concept-id coll1)  gran-data1)
         granule-result (d/ingest "PROV1" gran1 {:format :echo10 :allow-failure? true})]
      ;; The test is checking that the exception does not occur
      ;; 422 status is the expected behavior


Add missing import.

Add missing import.

--- src/uxbox/services.clj
+++ src/uxbox/services.clj
@@ -12,7 +12,8 @@
             [clj-uuid :as uuid]
             [uxbox.persistence :as up]
             [uxbox.services.core :as usc]
-            [uxbox.services.auth]))
+            [uxbox.services.auth]
+            [uxbox.services.projects]))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Impl.


Add selection of non-favorite pokemon, related #5

--- frontend/src/cruncher/views.cljs
+++ frontend/src/cruncher/views.cljs
@@ -10,6 +10,17 @@
             [cruncher.utils.lib :as lib]
             [cruncher.utils.views :as vlib]))

+;;;; Selections
+(defn select-all-but-favorite
+  []
+  (let [rows (gdom/getElementsByClass "poketable-row")]
+    (doall (map (fn [row]
+                  (let [id (.getAttribute row "data-id")
+                        favorite (.getAttribute row "data-favorite")
+                        checkbox (gdom/getElement (str "poketable-checkbox-" id))]
+                    (when-not (= "true" favorite)
+                      (set! (.. checkbox -checked) true)))) rows))))
+
 ;;;; Controls
 (defui Controls
   Object
@@ -18,7 +29,9 @@
              (dom/span #js {:className "pull-right"} (vlib/loader (om/props this)))
              (vlib/button-primary #(com/route :get-all-pokemon) "Get all Pokemon")
              " "
-             (vlib/button-primary #(shredder/power-on this) (vlib/fa-icon "fa-eraser") " Crunch selected Pokemon")
+             (vlib/button-primary #(shredder/power-on this) (dom/span nil (vlib/fa-icon "fa-eraser") " Crunch selected Pokemon"))
+             " "
+             (vlib/button-primary select-all-but-favorite "Select all but favorite")
              (dom/br nil)
              (dom/br nil)
              (dom/div nil (progress/progress-bar (om/props this))))))
@@ -54,18 +67,24 @@
                (lib/get-info)))))
 (def info-message (om/factory InfoMessage))

+
 ;;;; Poketable
 (defui PokeTableEntry
   Object
   (render [this]
     (let [pokemon (om/props this)]
-      (dom/tr nil
+      (dom/tr #js {:id            (str "poketable-row-" (:id pokemon))
+                   :className     "poketable-row"
+                   :data-favorite (:favorite pokemon)
+                   :data-id       (:id pokemon)
+                   :data-iv-perfect (:individual_percentage pokemon)}
               (dom/td nil
-                      (dom/div #js {:className "checkbox"}
-                               (dom/label nil
-                                          (dom/input #js {:className "poketable-checkbox"
-                                                          :type      "checkbox"
-                                                          :value     (:id pokemon)}))))
+                      (dom/div #js {:className "checkbox"})
+                      (dom/label nil
+                                 (dom/input #js {:id        (str "poketable-checkbox-" (:id pokemon))
+                                                 :className "poketable-checkbox"
+                                                 :type      "checkbox"
+                                                 :value     (:id pokemon)})))
               (dom/td nil (if (:favorite pokemon) (vlib/fa-icon "fa-star") (vlib/fa-icon "fa-star-o")))
               (dom/td nil (:pokemon_id pokemon))
               (dom/td nil (:name pokemon))


Do not increment committed offset.

Do not increment committed offset.

--- src/uswitch/bifrost/s3.clj
+++ src/uswitch/bifrost/s3.clj
@@ -47,7 +47,7 @@
                          :pause (* 15 1000)}))
     :commit      (try
                    (set-offset! consumer-properties (consumer-properties "group.id") topic partition last-offset)
-                   (info "Committed offset information to ZooKeeper" topic partition (inc last-offset))
+                   (info "Committed offset information to ZooKeeper" topic partition last-offset)
                    {:goto :delete}
                    (catch Exception e
                      (error e "Unable to commit offset to ZooKeeper. Retrying in 15s.")


Revert last commit of ontology_id_denotes_concept_gen rule

Filtering of B_ is unnecessary since they are added during the
post-id-merging step

--- resources/rules/pre_identifier_merge/step_a_ontology_to_ice/step_b/ontology_id_denotes_concept_gen.clj
+++ resources/rules/pre_identifier_merge/step_a_ontology_to_ice/step_b/ontology_id_denotes_concept_gen.clj
@@ -16,6 +16,5 @@
                   ?ontology_concept rdfs:subClassOf* ?root_class .
                   minus {?ontology_concept owl:deprecated true} .
                   minus {?ontology_concept rdf:type ccp:IAO_EXT_0000190} . # ccp:ontology root concept identifier
-                  filter (!contains(str(?ontology_concept), \"http://ccp.ucdenver.edu/obo/ext/B_\")) # ignore explicit blank nodes as don't need to be denoted by an id
                   }"
   }


add o4,o6 fields in mutation search

add o4,o6 fields in mutation search

--- src_cljs/rrm/corecljs.cljs
+++ src_cljs/rrm/corecljs.cljs
@@ -181,15 +181,17 @@

 (defn get-search-url [vid mutno fp
                       sp nop kkn
-                      o2n tit kn]
+                      o2n tit kn
+                      o4n o6n]
   (let [purl (str serverhost "mutations/search?")]

     (cond (not (st/blank? mutno)) (str purl "mutationNo="mutno)
-          :else (str purl "villageId="(int vid)"&firstparty="fp"&secondparty="sp"&nameofpo="nop"&khatakhatuninumber="kkn"&o2number="o2n"&title="tit"&khasranumber="kn))))
+          :else (str purl "villageId="(int vid)"&firstparty="fp"&secondparty="sp"&nameofpo="nop"&khatakhatuninumber="kkn"&o2number="o2n"&title="tit"&khasranumber="kn"&o4number="o4n"&o6number="o6n))))

 (defn get-index-url [is-searched-results sel-page vid
-                     mutno fp sp nop kkn o2n tit kn]
-  (cond (= true is-searched-results)(str (get-search-url vid mutno fp sp nop kkn o2n tit kn)"&pageIndex="sel-page"&pageSize=10")
+                     mutno fp sp nop kkn o2n tit kn
+                     o4n o6n]
+  (cond (= true is-searched-results)(str (get-search-url vid mutno fp sp nop kkn o2n tit kn o4n o6n)"&pageIndex="sel-page"&pageSize=10")
         :else (str serverhost "mutations?pageIndex="sel-page "&pageSize=10")))

 (defn get-new-page-data [data current-page total-pages]
@@ -227,6 +229,8 @@
         vid  (.-value (.getElementById js/document "src-vill"))
         po   (.-value (.getElementById js/document "svillagename"))
         so2  (.-value (.getElementById js/document "so2number"))
+        so4  (.-value (.getElementById js/document "so4number"))
+        so6  (.-value (.getElementById js/document "so6number"))
         knum (.-value (.getElementById js/document "skhasranumber"))
         kknum (.-value (.getElementById js/document "skhatakhatuninumber"))
         fp (.-value (.getElementById js/document "snameofthefirstparty"))
@@ -239,7 +243,8 @@
     (http-get-auth (get-index-url (get-value! :is-searched-results)
                                   (dec (get-value! :current-page))
                                   vid mn fp sp po
-                                  kknum so2 st knum)
+                                  kknum so2 st knum
+                                  so4 so6)
                    onres)))

 (defn pager [value total-rec]
@@ -310,6 +315,8 @@
         vid  (.-value (.getElementById js/document "src-vill"))
         po   (.-value (.getElementById js/document "svillagename"))
         so2  (.-value (.getElementById js/document "so2number"))
+        so4  (.-value (.getElementById js/document "so4number"))
+        so6  (.-value (.getElementById js/document "so6number"))
         knum (.-value (.getElementById js/document "skhasranumber"))
         kknum (.-value (.getElementById js/document "skhatakhatuninumber"))
         fp (.-value (.getElementById js/document "snameofthefirstparty"))
@@ -318,13 +325,12 @@
                           (set-key-value :mutations (.-data data))
                           (set-key-value :total-pages
                                          (get-total-rec-no (.-pagesCount data)))
-                          (set-page! :page-location
-                                     [render-mutations (get-value! :mutations)])))]
+                          (set-page! [render-mutations (get-value! :mutations)])))]
     (set-key-value :current-page 1)
     (set-key-value :is-searched-results true)
     (http-get-auth (str (get-search-url
                          vid mn fp sp po
-                         kknum so2 st knum)"&pageIndex=0&pageSize=10") onres)))
+                         kknum so2 st knum so4 so6)"&pageIndex=0&pageSize=10") onres)))

 (defn input [label type id]
@@ -735,7 +741,7 @@
                             [:td (.-o6number (.-numbers mt))]
                             [:td (.-senddate mt)]
                             [:td (.-receiveddate mt)]
-                         ])]]
+                            ])]]
      [:div{:class "col-xs-6 col-centered col-max"} [shared-state 0]]]]])