CMR-348: Added additional tests with rational numbers.

--- test/cmr/system_int_test/search/granule_orbit_number_search_test.clj
+++ test/cmr/system_int_test/search/granule_orbit_number_search_test.clj
@@ -16,63 +16,39 @@
   (let [coll1 (d/ingest "CMR_PROV1" (dc/collection {}))
         gran1 (d/ingest "CMR_PROV1"
                         (dg/granule coll1
-                                    {:granule-ur "Granule1"
-                                     :orbit-calculated-spatial-domains [ {:orbital-model-name "OrbitalModelName"
-                                                                          :orbit-number  1
+                                    {:orbit-calculated-spatial-domains [ {:orbit-number  1
                                                                           :start-orbit-number 1.0
                                                                           :stop-orbit-number 1.0
-                                                                          :equator-crossing-longitude 0
                                                                           :equator-crossing-date-time "2011-02-01T12:00:00Z"}]}))
         gran2 (d/ingest "CMR_PROV1"
                         (dg/granule coll1
-                                    {:granule-ur "Granule2"
-                                     :orbit-calculated-spatial-domains [{:orbital-model-name "OrbitalModelName"
-                                                                         :orbit-number  1
-                                                                         :start-orbit-number nil
-                                                                         :stop-orbit-number nil
-                                                                         :equator-crossing-longitude 0
+                                    {:orbit-calculated-spatial-domains [{:orbit-number  1
                                                                          :equator-crossing-date-time "2011-02-01T12:00:00Z"}]}))
         gran3 (d/ingest "CMR_PROV1"
                         (dg/granule coll1
-                                    {:granule-ur "Granule3"
-                                     :orbit-calculated-spatial-domains [{:orbital-model-name "OrbitalModelName"
-                                                                         :orbit-number  nil
-                                                                         :start-orbit-number 1.0
+                                    {:orbit-calculated-spatial-domains [{:start-orbit-number 1.0
                                                                          :stop-orbit-number 1.0
-                                                                         :equator-crossing-longitude 0
                                                                          :equator-crossing-date-time "2011-02-01T12:00:00Z"}]}))
         gran4 (d/ingest "CMR_PROV1"
                         (dg/granule coll1
-                                    {:granule-ur "Granule4"
-                                     :orbit-calculated-spatial-domains [{:orbital-model-name "OrbitalModelName"
-                                                                         :orbit-number  2
+                                    {:orbit-calculated-spatial-domains [{:orbit-number  2
                                                                          :start-orbit-number 2.0
                                                                          :stop-orbit-number 3.0
-                                                                         :equator-crossing-longitude 0
                                                                          :equator-crossing-date-time "2011-02-01T12:00:00Z"}]}))
         gran5 (d/ingest "CMR_PROV1"
                         (dg/granule coll1
-                                    {:granule-ur "Granule5"
-                                     :orbit-calculated-spatial-domains [{:orbital-model-name "OrbitalModelName"
-                                                                         :orbit-number  nil
-                                                                         :start-orbit-number 2.0
-                                                                         :stop-orbit-number 3.0
+                                    {:orbit-calculated-spatial-domains [{:start-orbit-number 2.7
+                                                                         :stop-orbit-number 3.5
                                                                          :equator-crossing-longitude 0
                                                                          :equator-crossing-date-time "2011-02-01T12:00:00Z"}]}))
         gran6 (d/ingest "CMR_PROV1"
                         (dg/granule coll1
-                                    {:granule-ur "Granule6"
-                                     :orbit-calculated-spatial-domains [{:orbital-model-name "OrbitalModelName"
-                                                                         :orbit-number  nil
-                                                                         :start-orbit-number 4.0
+                                    {:orbit-calculated-spatial-domains [{:start-orbit-number 4.0
                                                                          :stop-orbit-number 5.0
-                                                                         :equator-crossing-longitude 0
                                                                          :equator-crossing-date-time "2011-02-01T12:00:00Z"}]}))
         gran7 (d/ingest "CMR_PROV1"
                         (dg/granule coll1
-                                    {:granule-ur "Granule6"
-                                     :orbit-calculated-spatial-domains [{:orbital-model-name "OrbitalModelName"
-                                                                         :orbit-number  nil
+                                    {:orbit-calculated-spatial-domains [{:orbital-model-name "OrbitalModelName"
                                                                          :start-orbit-number 7.0
                                                                          :stop-orbit-number 10.0
                                                                          :equator-crossing-longitude 0
@@ -80,24 +56,25 @@
     (index/flush-elastic-index)

     (testing "search by exact orbit number"
-      (let [references (search/find-refs :granule
-                                         {:orbit-number 1})]
+      (let [references (search/find-refs :granule {:orbit-number 1})]
         (is (d/refs-match? [gran1 gran2 gran3] references))))
     (testing "search by orbit number range"
-      (let [references (search/find-refs :granule
-                                         {:orbit-number "1,2"})]
-        (is (d/refs-match? [gran1, gran2, gran3, gran4, gran5] references))))
+      (let [references (search/find-refs :granule {:orbit-number "1,2"})]
+        (is (d/refs-match? [gran1, gran2, gran3, gran4] references))))
+    (testing "search by orbit number range with rational numbers"
+      (let [references (search/find-refs :granule {:orbit-number "2,2.8"})]
+        (is (d/refs-match? [gran4, gran5] references))))
+    (testing "search by orbit number range with min and max rational numbers"
+      (let [references (search/find-refs :granule {:orbit-number "4.5,7.7"})]
+        (is (d/refs-match? [gran6 gran7] references))))
     (testing "search by orbit number range inside"
-      (let [references (search/find-refs :granule
-                                         {:orbit-number "8,9"})]
+      (let [references (search/find-refs :granule {:orbit-number "8,9"})]
         (is (d/refs-match? [gran7] references))))
     (testing "search by unused orbit number returns nothing"
-      (let [references (search/find-refs :granule
-                                         {:orbit-number "15"})]
+      (let [references (search/find-refs :granule {:orbit-number "15"})]
         (is (d/refs-match? [] references))))
     (testing "search by unused orbit number range returns nothing"
-      (let [references (search/find-refs :granule
-                                         {:orbit-number "17,18"})]
+      (let [references (search/find-refs :granule {:orbit-number "17,18"})]
         (is (d/refs-match? [] references))))
     (testing "invalid orbit number range"
       (let [{:keys [status errors]} (search/find-refs :granule {:orbit-number "2,1"})]


(SERVER-977) improve error message checking for delete-certificate-request!

--- test/unit/puppetlabs/services/ca/certificate_authority_core_test.clj
+++ test/unit/puppetlabs/services/ca/certificate_authority_core_test.clj
@@ -142,7 +142,8 @@
             (fs/delete expected-path))))
       (testing "Attempted deletion of a non-existant CSR"
         (let [response (handle-delete-certificate-request! subject settings)
-              msg-matcher (re-pattern (str "No cert.* " subject " at .*"))]
+              msg-matcher (re-pattern
+                            (str "No cert.*request for " subject " at.*" expected-path))]
           (is (false? (fs/exists? expected-path)))
           (is (= 404 (:status response)))
           (is (re-matches msg-matcher (:body response)))


Disabling target indice purge using wildcard (#616)

--- src/ctia/task/migrate_es_stores.clj
+++ src/ctia/task/migrate_es_stores.clj
@@ -150,7 +150,7 @@
 (defn create-target-store
   "create the target store, pushing its template"
   [target-store]
-  (let [wildcard (str (:indexname target-store) "*")]
+  (let [wildcard (:indexname target-store)]
     (log/infof "%s - purging indexes: %s"
                (:type target-store)
                wildcard)


Fix doc-lookup for Namespaces

Fix doc-lookup for Namespaces

--- src/de/kotka/vimclojure/backend.clj
+++ src/de/kotka/vimclojure/backend.clj
@@ -37,7 +37,9 @@
         (print-special-doc sym "Special Form" (syntax-symbol-anchor sym))

         :else
-        (print-doc (ns-resolve namespace sym))))))
+        (if-let [nspace (find-ns sym)]
+          (print-namespace-doc nspace)
+          (print-doc (ns-resolve namespace sym)))))))

 (defn javadoc-path-for-class
   "Translate the name of a Class to the path of its javadoc file."


Update options

Update options

--- src/discuss/components/options.cljs
+++ src/discuss/components/options.cljs
@@ -22,8 +22,8 @@
   "Generic row for multiple settings."
   [description content]
   (dom/div #js {:className "row"}
-           (dom/div #js {:className "col-md-offset-1 col-md-3"} description)
-           (dom/div #js {:className "col-md-7"} content)))
+           (dom/div #js {:className "col-md-offset-1 col-md-2"} description)
+           (dom/div #js {:className "col-md-8"} content)))

 (defn- language
   "Component for a single language selection."
@@ -38,7 +38,7 @@
 (defn- languages
   "Language Chooser."
   []
-  (option-row (translate :options :lang)
+  (option-row (dom/span nil (vlib/fa-icon "fa-flag") (translate :options :lang :space))
               (apply dom/div nil
                      (map #(om/build language %) translations/available))))


Add function to get last added discussion url in history

--- src/discuss/history/discussion.cljs
+++ src/discuss/history/discussion.cljs
@@ -1,6 +1,7 @@
 (ns discuss.history.discussion
   (:require [discuss.utils.common :as lib]
-            [cljs.spec.alpha :as s]))
+            [cljs.spec.alpha :as s]
+            [discuss.utils.logging :as log]))

 (defn get-discussion-urls
   "Return URLs of clicked items."
@@ -9,9 +10,18 @@
 (s/fdef get-discussion-urls
   :ret (s/coll-of string?))

+(defn get-last-discussion-url
+  "Return last URL which was used in the discussion. Can be used to post new
+  statements to this route, because this creates a new statement."
+  []
+  (last (get-discussion-urls)))
+(s/fdef get-last-discussion-url
+  :ret string?)
+
 (defn save-discussion-url!
   "Takes a URL from the clicked item and stores it in the app-state."
   [url]
+  (log/info "Saving last discussion url: %s" url)
   (lib/store-to-app-state! 'history/discussion-steps (conj (get-discussion-urls) url)))
 (s/fdef save-discussion-url!
   :args (s/cat :url string?))


dsl processing funcs

dsl processing funcs

--- datomic-dsl/src/datomic_dsl/add_nested.clj
+++ datomic-dsl/src/datomic_dsl/add_nested.clj
@@ -32,3 +32,52 @@
         (zip-nodes
          dsl-zipper dsl))))

+(defn get-key-sequences
+  "Get each of the nested nodes as a flat vector of nodes to map over."
+  [nested-dsl]
+  (let [nested-datom-dsl-zipper (map-zip nested-dsl)]
+    (map vec (map-keys-seqs nested-dsl))))
+
+(defn append-in
+  "Given a key sequence - append a value at the nested location."
+  [nested-coll nested-key-seq param]
+  (assoc-in nested-coll nested-key-seq
+            (conj (get-in nested-coll nested-key-seq) param)))
+
+(defn replace-children
+  "For a map of maps - replace the children maps with their nested dbids."
+  [[k v]]
+  (if (= clojure.lang.PersistentHashMap (class v))
+    [k (:db/id v)]
+    [k v]))
+
+(defn add-matching-dbids-to-nested-child
+  "Map this onto each of the nested children using a key-sequence to give them a dbid."
+  [nest-datom-dsl-input current-seq]
+  (let [current-seq-rev (reverse current-seq)
+        parent-seq (drop-last current-seq)
+        last-two (take-last 2 current-seq-rev)
+        dbid (d/tempid :db.part/user)
+        child-dbid (:db/id dbid)
+        parent-keyword (case (count last-two)
+                         2 (keyword (first last-two) (second last-two))
+                         1 (kayword (first last-two)))
+        parent-dbid (if (> (count curent-seq) 1) (parent-keyword dbid))
+        child-replace (append-in nest-datom-dsl-input current-seq-vec child-dbid)
+        parent-replace (marge child-replace parent-dbid)]
+    parent-replace))
+
+(defn key-sequence
+  "Get the key sequence from the dsl and filter out the top-level ones and return a set of vectors."
+  [dsl]
+  (set
+   (map vec
+        (map rest
+             (filter #(> (count %) 1)
+                     (get-key-sequences dsl))))))
+
+(defn nested-insert-dsl
+  "Step through the existing dsl and add matching dbids to future parent and children entities."
+  [schema-name dsl]
+  (reduce add-matching-dbids-to-nested-child
+          dsl (key-sequence dsl)))


Formatting.

Formatting.

--- test/onyx/messaging/messaging_gen_test.clj
+++ test/onyx/messaging/messaging_gen_test.clj
@@ -14,13 +14,9 @@
             [onyx.test-helper :refer [load-config]]
             [com.gfredericks.test.chuck :refer [times]]
             [com.gfredericks.test.chuck.clojure-test :refer [checking]])
-  (:import
-             [io.netty.buffer ByteBuf]
+  (:import [io.netty.buffer ByteBuf]
              [io.netty.channel Channel ChannelOption ChannelFuture ChannelInitializer ChannelPipeline
-              MultithreadEventLoopGroup ChannelHandler ChannelHandlerContext ChannelInboundHandlerAdapter]
-             )
-
-  )
+              MultithreadEventLoopGroup ChannelHandler ChannelHandlerContext ChannelInboundHandlerAdapter]))

 (def id (java.util.UUID/randomUUID))


add another passato test

add another passato test

--- test/babel/test/it.clj
+++ test/babel/test/it.clj
@@ -18,6 +18,16 @@
                                 it/small)]
     (is (= "io sono" (fo result)))))

+(deftest passato-prossimo
+  (let [result (engine/generate {:root {:italiano {:italiano "bere"}}
+                                 :synsem {:subcat ()
+                                          :sem {:subj {:pred :I}
+                                                :tense :past
+                                                :aspect :perfect}}}
+                                it/small)]
+    (and (is (not (nil? result)))
+         (is (= "io ho bevuto" (fo result))))))
+
 (deftest passato-prossimo-reflexive
   (let [result (engine/generate {:head {:synsem {:agr {:gender :fem}}}
                                  :synsem {:subcat '()


a bit

a bit

--- Friend-Circles/FC.clj
+++ Friend-Circles/FC.clj
@@ -14,3 +14,9 @@
 (def test4 '((1 1 0)
              (1 1 0)
              (0 0 1))) ; 2
+
+(defn friend-circle [m]
+  (let [total (range 0 (count m))]
+    (loop [numSet total]
+      (do )
+      )))


Allow kick main to take a directory parameter

--- main/src/edge/kick.clj
+++ main/src/edge/kick.clj
@@ -33,7 +33,15 @@
       (clean path))))

 (defn -main
-  []
-  (let [kick-config (:edge.kick/builder (system/system-config :prod))]
-    (clean (java.io.File. (:kick.builder/target kick-config)))
+  [& [target-arg]]
+  (let [kick-init-config (:edge.kick/builder (system/system-config :prod))
+        kick-config (assoc kick-init-config
+                           :kick.builder/target
+                           (or target-arg
+                               (:kick.builder/target kick-init-config)))]
+    ;; When a target-arg is given, assume that we are not reusing a dir.
+    ;; Otherwise assume the directory is being reused and we are the first
+    ;; thing being run.
+    (when-not target-arg
+      (clean (java.io.File. (:kick.builder/target kick-config))))
     (kick/build-once kick-config)))


Added docstring to nested-params namespace

--- ring-core/src/ring/middleware/nested_params.clj
+++ ring-core/src/ring/middleware/nested_params.clj
@@ -1,4 +1,5 @@
-(ns ring.middleware.nested-params)
+(ns ring.middleware.nested-params
+  "Convert a single-depth map of parameters to a nested map.")

 (defn parse-nested-keys
   "Parse a parameter name into a list of keys using a 'C'-like index


Fix sym.

Fix sym.

--- test/onyx/test_job.clj
+++ test/onyx/test_job.clj
@@ -119,7 +119,7 @@
           _ (doall
              (map (fn [[k c]]
                     (let [f-sym (symbol (str "inject-" (name k)))]
-                      (intern *ns* f-sym (eval `(fn ~n ~[] {:core.async/chan c})))
+                      (intern *ns* f-sym (eval `(fn ~k ~[] {:core.async/chan c})))
                       (intern *ns* (symbol (str (name k) "-calls"))
                               {:lifecycle/before-task
                                (str :onyx.test-job (str "/inject-" (name k)))})))


CW + DM #19 - Fix commenting for old objectives

Objectives created before migration 013 do not have a global-id field in
their json.  Working around by retrieving global-id direct
from the global_id column when unmapping.

--- src/objective8/storage/mappings.clj
+++ src/objective8/storage/mappings.clj
@@ -133,18 +133,17 @@
                  :_id (:_id m)
                  :_created_at (sql-time->iso-time-string (:_created_at m)))))

-(defn unmap-with-username [data-key]
-  (fn [m] (assoc (json-type->map (data-key m))
-                 :_id (:_id m)
-                 :_created_at (sql-time->iso-time-string (:_created_at m))
-                 :username (:username m))))
-
-(defn unmap-with-sql-time [data-key]
-  (fn [m] (assoc (json-type->map (data-key m))
-                 :_id (:_id m)
-                 :_created_at (sql-time->iso-time-string (:_created_at m))
-                 :_created_at_sql_time (:_created_at m)
-                 :username (:username m))))
+(defn with-username [unmap-fn]
+  (fn [m] (-> (unmap-fn m)
+              (assoc :username (:username m)))))
+
+(defn with-sql-time [unmap-fn]
+  (fn [m] (-> (unmap-fn m)
+              (assoc :_created_at_sql_time (:_created_at m)))))
+
+(defn with-global-id [unmap-fn]
+  (fn [m] (-> (unmap-fn m)
+              (assoc :global-id (:global_id m)))))

 (declare objective user comment question answer invitation candidate bearer-token up-down-vote)

@@ -157,7 +156,7 @@
   (korma/table :objective8.objectives)
   (korma/belongs-to user {:fk :created_by_id})
   (korma/prepare map->objective)
-  (korma/transform (unmap-with-username :objective)))
+  (korma/transform (-> (unmap :objective) with-username with-global-id)))

 (korma/defentity user
   (korma/pk :_id)
@@ -170,21 +169,21 @@
   (korma/table :objective8.comments)
   (korma/belongs-to user {:fk :created_by_id})
   (korma/prepare map->comment)
-  (korma/transform (unmap-with-username :comment)))
+  (korma/transform (-> (unmap :comment) with-username)))

 (korma/defentity question
   (korma/pk :_id)
   (korma/table :objective8.questions)
   (korma/belongs-to user {:fk :created_by_id})
   (korma/prepare map->question)
-  (korma/transform (unmap-with-username :question)))
+  (korma/transform (-> (unmap :question) with-username)))

 (korma/defentity answer
   (korma/pk :_id)
   (korma/table :objective8.answers)
   (korma/belongs-to user {:fk :created_by_id})
   (korma/prepare map->answer)
-  (korma/transform (unmap-with-username :answer)))
+  (korma/transform (-> (unmap :answer) with-username)))

 (korma/defentity invitation
   (korma/pk :_id)
@@ -216,7 +215,7 @@
   (korma/table :objective8.drafts)
   (korma/belongs-to user {:fk :submitter_id})
   (korma/prepare map->draft)
-  (korma/transform (unmap-with-sql-time :draft)))
+  (korma/transform (-> (unmap :draft) with-username with-sql-time with-global-id)))

 (korma/defentity bearer-token
   (korma/pk :_id)


use hashi-install tool for installation

use hashi-install tool for installation

--- main/src/dda/pallet/dda_managed_ide/infra/devops.clj
+++ main/src/dda/pallet/dda_managed_ide/infra/devops.clj
@@ -66,34 +66,45 @@
     ("pip3" "install" "future")
     ("pip3" "install" "aws-amicleaner")))

+(s/defn install-hashi-installer
+  [facility :- s/Keyword]
+  (actions/as-action
+   (logging/info (str facility "-install system: install-hashi-installer")))
+  (actions/directory
+   "/usr/local/lib/dda-pallet"
+   :owner "root"
+   :group "root"
+   :mode "755")
+  (actions/remote-file
+   "/usr/local/lib/dda-pallet/install_hashicorp.py"
+   :owner "root"
+   :group "root"
+   :mode "755"
+   :literal true
+   :content
+   (selmer/render-file "install_hashicorp.py.template" {})))
+
 (s/defn install-packer
   [facility :- s/Keyword
    config :- Packer]
-  (let [{:keys [version sha256-hash]} config
-        file-name (str "packer_" version "_linux_amd64.zip")
-        usr-local-lib-dir (str "/usr/local/lib/packer/" version)
-        sum-name (str file-name "SHA256SUM")]
+  (let [{:keys [version sha256-hash]} config]
     (actions/as-action
-      (logging/info (str facility "-install system: install-packer")))
-    (when (contains? config :sha256-hash)
-      (actions/remote-file
-        (str "/tmp/" sum-name)
-        :owner "root"
-        :group "root"
-        :mode "600"
-        :literal true
-        :content (str sha256-hash " " file-name)))
-    (actions/exec-checked-script
-     "install packer"
-     ("curl" "-L" "-o" ~(str "/tmp/" file-name)
-             ~(str "https://releases.hashicorp.com/packer/" version "/" file-name))
-     ("cd" "/tmp")
-     (if (file-exists? ~sum-name)
-       ("sha256sum" "-c" ~sum-name))
-     ("unzip" ~file-name)
-     ("mkdir" "-p" ~usr-local-lib-dir)
-     ("mv" "packer" ~usr-local-lib-dir)
-     ("ln" "-s" "-f" ~(str usr-local-lib-dir "/packer") "/usr/local/bin/packer"))))
+     (logging/info (str facility "-install system: install-packer")))
+    (if (contains? config :sha256-hash)
+      (actions/exec-checked-script
+       "install packer"
+       ("/usr/local/lib/dda-pallet/install_hashicorp.py"
+        "--version" ~version
+        "--hash" ~sha256-hash
+        "--link-to-path"
+        "packer"))
+      (actions/exec-checked-script
+       "install packer"
+       ("/usr/local/lib/dda-pallet/install_hashicorp.py"
+        "--version" ~version
+        "--link-to-path"
+        "packer")))
+  ))

 (defn install-docker
   [facility]
@@ -166,32 +177,24 @@

 (s/defn install-terraform
   [facility
-   terraform-config :- Terraform]
-  (let [{:keys [version sha256-hash]} terraform-config
-        terraform-file-name (str "terraform_" version "_linux_amd64.zip")
-        usr-local-lib-dir (str "/usr/local/lib/terraform/" version)
-        terraform-sum-name (str terraform-file-name "SHA256SUM")]
+   config :- Terraform]
+  (let [{:keys [version sha256-hash]} config]
     (actions/as-action
       (logging/info (str facility "-install system: install-terraform")))
-    (when (contains? terraform-config :sha256-hash)
-      (actions/remote-file
-        (str "/tmp/" terraform-sum-name)
-        :owner "root"
-        :group "root"
-        :mode "600"
-        :literal true
-        :content (str sha256-hash " " terraform-file-name)))
-    (actions/exec-checked-script
-     "install terraform"
-     ("curl" "-L" "-o" ~(str "/tmp/" terraform-file-name)
-             ~(str "https://releases.hashicorp.com/terraform/" version "/" terraform-file-name))
-     ("cd" "/tmp")
-     (if (file-exists? ~terraform-sum-name)
-       ("sha256sum" "-c" ~terraform-sum-name))
-     ("unzip" ~terraform-file-name)
-     ("mkdir" "-p" ~usr-local-lib-dir)
-     ("mv" "terraform" ~usr-local-lib-dir)
-     ("ln" "-s" "-f" ~(str usr-local-lib-dir "/terraform") "/usr/local/bin/terraform"))))
+    (if (contains? config :sha256-hash)
+      (actions/exec-checked-script
+       "install terraform"
+       ("/usr/local/lib/dda-pallet/install_hashicorp.py"
+        "--version" ~version
+        "--hash" ~sha256-hash
+        "--link-to-path"
+        "terraform"))
+      (actions/exec-checked-script
+       "install packer"
+       ("/usr/local/lib/dda-pallet/install_hashicorp.py"
+        "--version" ~version
+        "--link-to-path"
+        "terraform")))))

 (s/defn install-system
   [facility :- s/Keyword
@@ -205,13 +208,16 @@
        (install-ami-cleaner facility))
     (when contains-devops?
       (when (contains? devops :aws)
-         (install-awscli facility))
+        (install-awscli facility))
       (when (contains? devops :docker)
-         (install-docker facility))
+        (install-docker facility))
+      (when (or (contains? devops :terraform)
+                (contains? devops :package))
+        (install-hashi-installer facility))
       (when (contains? devops :terraform)
-         (install-terraform facility terraform))
+        (install-terraform facility terraform))
       (when (contains? devops :packer)
-         (install-packer facility packer)))))
+        (install-packer facility packer)))))

 (s/defn configure-system
   [facility :- s/Keyword


add decorated functions

add decorated functions

--- src/sandbox/decorator/decorator.clj
+++ src/sandbox/decorator/decorator.clj
@@ -9,3 +9,8 @@
   (fn [a b]
     (let [result (calc-fn a b)]
       (println (str "Result is: " result)) result)))
+
+(def logging-add (make-logger add))
+(def logging-subtract (make-logger subtract))
+(def logging-multiply (make-logger multiply))
+(def logging-divide (make-logger divide))


Add more shortcuts to workspace.

Add more shortcuts to workspace.

--- frontend/uxbox/ui/workspace/shortcuts.cljs
+++ frontend/uxbox/ui/workspace/shortcuts.cljs
@@ -15,6 +15,7 @@
 (defonce ^:static +shortcuts+
   #{:ctrl+g
     :ctrl+shift+f
+    :ctrl+shift+i
     :ctrl+shift+l})

 (defonce ^:static ^:private +bus+
@@ -54,6 +55,10 @@
   [_]
   (rs/emit! (dw/toggle-toolbox :layers)))

+(defmethod -handle-event :ctrl+shift+i
+  [_]
+  (rs/emit! (dw/toggle-toolbox :icons)))
+
 (defmethod -handle-event :ctrl+shift+f
   [_]
   (rs/emit! (dw/toggle-toolbox :draw)))


[CS] Add warnings and errors keys to context

--- src/vip/data_processor/pipeline.clj
+++ src/vip/data_processor/pipeline.clj
@@ -21,6 +21,8 @@

 (defn process [pipeline initial-input]
   (let [ctx {:input initial-input
+             :warnings []
+             :errors []
              :pipeline pipeline}
         result (run-pipeline ctx)]
     (log/info result)


comments around pom configs

comments around pom configs

--- hyrax/project.clj
+++ hyrax/project.clj
@@ -14,7 +14,13 @@

   :global-vars {*warn-on-reflection* true}

-  :pom-plugins [[com.theoryinpractise/clojure-maven-plugin "1.3.13"
+  :pom-plugins [
+
+                ; These three plugins are configured to build the jar two different ways;
+                ; one with aot classes, and one without. Pity its so awkward. Has to be
+                ; a better way. A lot easier to read in here than in xml though.
+
+                [com.theoryinpractise/clojure-maven-plugin "1.3.13"
                  {:configuration [:sourceDirectories [:sourceDirectory "src/clojure"]]
                   :extensions "true"
                   :executions ([:execution [:id "no-aot-compile"]
@@ -62,6 +68,9 @@
                                  [:classesDirectory "${basedir}/target/aot"]
                                  [:classifier "aot"]]])}]

+                ; This plugin is here to provide a source jar artifact that java-friendly
+                ; IDE's can understand.
+
                 [org.apache.maven.plugins/maven-source-plugin "2.4"
                  {:executions ([:execution [:id "sources"]
                                [:goals ([:goal "jar"])]


fixed merge conflict

fixed merge conflict

--- test/forma/trends/analysis_test.clj
+++ test/forma/trends/analysis_test.clj
@@ -133,7 +133,7 @@
 original time series"
  (let [s-drop (short-trend 23 30 10 reli (shift-down-end ndvi))]
    s-drop => (roughly -207.1324832578859)
-   (- (abs s-drop)xk
+   (- (abs s-drop)
       (abs (short-trend 23 30 10 reli ndvi))) => pos?))

 (fact


Add tests for util/extract-params

Add tests for util/extract-params

--- test/github_changelog/util_test.clj
+++ test/github_changelog/util_test.clj
@@ -5,3 +5,7 @@
 (deftest strip-trailing
   (is (= "something" (util/strip-trailing "something///" "/")))
   (is (= "foobar" (util/strip-trailing "foobar" "!!"))))
+
+(deftest extract-params
+  (is (= {}) (util/extract-params ""))
+  (is (= {:a 1 :b 2}) (util/extract-params "a=1&b=2")))


update test game

update test game

--- tests/battlebots/game/test_game.clj
+++ tests/battlebots/game/test_game.clj
@@ -25,7 +25,6 @@
                    :login "oconn"
                    :bot-repo "bot"
                    :energy 20
-                   :messages []
                    :bot "{:commands [{:cmd \"MOVE\"
                                       :metadata {:direction (rand-nth [0])}}
                                      {:cmd \"SET_STATE\"
@@ -37,7 +36,6 @@
                    :login "Mr. Robot"
                    :bot-repo "bot"
                    :energy 50
-                   :messages []
                    :bot "{:commands [{:cmd \"MOVE\"
                                       :metadata {:direction (rand-nth [0])}}
                                      {:cmd \"SET_STATE\"
@@ -64,5 +62,5 @@
                       :frames []
                       :segment-count 0
                       :_id "1"
-                      :messages []
+                      :messages {}
                       :players [bot1-private bot2-private]})


Drop 1.3 support

Drop 1.3 support

--- metrics-clojure-core/project.clj
+++ metrics-clojure-core/project.clj
@@ -10,9 +10,8 @@
                  "sonatype-snapshots" {:url "http://oss.sonatype.org/content/repositories/snapshots"
                                        :snapshots true
                                        :releases {:checksum :fail :update :always}}}
-    :profiles {:1.3    {:dependencies [[org.clojure/clojure "1.3.0"]]}
-               :1.4    {:dependencies [[org.clojure/clojure "1.4.0"]]}
+    :profiles {:1.4    {:dependencies [[org.clojure/clojure "1.4.0"]]}
                :1.5    {:dependencies [[org.clojure/clojure "1.5.1"]]}
                :master {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}}
-  :aliases  {"all" ["with-profile" "+dev:+1.3:+1.4:+1.5:+master"]}
+  :aliases  {"all" ["with-profile" "+dev:+1.4:+1.5:+master"]}
   :global-vars {*warn-on-reflection* true})


Updated csv result handler with atom links change in the indexer.

--- src/cmr/search/results_handlers/csv_results_handler.clj
+++ src/cmr/search/results_handlers/csv_results_handler.clj
@@ -29,13 +29,13 @@
          [producer-gran-id] :producer-gran-id
          [start-date] :start-date
          [end-date] :end-date
-         [atom-links] :atom-links
+         atom-links :atom-links
          [cloud-cover] :cloud-cover
          [day-night] :day-night
          [size] :size} (:fields elastic-result)
         start-date (when start-date (str/replace (str start-date) #"\+0000" "Z"))
         end-date (when end-date (str/replace (str end-date) #"\+0000" "Z"))
-        atom-links (if atom-links (json/decode atom-links true) [])
+        atom-links (map #(json/decode % true) atom-links)
         downloadable-urls (seq (map :href
                                     (filter #(= (:link-type %) "data") atom-links)))
         browse-urls (seq (map :href


CMR-3685: Added check for provider routes

--- ingest-app/src/cmr/ingest/api/provider.clj
+++ ingest-app/src/cmr/ingest/api/provider.clj
@@ -1,11 +1,13 @@
 (ns cmr.ingest.api.provider
   "Defines the HTTP URL routes for the provider endpoint in the ingest application."
-  (:require [compojure.core :refer :all]
-            [cmr.common.mime-types :as mt]
-            [cmr.acl.core :as acl]
-            [cheshire.core :as json]
-            [cmr.ingest.services.provider-service :as ps]
-            [cmr.common.services.errors :as errors]))
+  (:require
+   [cheshire.core :as json]
+   [cmr.acl.core :as acl]
+   [cmr.common.mime-types :as mt]
+   [cmr.common.services.errors :as srvc-errors]
+   [cmr.common-app.api.enabled :as common-enabled]
+   [cmr.ingest.services.provider-service :as ps]
+   [compojure.core :refer :all]))

 (defn- result->response-map
   "Returns the response map of the given result"
@@ -19,7 +21,7 @@
   [headers body-input]
   (if (= mt/json (mt/content-type-mime-type headers))
     (json/decode (slurp body-input) true)
-    (errors/throw-service-error
+    (srvc-errors/throw-service-error
       :invalid-content-type "Creating or updating a provider requires a JSON content type.")))

 (def provider-api-routes
@@ -28,8 +30,11 @@
     ;; create a new provider
     (POST "/" {:keys [request-context body params headers]}
       (acl/verify-ingest-management-permission request-context :update)
-      (result->response-map
-        (ps/create-provider request-context (read-body headers body))))
+      (if (common-enabled/app-enabled? request-context)
+        (result->response-map
+          (ps/create-provider request-context (read-body headers body)))
+        (srvc-errors/throw-service-error :service-unavailable
+                                       (common-enabled/service-disabled-message "ingest"))))

     ;; update an existing provider
     (PUT "/:provider-id" {{:keys [provider-id] :as params} :params
@@ -37,16 +42,22 @@
                           body :body
                           headers :headers}
       (acl/verify-ingest-management-permission request-context :update)
-      (result->response-map
-        (ps/update-provider request-context (read-body headers body))))
+      (if (common-enabled/app-enabled? request-context)
+        (result->response-map
+          (ps/update-provider request-context (read-body headers body)))
+        (srvc-errors/throw-service-error :service-unavailable
+                                       (common-enabled/service-disabled-message "ingest"))))

     ;; delete a provider
     (DELETE "/:provider-id" {{:keys [provider-id] :as params} :params
                              request-context :request-context
                              headers :headers}
       (acl/verify-ingest-management-permission request-context :update)
-      (result->response-map
-        (ps/delete-provider request-context provider-id)))
+      (if (common-enabled/app-enabled? request-context)
+        (result->response-map
+          (ps/delete-provider request-context provider-id))
+        (srvc-errors/throw-service-error :service-unavailable
+                                       (common-enabled/service-disabled-message "ingest"))))

     ;; get a list of providers
     (GET "/" {:keys [request-context]}


Added test for «supports»

Added test for «supports»

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

--- src/conexp/contrib/tests/algorithms/titanic.clj
+++ src/conexp/contrib/tests/algorithms/titanic.clj
@@ -52,6 +52,18 @@
                                   <=)])
        (set (titanic-context-intents ctx)))))

+(deftest test-supports
+  (with-testing-data [ctx *testing-data*,
+                      min [0 0.2 0.4 0.7 1.0]]
+    (let [minnum (* (count (objects ctx)) min),
+          sp     (supports ctx min),
+          supps  (sp (subsets (attributes ctx)))]
+      (forall [[atts supp] supps]
+        (let [card (count (attribute-derivation ctx atts))]
+          (if (<= minnum card)
+            (= supp card)
+            (= supp -1))))))))
+
 ;;;

 nil


Reformat run-on forms

Reformat run-on forms

--- src/main/clojure/dm/expt/reddit_recommender.clj
+++ src/main/clojure/dm/expt/reddit_recommender.clj
@@ -23,11 +23,11 @@
     [#_(user-weight user) (subreddit-weight subreddit) (value this)]))

 (defn analyze [cluster user-weight subreddit-weight]
-  {:count (count cluster)
+  {:count      (count cluster)
    :affinities (let [affs (map value cluster)]
                  (map #(% affs) [i/quantile i/mean]))
-   :users (let [subsciptions (vals (select-keys user-weight (set (map :user cluster))))]
-            (map #(% subsciptions) [i/quantile count]))
+   :users      (let [subsciptions (vals (select-keys user-weight (set (map :user cluster))))]
+                 (map #(% subsciptions) [i/quantile count]))
    :subreddits (let [user-base (vals (select-keys subreddit-weight (set (map :subreddit cluster))))]
                  (map #(% user-base) [i/quantile count]))})

@@ -47,11 +47,16 @@
 (defn affinities->doubles [affinities]
   (let [user->subreddits (frequencies (map :user affinities))
         subreddit->users (frequencies (map :subreddit affinities))]
-    (into-array (apply map (comp double-array vector) (map #(features % user->subreddits subreddit->users) affinities)))))
+    (into-array
+      (apply map
+             (comp double-array vector)
+             (map #(features % user->subreddits subreddit->users) affinities)))))

 (defn plot [affinities]
-  (chart/frame "Affinity scatter" (doto (DefaultXYDataset.)
-                                    (.addSeries "Features" (affinities->doubles affinities)))))
+  (chart/frame
+    "Affinity scatter"
+    (doto (DefaultXYDataset.)
+      (.addSeries "Features" (affinities->doubles affinities)))))

 (defmethod chart/chart XYDataset [dataset]
   (ChartFactory/createScatterPlot "Affinity scatter" "Subreddit weight" "Affinity" dataset))
@@ -70,4 +75,4 @@
            (plot))
          (clusters i/euclidean-distance 10 100)
          (doto
-           (pp/pprint))))))
+           (pp/pprint))))))


Add some stuff to profiles.clj

Add some stuff to profiles.clj

--- .lein/profiles.clj
+++ .lein/profiles.clj
@@ -1,6 +1,13 @@
 {:user
- {:plugins [[cider/cider-nrepl "0.21.1"]
-            [io.aviso/pretty "0.1.37"]
-            [lein-kibit "0.1.6"]]
-  :dependencies [[io.aviso/pretty "0.1.37"]]
+ {:plugins [[io.aviso/pretty "0.1.37"]
+            [jonase/eastwood "0.3.5"]
+            [lein-kibit "0.1.7"]]
+  :dependencies [[im.chit/vinyasa.inject "0.4.7"]
+                 [io.aviso/pretty "0.1.37"]
+                 [philoskim/debux "0.5.6"]
+                 [pjstadig/humane-test-output "0.9.0"]]
+  :injections [(require 'vinyasa.inject 'debux.core)
+               (vinyasa.inject/inject '[clojure.core [debux.core dbg dbgn]])
+               (require 'pjstadig.humane-test-output)
+               (pjstadig.humane-test-output/activate!)]
   :middleware [io.aviso.lein-pretty/inject]}}


lein: update cider-nrepl

lein: update cider-nrepl

--- .lein/profiles.clj
+++ .lein/profiles.clj
@@ -1,3 +1,3 @@
-{:repl {:plugins [[cider/cider-nrepl "0.17.0"]]
+{:repl {:plugins [[cider/cider-nrepl "0.18.0"]]
         :dependencies [[org.clojure/tools.nrepl "0.2.13"]]}
  :user {:plugins [[lein-pprint "1.2.0"]]}}


Ensure recent Clojure version for CIDER et al

--- .lein/profiles.clj
+++ .lein/profiles.clj
@@ -1,6 +1,9 @@
 {;;; Modular profiles

- :cider {:plugins [;; REPL-side support for CIDER and other editor tools
+ :cider {:dependencies [;; CIDER requires Clojure 1.7.0+ to work
+                        [org.clojure/clojure "1.8.0"]]
+
+         :plugins [;; REPL-side support for CIDER and other editor tools
                    [cider/cider-nrepl "0.13.0"]]}

  :humane {:dependencies [;; Better-formatted clojure.test output
@@ -125,7 +128,10 @@
                                          (io.aviso.repl/pretty-pst e)
                                          (io.aviso.repl/pretty-pst)))))]}

- :refactor {:plugins [;; REPL-side support for clj-refactor
+ :refactor {:dependencies [;; refactor-nrepl requires Clojure 1.7.0+ to work
+                           [org.clojure/clojure "1.8.0"]]
+
+            :plugins [;; REPL-side support for clj-refactor
                       [refactor-nrepl "2.2.0"]]}

  :spyscope {:dependencies [;; Quick-and-dirty debugging tools


[scamp] name destructured map for clarity

--- modules/scamp/src/scamp/core.clj
+++ modules/scamp/src/scamp/core.clj
@@ -296,7 +296,7 @@

   2.2.1 Subscription: Algorithm 1"
   [_message-type :- MessageTypesSchema
-   {:keys [logging connection-redundancy]}
+   {:keys [logging connection-redundancy] :as cluster-config}
    {:keys [downstream] :as node} :- NetworkedNodeSchema
    subscription :- SubscriptionSchema
    _envelope-id :- MessageEnvelopeIdSchema]


Fix Eastwood found problem. Thanks Eastwood!

--- src/open_company/representations/stakeholder_update.clj
+++ src/open_company/representations/stakeholder_update.clj
@@ -20,9 +20,10 @@
 (defn create-link [company-url]
   (common/link-map "share" common/POST (stakeholder-updates-url company-url) nil))

-(defn stakeholder-updates-link [conn company-slug company-url]
+(defn stakeholder-updates-link
   "Create a HATEOAS link to be used to retrieve stakeholder updates and annotate it
   with a count of how many updates exist."
+  [conn company-slug company-url]
   (assoc
     (common/link-map "stakeholder-updates" common/GET (stakeholder-updates-url company-url) collection-media-type)
     :count (su/count-stakeholder-updates conn company-slug)))


[#11882] Replace ` #status` with `#support` in Profile > Need help

Signed-off-by: andrey <b713972e59b8e606e23253c4a13e948139fea4d1@gmail.com>

--- src/status_im/ui/screens/help_center/views.cljs
+++ src/status_im/ui/screens/help_center/views.cljs
@@ -33,7 +33,7 @@
     :accessibility-label :request-a-feature-button
     :on-press
     #(re-frame/dispatch [:chat.ui/start-public-chat
-                         "status"
+                         "support"
                          {:navigation-reset? false}])
     :chevron             true}])


stop setting global auth_endpoint, passing it in as a params works, now

--- frontend/pusher.cljs
+++ frontend/pusher.cljs
@@ -20,10 +20,8 @@

 (defn new-pusher-instance [& {:keys [key]
                               :or {key pusher-key}}]
-  (aset (aget js/window "Pusher") "channel_auth_endpoint" "/auth/pusher")
   (js/Pusher. key (clj->js {:encrypted true
                             :auth {:params {:CSRFToken (utils/csrf-token)}}
-                            ;; this doesn't seem to work (outdated client library?)
                             :authEndpoint "/auth/pusher"})))

 (defn user-channel [user]


Correct license as Apache. Add project resource paths for WordCram

--- spectacles/project.clj
+++ spectacles/project.clj
@@ -1,8 +1,15 @@
 (defproject spectacles "0.1.0-SNAPSHOT"
   :description "FIXME: write description"
   :url "http://example.com/FIXME"
-  :license {:name "Eclipse Public License"
-            :url "http://www.eclipse.org/legal/epl-v10.html"}
+  :license {:name "Apache License 2.0"
+            :url "http://www.apache.org/licenses/LICENSE-2.0"}
   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [quil "2.2.6"]}
+                 [quil "2.2.6"]]
+
+  :resource-paths [
+                   ;; Wordmaps / WordCram
+                   "resources/wordcram/library/WordCram.jar"
+                   "resources/wordcram/library/cue.language.jar"
+                   "resources/wordcram/library/jsoup-1.7.2.jar"
+                   ]
   )


fix rewinding bug, simplify iters-next

fix rewinding bug, simplify iters-next

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

--- src/aurora/join.cljs
+++ src/aurora/join.cljs
@@ -8,7 +8,7 @@
                 (> a b))
            (> (typeof a) (typeof b)))))

-(deftype MagicIterator [iterator map nil-ixs map-len ^:mutable cur-key ^:mutable cur-seek ^:mutable prev-seek ^:mutable marked-nodes ^:mutable marked-ixs ^:mutable end?]
+(deftype MagicIterator [iterator map nil-ixs rewindable map-len ^:mutable cur-key ^:mutable cur-seek ^:mutable prev-seek ^:mutable marked-nodes ^:mutable marked-ixs ^:mutable end?]
   Object
   (mark [this i]
         (aset marked-nodes i (.-node iterator))
@@ -20,7 +20,6 @@
           (set! (.-end? iterator) false)
           (set! end? false)
           (.set-key this)
-          ;(println "rewinding: " i (.-cur-key this))
           )

   (key [this]
@@ -69,10 +68,10 @@
                    (.mark this cur)))

   (check-rewind [this key]
-                (let [len (alength nil-ixs)]
+                (let [len (alength rewindable)]
                   (loop [ix 0]
                     (if (< ix len)
-                      (let [cur (aget nil-ixs ix)
+                      (let [cur (aget rewindable ix)
                             rewind? (not (identical? (aget key cur) (aget prev-seek cur)))]
                         (cond
                          ;; we can't store anything if we're at the root value, so just rewind if we need
@@ -106,14 +105,25 @@
 (defn magic-iterator [tree map]
    (let [nil-ixs (array)
          itr (iterator tree)
+         map-len (alength map)
+         rewindable (array)
          marked-nodes (js-obj 0 (.-node itr))
          marked-ixs (js-obj 0 0)
-         magic (MagicIterator. itr map nil-ixs (alength map) (array) (.slice (or (.key itr) (array)) 0) (array) marked-nodes marked-ixs false)]
-     (dotimes [ix (alength map)]
-       (when (identical? nil (aget map ix))
-         (.push nil-ixs ix)
-         (aset marked-nodes ix (.-node itr))
-         (aset marked-ixs ix (.-ix itr))))
+         magic (MagicIterator. itr map nil-ixs rewindable map-len (array) (.slice (or (.key itr) (array)) 0) (array) marked-nodes marked-ixs false)]
+     (loop [ix 0
+            potential (array)]
+       (when (< ix map-len)
+         (if (identical? nil (aget map ix))
+           (do
+             (.push nil-ixs ix)
+             (.push potential ix)
+             (aset marked-nodes ix (.-node itr))
+             (aset marked-ixs ix (.-ix itr))
+             (recur (+ ix 1) potential))
+           (do
+             (dotimes [x (alength potential)]
+               (.push rewindable (aget potential x)))
+             (recur (+ ix 1) (array))))))
      (.set-key magic)
      (.make-min magic)
      (when (identical? (.-end? magic) false)
@@ -131,47 +141,37 @@

   (iters-next [this]
-              ;;try next on the last iterator
-              (let [last (aget iterators (- len 1))]
-                (.next last)
-                (if-not (.-end? last)
-                  (ainto next-key (.key last))
-                  ;;otherwise walk up and get the min next value
-                  (loop [ix (- len 2)]
-                    (when (>= ix 0)
-                      (let [cur (aget iterators ix)]
-                        (.next cur)
-                        (if (.-end? cur)
-                          (recur (- ix 1))
-                          (ainto next-key (.make-min cur)))))))))
+              (loop [ix (- len 1)]
+                (when (>= ix 0)
+                  (let [cur (aget iterators ix)]
+                    (.next cur)
+                    (if (.-end? cur)
+                      (recur (- ix 1))
+                      (ainto next-key (.make-min cur)))))))

   (seek-join [this]
              ;;while we haven't found a match
              (loop []
-               ;;seek each iterator
-               (loop [ix 0]
-                 (if (< ix len)
-                   (let [cur (aget iterators ix)
-                         cur-key (.key cur)]
-                     (.seek cur next-key)
-                     (if-not (.-end? cur)
-                       (do
-                         (ainto next-key (.key cur))
-                         (recur (+ 1 ix)))
-                       (set! end? true)))))
-               (when (identical? end? false)
-                 (let [root-key (.key (aget iterators 0))
-                       last-key (.key (aget iterators (- len 1)))]
-                   ;;when the first and last keys are the same, we have a match
-                   (if (key= root-key last-key)
-                     (do
-                       (set! cur-key (.slice last-key 0))
-                       (.iters-next this))
-                     ;;otherwise recur
-                     (do
-                       (ainto next-key last-key)
-                       (recur )))
-                       ))))
+                   ;;seek each iterator
+                   (loop [ix 0]
+                     (if (< ix len)
+                       (let [cur (aget iterators ix)
+                             cur-key (.key cur)]
+                         (.seek cur next-key)
+                         (if-not (.-end? cur)
+                           (do
+                             (ainto next-key (.key cur))
+                             (recur (+ 1 ix)))
+                           (set! end? true)))))
+                   (when (identical? end? false)
+                     (let [root-key (.key (aget iterators 0))]
+                       ;;when the first and last keys are the same, we have a match
+                       (if (key= root-key next-key)
+                         (do
+                           (set! cur-key (.slice next-key 0))
+                           (.iters-next this))
+                         ;;otherwise recur
+                         (recur))))))

   (next [this]
         (.seek-join this))
@@ -263,7 +263,7 @@
                 (.assoc! tree3 #js [(+ i 1) (+ i 2)] (* 2 i))))
           ]
       (time
-       (dotimes [i 1000]
+       (dotimes [i 100]
          (let [itr1 (magic-iterator tree1 #js [0 1 2])
                itr2 (magic-iterator tree2 #js [0 nil 1])
                itr3 (magic-iterator tree3 #js [nil 0 1])
@@ -438,6 +438,47 @@
         (map vec #js [#js [-3 -3] #js [-3 "3"]  #js ["3" -3] #js ["3" "3"] ])))
     )

+    (let [tree1 (tree 10)
+        _ (doseq [x [#js ["3" "4"]
+                     #js [-3 -4]
+                     ]]
+            (.assoc! tree1 x 0))
+        tree2 (tree 10)
+        _ (doseq [x [#js ["3" "4"]
+                     #js [-3 -4]
+                     ]]
+            (.assoc! tree2 x 0))
+        itr1 (magic-iterator tree1 #js [0 1 nil nil])
+        itr2 (magic-iterator tree2 #js [nil nil 0 1])
+        _ (.clear js/console)
+        join-itr (join-iterator #js [itr1 itr2])
+        ]
+;;     (assert
+;;      (= (map vec (all-join-results join-itr))
+;;         (map vec #js [#js [-3 -3] #js [-3 "3"]  #js ["3" -3] #js ["3" "3"] ])))
+
+      (all-join-results join-itr)
+    )
+
+
+    (let [tree1 (tree 10)
+        _ (doseq [x [#js ["1" "-5" "-5"]
+                     #js [1 -6 "-6"]
+                     #js ["-8" 2 "1"]
+                     ]]
+            (.assoc! tree1 x 0))
+        _ (.clear js/console)
+        itr1 (magic-iterator tree1 #js [0 1 2 nil nil nil])
+        itr2 (magic-iterator tree1 #js [nil nil nil 0 1 2])
+        join-itr (join-iterator #js [itr1 itr2])
+        ]
+;;     (assert
+;;      (= (map vec (all-join-results join-itr))
+;;         (map vec #js [#js [-3 -3] #js [-3 "3"]  #js ["3" -3] #js ["3" "3"] ])))
+
+      (alength (all-join-results join-itr))
+    )
+
   (let [tree1 (tree 10)
         _ (dotimes [i 10]
             (.assoc! tree1 #js [(js/Math.sin i) (js/Math.cos i) (js/Math.tan i)] i))


don't support lexicon being a future any more.

--- src/babel/parse.cljc
+++ src/babel/parse.cljc
@@ -13,10 +13,11 @@
 (declare toks2)

 (defn toks [s lexicon lookup]
-  (let [lexicon
-        #?(:clj (if (future? lexicon) @lexicon lexicon))
-        #?(:cljs lexicon)]
-    (vec (toks2 (string/split s tokenizer) lexicon lookup))))
+  (let [tokens (string/split s tokenizer)
+        tokens2 (toks2 tokens lexicon lookup)]
+    (log/debug (str "tokens: " tokens))
+    (log/debug (str "tokens2 size: " (count tokens2)))
+    (vec tokens2)))

 (defn toks2 [tokens lexicon lookup]
   "like (toks), but use lexicon to consolidate two initial tokens into one. may consolidate larger groups than two in the future."


only add latency if not nil

only add latency if not nil

--- src/beehive/hive.clj
+++ src/beehive/hive.clj
@@ -301,7 +301,9 @@
   (let [builder (-> (GuardRailBuilder.)
                     (.name name)
                     (result-counts1 result-counts)
-                    (result-latency1 result-latency)
+                    (cond->
+                      result-latency
+                      (result-latency1 result-latency))
                     (rejected-counts1 rejected-counts)
                     (add-bp1 back-pressure))]
     (assoc hive-map


Add pipe-to-atom helper.

Add pipe-to-atom helper.

--- src/beicon/core.cljs
+++ src/beicon/core.cljs
@@ -349,3 +349,14 @@
    (.bufferWithCount ob n))
   ([n skip ob]
    (.bufferWithCount ob n skip)))
+
+(defn pipe-to-atom
+  ([ob]
+   (let [a (atom nil)]
+     (pipe-to-atom a ob)))
+  ([a ob]
+   (on-value ob #(reset! a %))
+   a)
+  ([a ob f]
+   (on-value ob #(swap! a f %))
+   a))


CMR-4495 - Changed behaviour of variable cascade delete to match service.

--- metadata-db-app/src/cmr/metadata_db/services/concept_service.clj
+++ metadata-db-app/src/cmr/metadata_db/services/concept_service.clj
@@ -654,9 +654,10 @@

 (defmethod force-delete-cascading-events :variable
   [context concept-type concept-id revision-id]
-  ;; delete the related variable associations
-  (delete-associations context concept-type concept-id revision-id :variable-association)
-  (ingest-events/publish-concept-revision-delete-msg context concept-id revision-id))
+  (when (latest-revision? context concept-id revision-id)
+    ;; delete the related variable associations
+    (delete-associations context concept-type concept-id revision-id :variable-association)
+    (ingest-events/publish-concept-revision-delete-msg context concept-id revision-id)))

 (defmethod force-delete-cascading-events :service
   [context concept-type concept-id revision-id]


CMR-4169: Require the services namespace to ensure services multi-methods are loaded

--- metadata-db-app/src/cmr/metadata_db/services/concept_service.clj
+++ metadata-db-app/src/cmr/metadata_db/services/concept_service.clj
@@ -28,6 +28,7 @@
    [cmr.metadata-db.data.oracle.concepts.granule]
    [cmr.metadata-db.data.oracle.concepts.group]
    [cmr.metadata-db.data.oracle.concepts.humanizer]
+   [cmr.metadata-db.data.oracle.concepts.service]
    [cmr.metadata-db.data.oracle.concepts.tag-association]
    [cmr.metadata-db.data.oracle.concepts.tag]
    [cmr.metadata-db.data.oracle.concepts.variable-association]


CMR-5039 Adds default expression to parse-collection-access-value

--- umm-spec-lib/src/cmr/umm_spec/umm_spec_core.clj
+++ umm-spec-lib/src/cmr/umm_spec/umm_spec_core.clj
@@ -152,4 +152,4 @@
      mt/dif (dif-util/parse-access-constraints metadata true)
      mt/dif10 (dif-util/parse-access-constraints metadata true)
      mt/iso19115 (iso19115-2-to-umm/parse-access-constraints metadata true)
-     mt/iso-smap nil)))
+     nil)))


Update docs from https://github.com/quil/quil/pull/298

--- api-3.0.0.clj
+++ api-3.0.0.clj
@@ -67,7 +67,7 @@
   :processing-name "key",
   :processing-link "https://processing.org/reference/key.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/key",
   :docstring
   "
Contains the value of the most recent key on the keyboard that was\nused (either pressed or released).
\n
For non-ASCII keys, use the keyCode variable. The keys included in\nthe ASCII specification (BACKSPACE, TAB, ENTER, RETURN, ESC, and\nDELETE) do not require checking to see if they key is coded, and you\nshould simply use the key variable instead of keyCode If you're\nmaking cross-platform projects, note that the ENTER key is commonly\nused on PCs and Unix and the RETURN key is used instead on\nMacintosh. Check for both ENTER and RETURN to make sure your program\nwill work for all platforms.
\n",
   :what :fn},
@@ -153,7 +153,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/blend",
   :docstring
-  "
Blends a region of pixels from one image into another with full alpha\nchannel support. If src is not specified it defaults to current-graphics.\nIf dest is not specified it defaults to current-graphics.
\n
Note: it is recommended to use the blend-mode function instead of this one.
\n
Available blend modes are:
\n
\n
:blend      - linear interpolation of colours: C = A*factor + B
\n
:add        - additive blending with white clip:\nC = min(A*factor + B, 255)
\n
:darkest    - only the darkest colour succeeds:\nC = min(A*factor, B)
\n
:lightest   - only the lightest colour succeeds:\nC = max(A*factor, B)
\n
:difference - subtract colors from underlying image.
\n
:exclusion  - similar to :difference, but less extreme.
\n
:multiply   - Multiply the colors, result will always be darker.
\n
:screen     - Opposite multiply, uses inverse values of the colors.
\n
:overlay    - A mix of :multiply and :screen. Multiplies dark values\nand screens light values.
\n
:hard-light - :screen when greater than 50% gray, :multiply when\nlower.
\n
:soft-light - Mix of :darkest and :lightest. Works like :overlay,\nbut not as harsh.
\n
:dodge      - Lightens light tones and increases contrast, ignores\ndarks.\nCalled "Color Dodge" in Illustrator and Photoshop.
\n
:burn       - Darker areas are applied, increasing contrast, ignores\nlights. Called "Color Burn" in Illustrator and\nPhotoshop.
\n
\n
In clj the following blend modes are also supported:\n:subtract   - subtractive blending with black clip:\nC = max(B - A*factor, 0)
\n
In cljs the following blend modes are also supported:\n:replace    - the pixels entirely replace the others and don't utilize\nalpha (transparency) values.
\n",
+  "
Blends a region of pixels from one image into another with full alpha\nchannel support. If src is not specified it defaults to\ncurrent-graphics. If dest-img is not specified it defaults to\ncurrent-graphics.
\n
Note: it is recommended to use blend-mode instead of blend.
\n
Available blend modes are:
\n
\n
:blend      - linear interpolation of colours: C = A*factor + B
\n
:add        - additive blending with white clip:\nC = min(A*factor + B, 255)
\n
:darkest    - only the darkest colour succeeds:\nC = min(A*factor, B)
\n
:lightest   - only the lightest colour succeeds:\nC = max(A*factor, B)
\n
:difference - subtract colors from underlying image.
\n
:exclusion  - similar to :difference, but less extreme.
\n
:multiply   - Multiply the colors, result will always be darker.
\n
:screen     - Opposite multiply, uses inverse values of the colors.
\n
:overlay    - A mix of :multiply and :screen. Multiplies dark values\nand screens light values.
\n
:hard-light - :screen when greater than 50% gray, :multiply when\nlower.
\n
:soft-light - Mix of :darkest and :lightest. Works like :overlay,\nbut not as harsh.
\n
:dodge      - Lightens light tones and increases contrast, ignores\ndarks.\nCalled "Color Dodge" in Illustrator and Photoshop.
\n
:burn       - Darker areas are applied, increasing contrast, ignores\nlights. Called "Color Burn" in Illustrator and\nPhotoshop.
\n
\n
In clj the following blend modes are also supported:\n:subtract   - subtractive blending with black clip:\nC = max(B - A*factor, 0)
\n
In cljs the following blend modes are also supported:\n:replace    - the pixels entirely replace the others and don't utilize\nalpha (transparency) values.
\n",
   :what :fn},
  frame-count
  {:args ({:value [], :type :both}),
@@ -166,7 +166,7 @@
   :processing-name "frameCount",
   :processing-link "https://processing.org/reference/frameCount.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/frameCount",
   :docstring
   "
The system variable frameCount contains the number of frames\ndisplayed since the program started. Inside setup() the value is 0\nand after the first iteration of draw it is 1, etc.
\n",
   :what :fn},
@@ -256,7 +256,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/createGraphics",
   :docstring
-  "
Creates and returns a new PGraphics object of the types :p2d, :p3d,\n:java2d, :pdf. By default :java2d is used. Use this class if you\nneed to draw into an off-screen graphics buffer. It's not possible\nto use create-graphics with the :opengl renderer, because it doesn't\nallow offscreen use. The :pdf renderer requires the filename parameter.
\n
Note: don't use create-graphics in draw in clojurescript, it leaks memory.\nYou should create graphic in setup and reuse it in draw instead of creating\na new one.
\n
It's important to call any drawing commands between (.beginDraw graphics) and\n(.endDraw graphics) statements or use with-graphics macro. This is also true\nfor any commands that affect drawing, such as smooth or color-mode.
\n
If you're using :pdf renderer - don't forget to call (.dispose graphics)\nas last command inside with-graphics macro, otherwise graphics won't be\nsaved.
\n
Unlike the main drawing surface which is completely opaque, surfaces\ncreated with create-graphics can have transparency. This makes it\npossible to draw into a graphics and maintain the alpha channel. By\nusing save to write a PNG or TGA file, the transparency of the\ngraphics object will be honored.
\n",
+  "
Creates and returns a new PGraphics object of the types :p2d, :p3d,\n:java2d, :pdf. By default :java2d is used. Use this class if you\nneed to draw into an off-screen graphics buffer. It's not possible\nto use create-graphics with the :opengl renderer, because it doesn't\nallow offscreen use. The :pdf renderer requires the filename parameter.
\n
Note: don't use create-graphics in draw in Clojurescript, it leaks memory.\nYou should create graphic in setup and reuse it in draw instead of creating\na new one.
\n
It's important to call any drawing commands between (.beginDraw graphics)\nand (.endDraw graphics) statements or use with-graphics macro. This is\nalso true for any commands that affect drawing, such as smooth or\ncolor-mode.
\n
If you're using :pdf renderer - don't forget to call (.dispose graphics)\nas last command inside with-graphics macro, otherwise graphics won't be\nsaved.
\n
Unlike the main drawing surface which is completely opaque, surfaces\ncreated with create-graphics can have transparency. This makes it\npossible to draw into a graphics and maintain the alpha channel. By\nusing save to write a PNG or TGA file, the transparency of the\ngraphics object will be honored.
\n",
   :what :fn},
  update-pixels
  {:args ({:value [img], :type :both} {:value [], :type :both}),
@@ -300,7 +300,7 @@
   :processing-name "pixels[]",
   :processing-link "https://processing.org/reference/pixels.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/pixels",
   :docstring
   "
Array containing the values for all the pixels in the display\nwindow or image. This array is therefore the size of the display window. If\nthis array is modified, the update-pixels function must be called to\nupdate the changes. Calls .loadPixels before obtaining the pixel array.
\n",
   :what :fn},
@@ -643,7 +643,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/colorMode",
   :docstring
-  "
Changes the way Processing interprets color data. Available modes\nare :rgb and :hsb (and :hsl in clojurescript).\nBy default, the parameters for fill, stroke,\nbackground, and color are defined by values between 0 and 255 using\nthe :rgb color model. The color-mode function is used to change the\nnumerical range used for specifying colors and to switch color\nsystems. For example, calling\n(color-mode :rgb 1.0) will specify that values are specified between\n0 and 1. The limits for defining colors are altered by setting the\nparameters range1, range2, range3, and range 4.
\n",
+  "
Changes the way Processing interprets color data. Available modes\nare :rgb and :hsb (and :hsl in Clojurescript).\nBy default, the parameters for fill, stroke,\nbackground, and color are defined by values between 0 and 255 using\nthe :rgb color model. The color-mode function is used to change the\nnumerical range used for specifying colors and to switch color\nsystems. For example, calling\n(color-mode :rgb 1.0) will specify that values are specified between\n0 and 1. The limits for defining colors are altered by setting the\nparameters range1, range2, range3, and range 4.
\n",
   :what :fn},
  create-image
  {:args
@@ -688,7 +688,7 @@
   :processing-name "height",
   :processing-link nil,
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/height",
   :docstring
   "
Height of the display window. The value of height is zero until\nsize is called.
\n",
   :what :fn},
@@ -752,7 +752,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/text",
   :docstring
-  "
Draws text to the screen in the position specified by the x and y\nparameters (and the optional z parameter in clj). A default font will be used\nunless a font is set with the text-font function. Change the color of the\ntext with the fill function. The text displays in relation to the\ntext-align function, which gives the option to draw to the left, right, and\ncenter of the coordinates.
\n
The x1, y1, x2 and y2 parameters define a\nrectangular area to display within and may only be used with string\ndata. For text drawn inside a rectangle, the coordinates are\ninterpreted based on the current rect-mode setting.
\n",
+  "
Draws text to the screen in the position specified by the x and y\nparameters (and the optional z parameter in clj). A default font\nwill be used unless a font is set with the text-font\nfunction. Change the color of the text with the fill\nfunction. The text displays in relation to the\ntext-align function, which gives the option to draw to the left,\nright, and center of the coordinates.
\n
The x1, y1, x2 and y2 parameters define a rectangular area\nto display within and may only be used with string data. For text\ndrawn inside a rectangle, the coordinates are interpreted based on\nthe current rect-mode setting.
\n",
   :what :fn},
  available-fonts
  {:args #{[]},
@@ -853,7 +853,7 @@
   :processing-name "keyCode",
   :processing-link "https://processing.org/reference/keyCode.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/keyCode",
   :docstring
   "
The variable keyCode is used to detect special keys such as the UP,\nDOWN, LEFT, RIGHT arrow keys and ALT, CONTROL, SHIFT. When checking\nfor these keys, it's first necessary to check and see if the key is\ncoded. This is done with the conditional (= (key) CODED).
\n
The keys included in the ASCII specification (BACKSPACE, TAB, ENTER,\nRETURN, ESC, and DELETE) do not require checking to see if they key\nis coded, and you should simply use the key variable instead of\nkey-code. If you're making cross-platform projects, note that the\nENTER key is commonly used on PCs and Unix and the RETURN key is\nused instead on Macintosh. Check for both ENTER and RETURN to make\nsure your program will work for all platforms.
\n
For users familiar with Java, the values for UP and DOWN are simply\nshorter versions of Java's KeyEvent.VK_UP and\nKeyEvent.VK_DOWN. Other keyCode values can be found in the Java\nKeyEvent reference.
\n",
   :what :fn},
@@ -1153,7 +1153,7 @@
   :processing-name "pmouseX",
   :processing-link "https://processing.org/reference/pmouseX.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/pmouseX",
   :docstring
   "
Horizontal coordinate of the mouse in the previous frame
\n",
   :what :fn},
@@ -1201,7 +1201,7 @@
   :processing-link
   "https://processing.org/reference/mousePressed.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/mouseIsPressed",
   :docstring
   "
true if a mouse button is pressed, false otherwise.
\n",
   :what :fn},
@@ -1216,7 +1216,7 @@
   :processing-name "keyPressed",
   :processing-link "https://processing.org/reference/keyPressed.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/keyIsPressed",
   :docstring
   "
true if any key is currently pressed, false otherwise.
\n",
   :what :fn},
@@ -1535,7 +1535,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/arc",
   :docstring
-  "
Draws an arc in the display window. Arcs are drawn along the outer\nedge of an ellipse defined by the x, y, width and height\nparameters. The origin or the arc's ellipse may be changed with the\nellipse-mode function. The start and stop parameters specify the\nangles at which to draw the arc. The mode is either :open, :chord or :pie.
\n",
+  "
Draws an arc in the display window. Arcs are drawn along the outer\nedge of an ellipse defined by the x, y, width and height\nparameters. The origin or the arc's ellipse may be changed with the\nellipse-mode function. The start and stop parameters specify\nthe angles at which to draw the arc. The mode is either :open,\n:chord or :pie.
\n",
   :what :fn},
  text-align
  {:args
@@ -1580,7 +1580,7 @@
   :processing-name "mouseX",
   :processing-link "https://processing.org/reference/mouseX.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/mouseX",
   :docstring "
Current horizontal coordinate of the mouse.
\n",
   :what :fn},
  mag
@@ -1702,7 +1702,7 @@
   :requires-bindings false,
   :p5js-link nil,
   :docstring
-  "
Define and start a sketch and bind it to a var with the symbol\napp-name. If any of the options to the various callbacks are\nsymbols, it wraps them in a call to var to ensure they aren't\ninlined and that redefinitions to the original functions are reflected in\nthe visualisation.
\n
\n
:size           - A vector of width and height for the sketch or :fullscreen.\nDefaults to [500 300]. If you're using :fullscreen you may\nwant to enable present mode - :features [:present].\n:fullscreen size works only in Clojure. In ClojureScript\nall sketches are support fullscreen when you press F11.
\n
:renderer       - Specifies the renderer type. One of :p2d, :p3d, :java2d,\n:opengl, :pdf, :svg). Defaults to :java2d. :dxf renderer\ncan't be used as sketch renderer. Use begin-raw method\ninstead. In clojurescript only :p2d and :p3d renderers\nare supported.
\n
:output-file    - Specifies an output file path. Only used in :pdf and :svg\nmodes. Not supported in clojurescript. When writing to a\nfile, call exit at the end of the draw call to end\nthe sketch and not write repeatedly to the file.
\n
:title          - A string which will be displayed at the top of\nthe sketch window. Not supported in clojurescript.
\n
:features       - A vector of keywords customizing sketch behaviour.\nSupported features:\n
\n
:keep-on-top   - Sketch window will always be above other windows.\nNote: some platforms might not support always-on-top windows.\nNot supported in clojurescript.
\n
:exit-on-close - Shutdown JVM  when sketch is closed.\nNot supported in clojurescript.
\n
:resizable     - Makes sketch resizable. Not supported in clojurescript.
\n
:no-safe-fns   - Do not catch and print exceptions thrown inside functions\nprovided to sketch (like draw, mouse-clicked?,\nkey-pressed? and others). By default all exceptions\nthrown inside these functions are caught. This prevents\nsketch from breaking when bad function was provided and\nallows you to fix it and reload it on fly. You can\ndisable this behaviour by enabling :no-safe-fns\nfeature. Not supported in clojurescript.
\n
:present       - Switch to present mode (fullscreen without borders, OS\npanels). You may want to use this feature together with\n:size :fullscreen. Not supported in ClojureScript. In\nClojureScript fullscreen is enabled by pressing F11 and\nit's enabled on all sketches automatically.
\n
:no-start      - Disables autostart if sketch was created using defsketch\nmacro. To start sketch you have to call function created\ndefsketch. Supported only in ClojureScript.\nUsage example: :features [:keep-on-top :present]
\n
\n
\n
:bgcolor        - Sets background color for unused space in present mode.\nColor is specified in hex format for example\n:bgcolor "#00FFFF" (cyan background)\nNot supported in ClojureScript.
\n
:display        - Sets what display should be used by this sketch.\nDisplays are numbered starting from 0. Example: :display 1.\nNot supported in ClojureScript.
\n
:setup          - A function to be called once when setting the sketch up.
\n
:draw           - A function to be repeatedly called at most n times per\nsecond where n is the target frame-rate set for\nthe visualisation.
\n
:host           - String id of canvas element or DOM element itself.\nSpecifies host for the sketch. Must be specified in sketch,\nmay be omitted in defsketch. If omitted in defsketch,\n:host is set to the name of the sketch. If element with\nspecified id is not found on the page and page is empty -\nnew canvas element will be created. Used in ClojureScript.
\n
:focus-gained   - Called when the sketch gains focus.\nNot supported in ClojureScript.
\n
:focus-lost     - Called when the sketch loses focus.\nNot supported in ClojureScript.
\n
:mouse-entered  - Called when the mouse enters the sketch window.
\n
:mouse-exited   - Called when the mouse leaves the sketch window
\n
:mouse-pressed  - Called every time a mouse button is pressed.
\n
:mouse-released - Called every time a mouse button is released.
\n
:mouse-clicked  - Called once after a mouse button has been pressed\nand then released.
\n
:mouse-moved    - Called every time the mouse moves and a button is\nnot pressed.
\n
:mouse-dragged  - Called every time the mouse moves and a button is\npressed.
\n
:mouse-wheel    - Called every time mouse wheel is rotated.\nTakes 1 argument - wheel rotation, an int.\nNegative values if the mouse wheel was rotated\nup/away from the user, and positive values\nif the mouse wheel was rotated down/ towards the user
\n
:key-pressed    - Called every time any key is pressed.
\n
:key-released   - Called every time any key is released.
\n
:key-typed      - Called once every time non-modifier keys are\npressed.
\n
:on-close       - Called once, when sketch is closed.\nNot supported in ClojureScript.
\n
:middleware     - Vector of middleware to be applied to the sketch.\nMiddleware will be applied in the same order as in comp\nfunction: [f g] will be applied as (f (g options)).
\n
:settings       - Cousin of :setup. A function to be called once when\nsetting sketch up. Should be used only for smooth and\nno-smooth. Due to Processing limitations these functions\ncannot be used neither in :setup nor in :draw.
\n
\n",
+  "
Define and start a sketch and bind it to a var with the symbol\napp-name. If any of the options to the various callbacks are\nsymbols, it wraps them in a call to var to ensure they aren't\ninlined and that redefinitions to the original functions are reflected in\nthe visualisation.
\n
\n
:size           - A vector of width and height for the sketch or\n:fullscreen. Defaults to [500 300]. If you're using\n:fullscreen you may  want to enable present mode using\n:features [:present]. :fullscreen size works only in\nClojure. In ClojureScript all sketches support\nfullscreen when you press F11.
\n
:renderer       - Specifies the renderer type. One of :p2d, :p3d,\n:java2d, :opengl, :pdf, :svg, :fx2d). Defaults\nto :java2d in Clojure and :p2d in ClojureScript.\n:dxf renderer can't be used as sketch renderer.\nUse begin-raw method instead. In Clojurescript only\n:p2d and :p3d renderers are supported.\nMore info on Clojure renderers:\nhttps://processing.org/reference/environment/#Renderers
\n
:output-file    - Specifies an output file path. Only used in :pdf and\n:svg modes. Not supported in Clojurescript. When\nwriting to a file, call exit at the end of the\ndraw call to end the sketch and not write repeatedly\nto the file.
\n
:title          - A string which will be displayed at the top of\nthe sketch window. Not supported in Clojurescript.
\n
:features       - A vector of keywords customizing sketch behaviour.\nSupported features:\n
\n
:keep-on-top   - Sketch window will always be above other windows.\nNote: some platforms might not support always-on-top\nwindows. Not supported in clojurescript.
\n
:exit-on-close - Shutdown JVM  when sketch is closed.\nNot supported in Clojurescript.
\n
:resizable     - Makes sketch resizable. Not supported in Clojurescript.
\n
:no-safe-fns   - Do not catch and print exceptions thrown inside\nfunctions provided to sketch (like draw,\nmouse-pressed?, key-pressed? and others). By\ndefault all exceptions thrown inside these functions\nare caught. This prevents the sketch from breaking when\na bad function is provided and allows you to fix it and\nreload it on the fly. You can disable this behaviour by\nenabling the :no-safe-fns feature. Not supported in\nClojurescript.
\n
:present       - Switch to present mode (fullscreen without borders, OS\npanels). You may want to use this feature together with\n:size :fullscreen. Not supported in ClojureScript. In\nClojureScript fullscreen is enabled by pressing F11 and\nit's enabled on all sketches automatically.
\n
:no-start      - Disables autostart if sketch was created using the\ndefsketch macro. To start sketch you have to call\nfunction created defsketch. Supported only in\nClojureScript.\nUsage example: :features [:keep-on-top :present]
\n
\n
\n
:bgcolor        - Sets background color for unused space in present mode.\nColor is specified in hex format for example\n:bgcolor "#00FFFF" (cyan background)\nNot supported in ClojureScript.
\n
:display        - Sets what display should be used by this sketch.\nDisplays are numbered starting from 0.\nExample: :display 1.\nNot supported in ClojureScript.
\n
:setup          - A function to be called once when setting the sketch up.
\n
:draw           - A function to be repeatedly called at most n times per\nsecond where n is the target frame-rate set for\nthe visualisation.
\n
:host           - String id of canvas element or DOM element itself.\nSpecifies host for the sketch. Must be specified in\nsketch, may be omitted in defsketch. If omitted in\ndefsketch, :host is set to the name of the sketch.\nIf element with specified id is not found on the page\nand page is empty, a new canvas element will be created.\nUsed in ClojureScript.
\n
:focus-gained   - Called when the sketch gains focus.\nNot supported in ClojureScript.
\n
:focus-lost     - Called when the sketch loses focus. Not supported in\nClojureScript.
\n
:mouse-entered  - Called when the mouse enters the sketch window.
\n
:mouse-exited   - Called when the mouse leaves the sketch window
\n
:mouse-pressed  - Called every time a mouse button is pressed.
\n
:mouse-released - Called every time a mouse button is released.
\n
:mouse-clicked  - Called once after a mouse button has been pressed\nand then released.
\n
:mouse-moved    - Called every time the mouse moves and a button is\nnot pressed.
\n
:mouse-dragged  - Called every time the mouse moves and a button is\npressed.
\n
:mouse-wheel    - Called every time mouse wheel is rotated.\nTakes 1 argument - wheel rotation, an int.\nNegative values if the mouse wheel was rotated\nup/away from the user, and positive values\nif the mouse wheel was rotated down/towards the user.
\n
:key-pressed    - Called every time any key is pressed.
\n
:key-released   - Called every time any key is released.
\n
:key-typed      - Called once every time non-modifier keys are\npressed.
\n
:on-close       - Called once, when sketch is closed.\nNot supported in ClojureScript.
\n
:middleware     - Vector of middleware to be applied to the sketch.\nMiddleware will be applied in the same order as in\ncomp function: [f g] will be applied as\n(f (g options)).
\n
:settings       - Cousin of :setup. A function to be called once when\nsetting sketch up. Should be used only for smooth\nand no-smooth. Due to Processing limitations these\nfunctions cannot be used neither in :setup nor in\n:draw.
\n
\n",
   :what :macro},
  no-stroke
  {:args ({:value [], :type :both}),
@@ -1775,7 +1775,7 @@
   :requires-bindings true,
   :p5js-link nil,
   :docstring
-  "
Returns a keyword representing the currently pressed key. Modifier\nkeys are represented as: :up, :down, :left, :right, :alt, :control,\n:shift, :command, :f1-24
\n",
+  "
Returns a keyword representing the currently pressed key. Modifier\nkeys are represented as: :up, :down, :left, :right, :alt,\n:control, :shift, :command, :f1-24
\n",
   :what :fn},
  blend-mode
  {:args ({:value [mode], :type :both}),
@@ -1933,7 +1933,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/beginContour",
   :docstring
-  "
Use the begin-contour and end-contour function to create negative\nshapes within shapes. These functions can only be used within a\nbegin-shape/end-shape pair and they only work with the :p2d and :p3d\nrenderers.
\n",
+  "
Use the begin-contour and end-contour function to create\nnegative shapes within shapes. These functions can only be used\nwithin a begin-shape/end-shape pair and they only work with\nthe :p2d and :p3d renderers.
\n",
   :what :fn},
  pow
  {:args ({:value [num exponent], :type :both}),
@@ -2067,7 +2067,7 @@
   :processing-name "width",
   :processing-link nil,
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/width",
   :docstring
   "
Width of the display window. The value of width is zero until size is\ncalled.
\n",
   :what :fn},
@@ -2143,7 +2143,6 @@
   :added "1.6",
   :name debug,
   :type :clj,
-  :processing-name nil,
   :processing-link nil,
   :requires-bindings false,
   :p5js-link nil,
@@ -2225,7 +2224,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/push",
   :docstring
-  "
Saves the current style settings onto a 'style stack'. Use with\npop-style which restores the prior settings. Note that these\nfunctions are always used together. They allow you to change the\nstyle settings and later return to what you had. When a new style is\nstarted with push-style, it builds on the current style\ninformation. The push-style and pop-style functions can be\nembedded to provide more control.
\n
The style information controlled by the following functions are\nincluded in the style: fill, stroke, tint, stroke-weight,\nstroke-cap, stroke-join, image-mode, rect-mode, ellipse-mode,\nshape-mode, color-mode, text-align, text-font, text-mode, text-size,\ntext-leading, emissive, specular, shininess, and ambient.
\n",
+  "
Saves the current style settings onto a 'style stack'. Use with\npop-style which restores the prior settings. Note that these\nfunctions are always used together. They allow you to change the\nstyle settings and later return to what you had. When a new style is\nstarted with push-style, it builds on the current style\ninformation. The push-style and pop-style functions can be\nembedded to provide more control.
\n
The style information controlled by the following functions are\nincluded in the\nstyle: fill, stroke, tint, stroke-weight,\nstroke-cap, stroke-join, image-mode, rect-mode,\nellipse-mode, shape-mode, color-mode, text-align,\ntext-font, text-mode, text-size, text-leading,\nemissive, specular, shininess, and ambient.
\n",
   :what :fn},
  bezier-vertex
  {:args
@@ -2306,7 +2305,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/curvePoint",
   :docstring
-  "
Evaluates the curve at point t for points a, b, c, d. The parameter\nt varies between 0 and 1, a and d are points on the curve, and b and c\nare the control points. This can be done once with the x\ncoordinates and a second time with the y coordinates to get the\nlocation of a curve at t.
\n",
+  "
Evaluates the curve at point t for points a, b, c, d. The\nparameter t varies between 0 and 1, a and d are points on the\ncurve, and b and c are the control points. This can be done once\nwith the x coordinates and a second time with the y coordinates to\nget the location of a curve at t.
\n",
   :what :fn},
  state
  {:args ({:value [], :type :both} {:value [key], :type :both}),
@@ -2341,7 +2340,7 @@
  resize
  {:args ({:value [img w h], :type :both}),
   :category "Image",
-  :p5js-name "resize()",
+  :p5js-name "Image.resize()",
   :added "2.1.0",
   :name resize,
   :type :both,
@@ -2349,7 +2348,7 @@
   :processing-link
   "https://processing.org/reference/PImage_resize_.html",
   :requires-bindings true,
-  :p5js-link "https://p5js.org/reference/#/p5/resize",
+  :p5js-link "https://p5js.org/reference/#/p5.Image/resize",
   :docstring
   "
Resize the image to a new width and height.\nTo make the image scale proportionally, use 0 as the value for the wide or\nhigh parameter. For instance, to make the width of an image 150 pixels,\nand change the height using the same proportion, use (resize 150 0).
\n
Even though a PGraphics is technically a PImage, it is not possible\nto rescale the image data found in a PGraphics.\n(It's simply not possible to do this consistently across renderers:\ntechnically infeasible with P3D, or what would it even do with PDF?)\nIf you want to resize PGraphics content, first get a copy of its image data\nusing the get() method, and call resize() on the PImage that is returned.
\n",
   :what :fn},
@@ -2758,7 +2757,7 @@
   :processing-name "pmouseY",
   :processing-link "https://processing.org/reference/pmouseY.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/pmouseY",
   :docstring
   "
Vertical coordinate of the mouse in the previous frame
\n",
   :what :fn},
@@ -2891,7 +2890,7 @@
   :processing-name "focused",
   :processing-link "https://processing.org/reference/focused.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/focused",
   :docstring
   "
Returns true if the applet has focus, false otherwise.
\n",
   :what :fn},
@@ -2970,7 +2969,7 @@
   :requires-bindings true,
   :p5js-link nil,
   :docstring
-  "
Macro for drawing on graphics which saves result in the file at the end.\nSimilar to with-graphics macro. do-record assumed to be used with :pdf\ngraphics.
\n
Example:
\n
(q/do-record (q/create-graphics 200 200 :pdf "output.pdf")\n  (q/fill 250 0 0)\n  (q/ellipse 100 100 150 150))\n
\n",
+  "
Macro for drawing on graphics which saves result in the file at the end.\nSimilar to with-graphics macro. do-record assumed to be used\nwith :pdf graphics.
\n
Example:
\n
(q/do-record (q/create-graphics 200 200 :pdf "output.pdf")\n  (q/fill 250 0 0)\n  (q/ellipse 100 100 150 150))\n
\n",
   :what :macro},
  red
  {:args ({:value [c], :type :both}),
@@ -3190,7 +3189,7 @@
   :requires-bindings true,
   :p5js-link nil,
   :docstring
-  "
Originally named filter in Processing Language.\nFilters the display window with given shader (only in :p2d and :p3d modes).
\n",
+  "
Originally named filter in Processing Language. Filters the display\nwindow with given shader (only in :p2d and :p3d modes).
\n",
   :what :fn},
  curve-detail
  {:args ({:value [detail], :type :both}),
@@ -3235,7 +3234,7 @@
   :requires-bindings true,
   :p5js-link "https://p5js.org/reference/#/p5/endContour",
   :docstring
-  "
Use the begin-contour and end-contour function to create negative\nshapes within shapes. These functions can only be within a\nbegin-shape/end-shape pair and they only work with the :p2d and :p3d\nrenderers.
\n",
+  "
Use the begin-contour and end-contour function to create\nnegative shapes within shapes. These functions can only be within a\nbegin-shape/end-shape pair and they only work with the\n:p2d and :p3d renderers.
\n",
   :what :fn},
  sin
  {:args ({:value [angle], :type :both}),
@@ -3629,7 +3628,7 @@
   :processing-name "mouseY",
   :processing-link "https://processing.org/reference/mouseY.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/mouseY",
   :docstring "
Current vertical coordinate of the mouse.
\n",
   :what :fn},
  mouse-button
@@ -3643,7 +3642,7 @@
   :processing-name "mouseButton",
   :processing-link "https://processing.org/reference/mouseButton.html",
   :requires-bindings true,
-  :p5js-link nil,
+  :p5js-link "https://p5js.org/reference/#/p5/mouseButton",
   :docstring
   "
The value of the system variable mouseButton is either :left, :right,\nor :center depending on which button is pressed. nil if no button pressed
\n",
   :what :fn},


[Add] condition each functions

[Add] condition each functions

--- src/clj_elm/core.clj
+++ src/clj_elm/core.clj
@@ -57,7 +57,8 @@
   "Return output of hidden-layer_i with xs. As_i is d-dimension. B_i is number.
    Xs is d-dimension."
   ([as_i b_i xs]
-   {:pre [(coll? as_i) (number? b_i) (coll? xs)]}
+   {:pre [(coll? as_i) (number? b_i) (coll? xs)]
+    :post [(float? %)]}
    (g (+ (c/inner-product as_i xs)
          b_i))))

@@ -72,7 +73,8 @@

 (defn pseudo-inverse-matrix
   ([mat]
-   {:pre [(coll? mat) (coll? (first mat))]}
+   {:pre [(coll? mat) (coll? (first mat))]
+    :post [(c/matrix? %)]}
    (let [matrix (c/matrix mat)
          transmat (c/trans matrix)
          n (c/nrow matrix)
@@ -92,7 +94,8 @@

 (defn train-model
   ([dataset L & {:keys [norm] :or {norm false}}]
-   {:pre [(instance? DataSet dataset) (integer? L)]}
+   {:pre [(instance? DataSet dataset) (integer? L)]
+    :post [(instance? Model %)]}
    (let [normf (if norm data/normalize identity)
          d (data/num-of-feature dataset)
          ass (make-ass d L)
@@ -105,7 +108,8 @@

 (defn predict
   ([model xs]
-   {:pre [(instance? Model model) (coll? xs)]}
+   {:pre [(instance? Model model) (coll? xs)]
+    :post [(integer? %)]}
    (predict (:ass model) (:bs model) (:betas model) xs))
   ([ass bs betas xs]
    {:pre [(coll? ass) (coll? (first ass)) (coll? bs) (coll? betas) (coll? xs)]}
@@ -114,11 +118,13 @@
        (sign))))

 (defn update-exp [fn key exp]
-  {:pre [(fn? fn) (keyword? key) (map? exp)]}
+  {:pre [(fn? fn) (keyword? key) (map? exp)]
+   :post [(map? %)]}
   (assoc exp key (fn (key exp))))

 (defn count-rate [pred fact exp]
-  {:pre [(= (Math/abs pred) (Math/abs fact) 1) (map? exp)]}
+  {:pre [(= (Math/abs pred) (Math/abs fact) 1) (map? exp)]
+   :post [(map? %)]}
   (match [pred fact]
     [ 1  1] (update-exp inc :TP exp)
     [ 1 -1] (update-exp inc :FP exp)
@@ -126,7 +132,8 @@
     [-1  1] (update-exp inc :FN exp)))

 (defn exp-result [exp]
-  {:pre [(map? exp)]}
+  {:pre [(map? exp)]
+   :post [(map? %)]}
   (let [TP (:TP exp) FP (:FP exp)
         TN (:TN exp) FN (:FN exp)]
     (-> exp
@@ -135,7 +142,9 @@
         (assoc :Precision (/ TP (+ TP FP))))))

 (defn confusion-matrix [preds facts exp]
-  {:pre [(coll? preds) (coll? facts) (map? exp)]}
+  {:pre [(coll? preds) (coll? facts) (map? exp)]
+   ;; :post [(map? %)]
+   }
   (if (or (empty? preds) (empty? facts))
     (exp-result exp)
     (let [pred (first preds)
@@ -144,13 +153,15 @@

 (defn evaluation
   ([results facts exp]
-   {:pre [(coll? results) (coll? facts) (map? exp)]}
+   {:pre [(coll? results) (coll? facts) (map? exp)]
+    :post [(map? %)]}
    (let [numd (count results)]
      (confusion-matrix results facts exp))))

 (defn select-count
   ([cond coll]
-   {:pre [(fn? cond) (coll? coll)]}
+   {:pre [(fn? cond) (coll? coll)]
+    :post [(integer? %)]}
    (count (filter cond coll))))

 (defn _cross-validate
@@ -194,7 +205,8 @@

 (defn cross-validate
   ([dataset L k]
-   {:pre [(instance? DataSet dataset) (integer? k) (integer? L)]}
+   {:pre [(instance? DataSet dataset) (integer? k) (integer? L)]
+    :post [(map? %)]}
    (let [norm-dataset (DataSet. (:classes dataset) (data/normalize (:features dataset)))
          numd (count (:classes norm-dataset)) ; number of data
          groupn (quot numd k)]                ; number of one group's element
@@ -206,6 +218,7 @@
           (exp-result)))))

 (defn -main [& args]
+  {:pre [(string? (first args))]}
   (if (= (count args) 8)
     (let [[datap1 classidx1 header1 datap2 classidx2 header2 L n-of-cv] args]
       (printfl "Start exp\n")


Committed the code to create commits, using the clj-git code to create commits.. :)

--- src/clj_git/core.clj
+++ src/clj_git/core.clj
@@ -15,6 +15,9 @@

 (defn to-str [x] (apply str (map char x)))

+(defn current-unix-time []
+  (quot (System/currentTimeMillis) 1000))
+
 (defn ok-sh [command & args]
   (let [res (apply sh (cons command args))]
     (assert (= 0 (:exit res)))
@@ -37,6 +40,9 @@
     (sha-1-hex full-text)))

 (defn git-root [] "./.git/")
+
+(defn get-author [] "j <jamie.williams89@gmail.com>")
+(def  get-committer get-author)

 (defn read-file [path]
   (with-open [out (java.io.ByteArrayOutputStream.)]
@@ -67,11 +73,11 @@
     (.close out)
     (.toByteArray out)))

-(defn write-object [full-text]
-  (let [hash-text (sha-1-hex full-text)
+(defn write-object [bs]
+  (let [hash-text (sha-1-hex bs)
         [d-name f-name] (map #(apply str %) (split-at 2 hash-text))
         filepath (str (git-root) "objects/" d-name "/" f-name)
-        data (byte-array (map byte full-text))
+        data (byte-array (map byte bs))
         bdata (compress-zlib data)]
     (make-parents filepath)
     (if (not (.exists (clojure.java.io/as-file filepath)))
@@ -79,10 +85,19 @@
         (with-open [wrtr (output-stream filepath)]
           (.write wrtr bdata))
         (unset-writable filepath)))
-    hash-text))
+    filepath))
+
+(defn write-tree [tree-struct]
+  (-> tree-struct
+      (tree-data)
+      (byte-array)
+      (write-object)))

 (defn write-blob [text]
   (write-object (str "blob " (count text) "\0" text)))
+
+(defn write-commit [text]
+  (write-object (str "commit " (count text) "\0" text)))

 (defn hash-file [filepath]
   (hash-str (slurp filepath)))
@@ -199,6 +214,12 @@
 (defn branch [b]
   (let [filepath (str (git-root) "refs/heads/" b)]
     (clojure.string/replace (slurp filepath) #"\n" "")))
+
+(defn head []
+  (let [filepath (str (git-root) "HEAD")
+        full-branch (clojure.string/replace (slurp filepath) #"\n" "")
+        branch-name (-> full-branch (clojure.string/split #"\/") (last))]
+    (branch branch-name)))

 (defn validarte-index [] nil)

@@ -358,4 +379,16 @@
         [top-hash objs] (files-map-to-objs files-map)]
     [top-hash objs]))

-
+; Creates a new commit object (and all required tree objects)
+; from the current index
+(defn create-commit [message parent-hash]
+  (let [[tree-hash tree-structs] (index-to-tree-objects)
+        timestamp (str (current-unix-time) " +0000")
+        text (str "tree " tree-hash "\n"
+                  "parent " parent-hash "\n"
+                  "author " (get-author) " " timestamp "\n"
+                  "committer " (get-committer) " " timestamp "\n"
+                  "\n"
+                  message "\n")]
+    (doseq [e tree-structs] (write-tree (:contents e)))
+    (write-commit text)))


Fix typo: cannonicalize -> canonicalize.

--- src/cljs/c2/dom.cljs
+++ src/cljs/c2/dom.cljs
@@ -51,7 +51,7 @@

 (declare build-dom-elem)
-(declare cannonicalize)
+(declare canonicalize)

 (defn append! [container el]
@@ -114,7 +114,7 @@
   "Walks an existing dom-node and makes sure that it has the same attributes and children as the given el."
   [dom-node el & {:keys [defer-attr]
                   :or {defer-attr false}}]
-  (let [el (cannonicalize el)]
+  (let [el (canonicalize el)]
     (when (not= (.toLowerCase (.-nodeName dom-node))
                 (.toLowerCase (name (:tag el))))
       (throw "Cannot merge el into node of a different type"))
@@ -130,7 +130,7 @@
           (merge-dom! dom-child el-child :defer-attr defer-attr))
     dom-node))

-(defn cannonicalize
+(defn canonicalize
   "Parse hiccup-like vec into map of {:tag :attr :children}, or return string as itself.
    Based on Pinot's html/normalize-element."
   [x]
@@ -160,8 +160,8 @@
                                                                 [tag-attrs content])
                                      ;;Explode children seqs in place
                                      children (mapcat #(if (and (not (vector? %)) (seq? %))
-                                                         (map cannonicalize %)
-                                                         [(cannonicalize %)])
+                                                         (map canonicalize %)
+                                                         [(canonicalize %)])
                                                       raw-children)]
                                  {:nsp nsp :tag tag :attr attr :children children}))))

@@ -171,7 +171,7 @@
 (defn build-dom-elem [el]
   (match [el]
          [(s :when string?)] (gdom/createTextNode s)
-         [(v :when vector?)] (recur (cannonicalize v))
+         [(v :when vector?)] (recur (canonicalize v))
          [(m :when map?)] ;;Can't use {:keys [...]} destructuring in place of m in this clause. Why?
          (let [{:keys [nsp tag children] :as elm} m
                elem (create-elem nsp tag)]


CMR-3115 Remove debug line

CMR-3115 Remove debug line

--- umm-spec-lib/src/cmr/umm_spec/validation/collection.clj
+++ umm-spec-lib/src/cmr/umm_spec/validation/collection.clj
@@ -6,7 +6,6 @@
 (defn- range-date-time-validation
   "Defines range-date-time validation"
   [field-path value]
-  (println value)
   (let [{:keys [BeginningDateTime EndingDateTime]} value]
     (when (and BeginningDateTime EndingDateTime (t/after? BeginningDateTime EndingDateTime))
       {field-path [(format "BeginningDateTime [%s] must be no later than EndingDateTime [%s]"


make sure we're using the same opts both components

fixes #3200

--- frontend/components/builds_table.cljs
+++ frontend/components/builds_table.cljs
@@ -76,8 +76,7 @@

 (defn builds-table [builds owner {:keys [show-actions? show-branch? show-project?]
                                   :or {show-branch? true
-                                       show-project? true}
-                                  :as opts}]
+                                       show-project? true}}]
   (reify
     om/IDisplayName (display-name [_] "Builds Table")
     om/IRender
@@ -99,4 +98,7 @@
             (when show-actions?
               [:th.condense "Actions"])]]
           [:tbody
-           (map #(build-row % controls-ch opts) builds)]])))))
+           (map #(build-row % controls-ch {:show-actions? show-actions?
+                                           :show-branch? show-branch?
+                                           :show-project? show-project?})
+                builds)]])))))