Put just the comic name at top of page in reader

--- src/cljs/comic_reader/main.cljs
+++ src/cljs/comic_reader/main.cljs
@@ -109,14 +109,13 @@
                    location)
           (let [component
                 [:div
-                 [:h2 (str "Display chapter " (:chapter location)
-                           " page " (:page location)
-                           " of comic " (:comic location)
-                           " from site " site)]
+                 [:h2 (titlize (:comic location)
+                               :to-spaces #"(_|-)")]
                  [:br]]]
             (when comic-imgs
               (into component
-                    (map (partial vector img-component site location)
+                    (map (partial vector
+                                  img-component site location)
                          comic-imgs)))))))))

 (defn comic-reader []


PDOK-1599: test disabled

PDOK-1599: test disabled

--- src/test/clojure/pdok/featured/extracts_test.clj
+++ src/test/clojure/pdok/featured/extracts_test.clj
@@ -18,7 +18,7 @@
 (defn two-features [] (list (test-feature "name1" "A" "B")
                              (test-feature "name2" "C" "D")))

-(deftest test-two-rendered-features
+(def test-two-rendered-features
   (let [[error features-for-extract] (features-for-extract "test" "dummy" "gml2extract" (two-features) "src/test/resources/templates")]
     (is (= 2 )(count features-for-extract))))


Allow to configure queue setup via config file.

--- src/dsbdp/local_data_processing_pipeline.clj
+++ src/dsbdp/local_data_processing_pipeline.clj
@@ -19,7 +19,18 @@

 (def ^:dynamic *queue-size* 100000)
-(def ^:dynamic *queue-setup* "LinkedTransferQueue_tryTransfer-counted-10ms")
+(def ^:dynamic
+  *queue-setup*
+  (let [file-name "queue-setup.cfg"
+        setup (if (file-exists? file-name)
+                (do
+                  (println "Using queue-setup defined in:" file-name)
+                  (.trim ^String (slurp file-name)))
+                (do
+                  (println file-name "not found. Using default.")
+                  "LinkedTransferQueue_tryTransfer-counted-10ms"))]
+    (println "Using queue-setup:" setup)
+    setup))

 (defmacro create-queue
   []


Add GUI repl again

Add GUI repl again

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

--- src/conexp/contrib/gui/base.clj
+++ src/conexp/contrib/gui/base.clj
@@ -26,11 +26,16 @@
   "Returns main frame for conexp standard gui."
   [:default-close-operation :dispose]
   (let [tabbed-pane  (tabbed-panel)
-        content-pane (border-panel :center tabbed-pane)
         main-frame   (frame :title "conexp-clj"
-                            :on-close default-close-operation
-                            :size [1000 :by 800]
-                            :content content-pane)]
+                            :on-close default-close-operation)
+        content-pane (top-bottom-split tabbed-pane
+                                       (make-repl main-frame)
+                                       :divider-location 1.0
+                                       :resize-weight 0.9
+                                       :one-touch-expandable? true)]
+
+    ;; set content
+    (config! main-frame :content content-pane)

     ;; Main menu first
     (add-menus main-frame


Remove reflection warning from GUI repl code

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

--- src/conexp/contrib/gui/repl.clj
+++ src/conexp/contrib/gui/repl.clj
@@ -229,7 +229,8 @@
                                           (implements-interface? (class (.getDocument ^JTextArea thing))
                                                                  conexp.contrib.gui.repl.ReplProcess))))]
     (when repl-container
-      (.. repl-container getDocument getReplThreadMap))))
+      (let [^conexp.contrib.gui.repl.ReplProcess repl-process (.getDocument repl-container)]
+        (.getReplThreadMap repl-process)))))

 ;;;


Reindenting docstrings

Reindenting docstrings

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

--- src/conexp/fca/implications.clj
+++ src/conexp/fca/implications.clj
@@ -146,15 +146,15 @@
   ((clop-by-implications implications) input-set))

 (defn- add-immediate-elements
-  "Iterating through the sequence of implications, tries to apply as many implications as
-  possible.  Uses subset-test to determine whether a given implication can be used to
-  extend a given set, i.e. an implication impl can be used to extend a set s if and only
-  if
+  "Iterating through the sequence of implications, tries to apply as many
+  implications as possible.  Uses subset-test to determine whether a given
+  implication can be used to extend a given set, i.e. an implication impl can be
+  used to extend a set s if and only if

     (subset-test (premise impl) s)

-  is true. Note that if (conclusion impl) is already a subset of s, then s is effectively
-  not extended."
+  is true. Note that if (conclusion impl) is already a subset of s, then s is
+  effectively not extended."
   [implications initial-set subset-test]
   (loop [conclusions  (transient initial-set),
          impls        implications,
@@ -219,8 +219,8 @@
     (holds? impl ctx)))

 (defn complete-implication-set?
-  "Checks wheter given set of implications is complete in context ctx. This is a very costly
-  computation."
+  "Checks wheter given set of implications is complete in context ctx. This is a
+  very costly computation."
   [ctx impl-set]
   (and (forall [impl impl-set]
          (and (subset? (premise impl) (attributes ctx))
@@ -230,8 +230,8 @@
                   (close-under-implications impl-set A)))))

 (defn irredundant-subset
-  "Given a set impls of implications, returns an irredundant subset of impls.  Note that
-  this set does not need to be of minimal cardinality."
+  "Given a set impls of implications, returns an irredundant subset of impls.
+  Note that this set does not need to be of minimal cardinality."
   [impls]
   (reduce (fn [impls impl]
             (if (follows-semantically? impl impls)
@@ -251,11 +251,11 @@

 (defn canonical-base-from-clop
   "Given a closure operator «clop» on the set «base», computes its canonical base,
-   optionally using the set «background-knowledge» of implications on «base-set» as
-   background knowledge.  The result will be a lazy sequence.  If «predicate» is given as
-   third argument, computes only those implications whose premise satisfy this predicate.
-   Note that «predicate» has to satisfy the same conditions as the one of
-   «next-closed-set-in-family»."
+   optionally using the set «background-knowledge» of implications on «base-set»
+  as background knowledge.  The result will be a lazy sequence.  If «predicate»
+  is given as third argument, computes only those implications whose premise
+  satisfy this predicate.  Note that «predicate» has to satisfy the same
+  conditions as the one of «next-closed-set-in-family»."
   ([clop base]
      (canonical-base-from-clop clop base #{} (constantly true)))
   ([clop base background-knowledge]
@@ -289,8 +289,9 @@
                          (close-under-implications background-knowledge #{}))))))

 (defn intersect-implicational-theories
-  "Given a set «base-set» and collections «implication-sets» of implications, returns the
-  canonical base of the intersection of the corresponding closure theories."
+  "Given a set «base-set» and collections «implication-sets» of implications,
+  returns the canonical base of the intersection of the corresponding closure
+  theories."
   [base-set & implication-sets]
   (let [implication-clops (vec (map clop-by-implications implication-sets)),
         clop              (fn [A]
@@ -300,11 +301,11 @@

 (defn canonical-base
   "Returns the canonical base of given context, as a lazy sequence.  Uses
-  «background-knowledge» as starting set of implications, which will not appear in the
-  result.  If «predicate» is given (a function), computes only those implications from the
-  canonical base whose premise satisfy this predicate, i.e. «predicate» returns true on
-  these premises.  Note that «predicate» has to satisfy the same conditions as the
-  predicate to «next-closed-set-in-family»."
+  «background-knowledge» as starting set of implications, which will not appear
+  in the result.  If «predicate» is given (a function), computes only those
+  implications from the canonical base whose premise satisfy this predicate,
+  i.e. «predicate» returns true on these premises.  Note that «predicate» has to
+  satisfy the same conditions as the predicate to «next-closed-set-in-family»."
   ([ctx]
      (canonical-base ctx #{} (constantly true)))
   ([ctx background-knowledge]
@@ -351,8 +352,8 @@
 ;;; Proper Premises

 (defn proper-conclusion
-  "Returns all elements which are implied in context ctx by A but are neither contained in A or
-  follow from a strict subsets of A."
+  "Returns all elements which are implied in context ctx by A but are neither
+  contained in A or follow from a strict subsets of A."
   [ctx A]
   (difference (context-attribute-closure ctx A)
               (reduce into
@@ -368,8 +369,9 @@
        (not (empty? (proper-conclusion ctx A)))))

 (defn- proper-premises-by-hypertrans
-  "Returns all proper premises for the attribute «m» in the formal context «ctx».  The set
-  «objs» should contain all objects from ctx which are in down-arrow relation to m."
+  "Returns all proper premises for the attribute «m» in the formal context
+  «ctx».  The set «objs» should contain all objects from ctx which are in
+  down-arrow relation to m."
   [ctx m objs]
   (minimal-hypergraph-transversals
    (disj (attributes ctx) m)
@@ -436,19 +438,20 @@
 ;;; Association Rules

 (defn support
-  "Computes the support of the set of attributes B in context ctx. If an implications is given,
-  returns the support of this implication in the given context."
+  "Computes the support of the set of attributes B in context ctx. If an
+  implications is given, returns the support of this implication in the given
+  context."
   [thing ctx]
   (cond
-   (set? thing)
-   (if (empty? (objects ctx))
-     1
-     (/ (count (attribute-derivation ctx thing))
-        (count (objects ctx)))),
-   (implication? thing)
-   (recur (premise thing) ctx),
-   :else
-   (illegal-argument "Cannot determine support of " (print-str thing))))
+    (set? thing)
+    (if (empty? (objects ctx))
+      1
+      (/ (count (attribute-derivation ctx thing))
+         (count (objects ctx)))),
+    (implication? thing)
+    (recur (premise thing) ctx),
+    :else
+    (illegal-argument "Cannot determine support of " (print-str thing))))

 (defn confidence
   "Computes the confidence of the given implication in the given context."
@@ -474,8 +477,9 @@
                                identity)))

 (defn- association-rules
-  "Returns all association rules of context with the parameters minsupp as minimal support and
-  minconf as minimal confidence. The result returned is a lazy sequence."
+  "Returns all association rules of context with the parameters minsupp as
+  minimal support and minconf as minimal confidence. The result returned is a
+  lazy sequence."
   ;; UNTESTED!
   [context minsupp minconf]
   (let [fitemsets (frequent-itemsets context minsupp)]
@@ -488,8 +492,8 @@
 ;;;

 (defn frequent-closed-itemsets
-  "Computes for context a lazy sequence of all frequent and closed itemsets, given minsupp as
-  minimal support."
+  "Computes for context a lazy sequence of all frequent and closed itemsets,
+  given minsupp as minimal support."
   [context minsupp]
   (let [mincount (* minsupp (count (objects context)))]
     (intents context
@@ -498,12 +502,12 @@
                    mincount)))))

 (defn luxenburger-basis
-  "Computes the luxenburger-base of a given context «context», returning the result as a
-  lazy sequence.  Uses «minconf» as minimal confidence.  If «minsupp-or-predicate» is a
-  number, uses that as a minimal support threshold.  In this case, «minsupp» ∈ [0,1] must
-  hold.  If «minsupp-or-predicate» is a function, uses this as a predicate to filter all
-  candidate itemsets.  In this case, the predicate should be valid predicate value for
-  «intents»."
+  "Computes the luxenburger-base of a given context «context», returning the
+  result as a lazy sequence.  Uses «minconf» as minimal confidence.  If
+  «minsupp-or-predicate» is a number, uses that as a minimal support threshold.
+  In this case, «minsupp» ∈ [0,1] must hold.  If «minsupp-or-predicate» is a
+  function, uses this as a predicate to filter all candidate itemsets.  In this
+  case, the predicate should be valid predicate value for «intents»."
   [context minsupp-or-predicate minconf]
   (let [pred (cond (and (number? minsupp-or-predicate)
                         (<= 0 minsupp-or-predicate 1))


Add better core/get-prompt test.

Add better core/get-prompt test.

--- test/cljs/cljs_bootstrap/core_test.cljs
+++ test/cljs/cljs_bootstrap/core_test.cljs
@@ -4,4 +4,5 @@
             [cljs-bootstrap.common :as common]))

 (deftest prompt
-  (is (not (empty? (re-seq #"=>" (core/get-prompt))))))
+  (is (not (empty? (re-seq #"=>" (core/get-prompt)))) "core/get-prompt should correcly return =>")
+  (is (not (string? (core/get-prompt))) "core/get-prompt should be a string"))


Add tests covering pattern/letfn?

Add tests covering pattern/letfn?

--- test/oxcart/pattern_test.clj
+++ test/oxcart/pattern_test.clj
@@ -77,6 +77,17 @@
   (is (p/let? {:op :let})))

+(deftest letfn?-tests
+  (is (p/letfn? {:op :letfn}))
+  (is-not (p/letfn? addition))
+  (is-not (p/letfn? foo))
+  (is-not (p/letfn? (:init foo)))
+  (is-not (p/letfn? bar))
+  (is-not (p/letfn? (:init bar)))
+  (is-not (p/letfn? fail))
+  (is-not (p/letfn? (:init fail))))
+
+
 (def private-defn
   (ast
    (defn ^:private baz [x]


comments order

comments order

--- src/moviejure/user_content.clj
+++ src/moviejure/user_content.clj
@@ -44,7 +44,9 @@
 (defn get-comments [content-id]
   (select user_comment
           (fields :comment :created [:users.name :user-name])
-          (join users (= :users.id :user_comment.user_id)) (where {:content_id content-id})))
+          (join users (= :users.id :user_comment.user_id))
+          (where {:content_id content-id})
+          (order :created :DESC)))

 (defroutes user-content-routes
   (POST "/set_favorite" [content-id favorite :as {{user :user} :session}] (set-favorite-response user content-id favorite))


Poor Eastwood doesn't understand stateful Java craziness. Make it happy anyway.

--- src/oc/email/lib/sparkline.clj
+++ src/oc/email/lib/sparkline.clj
@@ -91,8 +91,8 @@
         bis (java.io.ByteArrayInputStream. ba)
         bi (ImageIO/read bis)
         cropped-bi (.getSubimage bi x-offset y-offset width height)
-        cropped-baos (java.io.ByteArrayOutputStream.)]
-    (ImageIO/write cropped-bi "png" cropped-baos)
+        cropped-baos (java.io.ByteArrayOutputStream.)
+        _for-eastwood (ImageIO/write cropped-bi "png" cropped-baos)]
     cropped-baos))

 (defn- sparkchart-file


Allow all members to create or complete follow-ups, also viewer. Make sure viewers can only create follow-ups for themselves. Remove TODO comment.

--- src/oc/storage/api/entries.clj
+++ src/oc/storage/api/entries.clj
@@ -135,7 +135,7 @@

     true)) ; no existing entry, so this will fail existence check later

-(defn- valid-follow-up-request? [conn entry-uuid follow-up-map user]
+(defn- valid-follow-up-request? [conn entry-uuid follow-up-map user access-level]
   (let [existing-entry (entry-res/get-entry conn entry-uuid)
         ts (db-common/current-timestamp)
         with-keys (keywordize-keys follow-up-map)
@@ -147,7 +147,14 @@
                     (:assignees with-keys))
         follow-ups (map #(fix-follow-up {:assignee %} user ts) assignees)]
     (if existing-entry
-      (if (every? #(lib-schema/valid? common-res/FollowUp %) follow-ups)
+      (if (and ;; Check all follow-up request are ok
+               (every? #(lib-schema/valid? common-res/FollowUp %) follow-ups)
+               ;; and that is an author
+               (or (= access-level :author)
+                   ;; or is a viewer
+                   (and (= access-level :viewer)
+                   ;; creating follow-ups only for himself
+                        self?)))
         {:existing-entry (api-common/rep existing-entry)
          :self? self?
          :follow-ups (api-common/rep follow-ups)}
@@ -268,9 +275,7 @@
       (when (= (:status final-entry) "published")
         (undraft-board conn user org board)
         (entry-res/delete-versions conn final-entry)
-        (auto-share-on-publish conn ctx final-entry)
-        ;; TODO: sent follow-up notifications
-        )
+        (auto-share-on-publish conn ctx final-entry))
       (notification/send-trigger! (notification/->trigger :add org board {:new final-entry} user nil))
       {:created-entry (api-common/rep final-entry)})

@@ -786,7 +791,7 @@
   ;; Authorization
   :allowed? (by-method {
     :options true
-    :post (fn [ctx] (access/allow-authors conn org-slug board-slug (:user ctx)))})
+    :post (fn [ctx] (access/allow-members conn org-slug (:user ctx)))})

   ;; Media type client accepts
   :available-media-types (by-method {
@@ -806,7 +811,7 @@
   ;; Validations
   :processable? (by-method {
     :options true
-    :post (fn [ctx] (valid-follow-up-request? conn entry-uuid (:data ctx) (:user ctx)))})
+    :post (fn [ctx] (valid-follow-up-request? conn entry-uuid (:data ctx) (:user ctx) (:access-level ctx)))})

   ;; Existentialism
   :can-post-to-missing? false
@@ -851,7 +856,7 @@
   ;; Authorization
   :allowed? (by-method {
     :options true
-    :post (fn [ctx] (access/allow-authors conn org-slug board-slug (:user ctx)))})
+    :post (fn [ctx] (access/allow-members conn org-slug (:user ctx)))})

   ;; Media type client accepts
   :available-media-types (by-method {


Code cleanup.

Code cleanup.

--- src/oc/storage/api/entries.clj
+++ src/oc/storage/api/entries.clj
@@ -67,7 +67,8 @@
             ts (db-common/current-timestamp)
             follow-ups (map #(fix-follow-up % author ts) (:follow-ups entry-map))
             valid-follow-ups? (every? #(lib-schema/valid? common-res/FollowUp %) follow-ups)]
-        {:new-entry (api-common/rep new-entry) :existing-board (api-common/rep board)
+        {:new-entry (api-common/rep new-entry)
+         :existing-board (api-common/rep board)
          :new-follow-ups follow-ups})

       (catch clojure.lang.ExceptionInfo e
@@ -163,7 +164,7 @@
      :existing-entries (api-common/rep entries)}
     false))

-(defn- valid-entry-new-update? [conn ctx org-slug entry-uuid user action-type]
+(defn- valid-entry-inbox-update? [conn ctx org-slug entry-uuid user action-type]
   (timbre/info "Valid new update for" entry-uuid "from user" (:user-id user) "action" action-type)
   (if-let* [existing-entry (entry-res/get-entry conn entry-uuid)
             existing-org (or (:existing-org ctx) (org-res/get-org conn org-slug))
@@ -307,7 +308,7 @@
                                (entry-res/add-follow-ups! conn entry-result (:new-follow-ups ctx) user))
           final-entry (if updating-follow-ups? updated-follow-ups entry-result)]
       (timbre/info "Created entry for:" entry-for "as" (:uuid final-entry))
-      (when (= (:status final-entry) "published")
+      (when (= (keyword (:status final-entry)) :published)
         (undraft-board conn user org board)
         (entry-res/delete-versions conn final-entry)
         (auto-share-on-publish conn ctx final-entry))
@@ -324,7 +325,6 @@
             entry (:existing-entry ctx)
             updated-entry (:updated-entry ctx)
             updated-result (entry-res/update-entry! conn (:uuid updated-entry) updated-entry user)]
-
     (let [old-board (:moving-board ctx)
           updating-follow-ups? (pos? (count (:updated-follow-ups ctx)))
           ;; Handle follow-ups
@@ -422,7 +422,7 @@
       (when (= (keyword (:status entry)) :draft)
         (let [remaining-entries (entry-res/list-all-entries-by-board conn (:uuid board))]
           (board-res/maybe-delete-draft-board conn org board remaining-entries (:user ctx))))
-      (when (not= (:status entry) "published")
+      (when (not= (keyword (:status entry)) :published)
         (entry-res/delete-versions conn (assoc entry :delete-entry true)))
       (timbre/info "Deleted entry for:" entry-for)
       (notification/send-trigger! (notification/->trigger :delete org board {:old entry} (:user ctx) nil))
@@ -1060,7 +1060,7 @@
   ;; Validations
   :processable? (by-method {
     :options true
-    :post (fn [ctx] (valid-entry-new-update? conn ctx org-slug entry-uuid (:user ctx) action-type))})
+    :post (fn [ctx] (valid-entry-inbox-update? conn ctx org-slug entry-uuid (:user ctx) action-type))})

   :malformed? false


Fix error.

Fix error.

--- src/oc/storage/async/email.clj
+++ src/oc/storage/async/email.clj
@@ -24,8 +24,8 @@
    :headline schema/Str
    :body (schema/maybe schema/Str)
    :must-see (schema/maybe schema/Bool)
-   :video-id (schema/maybe lib-schema/Str)
-   :video-image (schema/maybe lib-schema/Str)
+   :video-id (schema/maybe Schema/Str)
+   :video-image (schema/maybe Schema/Str)
    :video-duration (schema/maybe schema/Str)
    :secure-uuid lib-schema/UniqueID
    :publisher lib-schema/Author


add range-lin cgen. Fixes #142

add range-lin cgen. Fixes #142

--- src/overtone/sc/cgens/line.clj
+++ src/overtone/sc/cgens/line.clj
@@ -17,3 +17,13 @@
   (:kr (let [scale (/ (- dsthi dstlo) (- srchi srclo))
              offset (- dstlo (* scale srclo))]
          (mul-add in scale offset))))
+
+(defcgen range-lin
+  "Map ugens with default range linearly to another"
+  [in    {:default 0.0 :doc "Input to convert (should have range -1 to 1)"}
+   dstlo {:default 1.0 :doc "Lower limit of output range"}
+   dsthi {:default 2.0 :doc "Upper limit of output range"}]
+  "Linearly maps input signal with expected range of -1 to 1 to the
+   specified range from dstlo to dsthi."
+  (:ar (lin-lin:ar in -1 1 dstlo dsthi))
+  (:kr (lin-lin:kr in -1 1 dstlo dsthi)))


Force symbol qualification in emit-clj

Force symbol qualification in emit-clj

--- src/oxcart/passes/emit_clj.clj
+++ src/oxcart/passes/emit_clj.clj
@@ -29,5 +29,5 @@
   [{:keys [modules] :as whole-ast} options]
   (->> whole-ast
        passes/whole-ast->forms
-       (map emit/emit-form)
+       (map #(emit/emit-form %1 #{:qualified-vars}))
        (cons 'do)))


let compute-conjugate-order accept [graph]

--- src/main/clojure/conexp/layouts/dim_draw.clj
+++ src/main/clojure/conexp/layouts/dim_draw.clj
@@ -72,11 +72,13 @@
 ;(sat-reduction (uber/graph [:a :b] [:a :c] [:b :e] [:c :e] [:a :e]) 1)

 (defn compute-conjugate-order
-  [P <=]
-  (let [C (co-comparability P <=)]
-    (if (comparability-graph? C)
-      (map edge->vec (lg/edges (transitive-orientation C)))
-      nil)))
+  ([graph]
+    (compute-conjugate-order (lg/nodes graph) #(lg/has-edge? graph %1 %2)))
+  ([P <=]
+   (let [C (co-comparability P <=)]
+     (if (comparability-graph? C)                           ; has transitive orientation?
+       (map edge->vec (lg/edges (transitive-orientation C)))
+       nil))))

 (defn compute-coordinates


removing unnecessary campfire messages

removing unnecessary campfire messages

--- src/shuppet/securitygroups.clj
+++ src/shuppet/securitygroups.clj
@@ -32,11 +32,11 @@
                  (xml/parse)
                  (zip/xml-zip))]
     (log/info "Security group request: " url)
-    (if (or
-         (= 200 status)
-         (acceptable-error? (get params "Action") status body))
-      body
-      (throw-aws-exception "EC2" (get params "Action") url status body))))
+
+    (cond
+     (= 200 status) body
+     (acceptable-error? (get params "Action") status body) nil
+     :else (throw-aws-exception "EC2" (get params "Action") url status body)) ))

 (defn- create-params [opts]
   (without-nils {"GroupName" (:GroupName opts)
@@ -121,13 +121,14 @@
   [sg-id opts]
   (when-let [ingress (:Ingress opts)]
     (do
-      (network-action sg-id ingress :AuthorizeSecurityGroupIngress)
-      (cf/info (str "I've added the ingress rules '" (vec ingress) "' for the security group '" (:GroupName opts) "'"))))
+      (when (network-action sg-id ingress :AuthorizeSecurityGroupIngress)
+        (cf/info (str "I've added the ingress rules '" (vec ingress) "' for the security group '" (:GroupName opts) "'")))))
   (let [egress (check-default-egress opts)]
     (when-not (empty? egress)
-      (network-action sg-id egress :AuthorizeSecurityGroupEgress)
-      (cf/info (str "I've added the egress rules '" (vec egress) "' for the security group '" (:GroupName opts) "'"))
-      (network-action sg-id (list {:IpRanges "0.0.0.0/0" :IpProtocol "-1"}) :RevokeSecurityGroupEgress))))
+      (when (network-action sg-id egress :AuthorizeSecurityGroupEgress)
+        (cf/info (str "I've added the egress rules '" (vec egress) "' for the security group '" (:GroupName opts) "'")))
+      (when (network-action sg-id (list {:IpRanges "0.0.0.0/0" :IpProtocol "-1"}) :RevokeSecurityGroupEgress)
+        (cf/info (str "I've revoked the  default egress rules for the security group '"  (:GroupName opts) "'"))))))

 (defn- network-config
   [params]


allow live manipulation of the modulus

allow live manipulation of the modulus

--- src/sierpinski_sieve/core.cljs
+++ src/sierpinski_sieve/core.cljs
@@ -7,7 +7,9 @@
 (enable-console-print!)
 (defn log [& args] (.log js/console args))

-(defonce app-state (atom {:size 1000}))
+(defonce app-state
+  (atom {:size 1000
+         :modulus 2}))

 (defn next-row [modulus row]
   (let [size (inc (alength row))
@@ -40,8 +42,16 @@
         (doseq [[y row] (map-indexed vector sieve)]
           (paint-row ctx y row size))))))

+(defn slider [name key value]
+  [:div
+   [:label name
+    [:input {:type "range" :min 2 :max 32 :step 1 :value value
+             :on-change
+             (fn [e] (swap! app-state assoc key (int (.-target.value e))))}]
+    value]])
+
 (defn render-canvas []
-  (let [size (:size @app-state)]
+  (let [{:keys [size modulus]} @app-state]
     [:center
      [:h1 "Sierpinski Triangle"]
      [:canvas {:width size :height size :id "canvas"}]
@@ -50,17 +60,17 @@
        [:input {:type "range" :min 100 :max 1200 :step 100 :value size
                 :on-change (fn [e]
                              (let [value (int (.-target.value e))]
-                               (log value)
                                (swap! app-state assoc :size value)))}]
        size]]
+     (slider "Modulus" :modulus modulus)
      [:p
       "© 2017 Charles L.G. Comstock "
       [:a {:href "https://github.com/dgtized/sierpinski-sieve"} "(github)"]]]))

 (defn paint-canvas []
   (time
-   (let [size (:size @app-state)
-         triangle (time (doall (take size (sieve '(1) 2))))]
+   (let [{:keys [size modulus]} @app-state
+         triangle (time (doall (take size (sieve '(1) modulus))))]
      (time (paint "canvas" size triangle)))))

 (defn ui-component []


Adapt to PR review bis

Adapt to PR review bis

--- backend/src/akvo/lumen/lib/dataset/utils.clj
+++ backend/src/akvo/lumen/lib/dataset/utils.clj
@@ -2,7 +2,7 @@

 (defn find-column
   ([columns v]
-   (when v (find-column columns v :columnName)))
+   (find-column columns v :columnName))
   ([columns v filter-by]
    (when v
      (if-let [column (first (filter #(= v (filter-by %)) columns))]


Add instructions to page.

Add instructions to page.

--- src/todo_repl_webapp/views.clj
+++ src/todo_repl_webapp/views.clj
@@ -2,6 +2,35 @@
   (:require [hiccup.form :as form]
             [hiccup.page :as page]
             [hiccup.core :as core]))
+
+(def instructions
+  (core/html
+    [:div.alert.alert-info.col-md-7.col-md-offset-2
+      [:div [:b "Instructions"]]
+      [:br]
+      [:div.col-md-4
+        [:p "To Display Tasks"]
+        [:code "(tasks)"]]
+      [:div.col-md-4
+        [:p "To Reset Tasks"]
+        [:code "(init-tasks)"]]
+      [:div.col-md-4
+        [:p "Tasks look like this"]
+        [:code "{:name name" [:br]
+               ":due date " [:em "(try natural language for the date)"] [:br]
+               ":context context}"]]
+      [:div.col-md-4
+        [:p "To Add a Task"]
+        [:code "(add-new-task" [:br]
+               "{:name \"Build a Rocketship\"" [:br]
+               "               :due \"tomorrow\"" [:br]
+               "               :context \"hobbies\"}"]]
+
+      [:div.col-md-4
+        [:p "To Complete a Task"]
+        [:code "(complete-task "
+               [:em "index"]
+               ")"]]]))

 (defn home [& _]
   (core/html [:head
@@ -20,6 +49,7 @@
                           [:br]
                           (form/submit-button {:id "todoSubmitButton"}
                                               "Eval"))]
+          instructions
           [:div#display.col-md-7.col-md-offset-2]
           (page/include-js "js/eval.js")]))


Add some not-null constraints.

Add some not-null constraints.

--- src/cavm/h2.clj
+++ src/cavm/h2.clj
@@ -113,8 +113,8 @@

 (def field-score-table
   [(format  "CREATE TABLE IF NOT EXISTS `field_score` (
-            `field_id` INT,
-            `i` INT,
+            `field_id` INT NOT NULL,
+            `i` INT NOT NULL,
             `scores` VARBINARY(%d) NOT NULL,
             UNIQUE (`field_id`, `i`),
             FOREIGN KEY (`field_id`) REFERENCES `field` (`id`))" score-size)])
@@ -202,7 +202,7 @@
   ["CREATE TABLE IF NOT EXISTS `field_gene` (
    `field_id` INT NOT NULL,
    `row` INT NOT NULL,
-   `gene` VARCHAR(255),
+   `gene` VARCHAR(255) NOT NULL,
     FOREIGN KEY (`field_id`) REFERENCES `field` (`id`) ON DELETE CASCADE)"
    "CREATE INDEX IF NOT EXISTS field_gene ON `field_gene` (`field_id`, `gene`)"
    "CREATE INDEX IF NOT EXISTS gene_row ON `field_gene` (`field_id`, `row`)"])


Improve message when -A:dev is not used with rebel

Fix #60

--- lib.rebel.auto-dev/src/edge/rebel/main.clj
+++ lib.rebel.auto-dev/src/edge/rebel/main.clj
@@ -59,10 +59,18 @@
                 (require 'dev)
                 (in-ns 'dev)
                 (println (io.aviso.ansi/bold-yellow "[Edge] Now enter (go) to start the dev system"))
+
                 (catch Exception e
-                  (.printStackTrace e)
-                  (println "[Edge] Failed to require dev, this usually means there was a syntax error or you didn't supply dev aliases (e.g. `-A:dev`). See exception above.")
-                  (println "[Edge] Please correct it, and enter (fixed!) to resume development."))))
+                  (if (= (.getMessage e)
+                         "Could not locate dev__init.class, dev.clj or dev.cljc on classpath.")
+                    (do
+                      (println (io.aviso.ansi/red "[Edge] Failed to require dev. Falling back to `user`. "))
+                      (println (io.aviso.ansi/bold-red "[Edge] Make sure to supply `-A:dev` when running `../bin/rebel`.")))
+
+                    (do
+                      (.printStackTrace e)
+                      (println "[Edge] Failed to require dev, this usually means there was a syntax error. See exception above.")
+                      (println "[Edge] Please correct it, and enter (fixed!) to resume development."))))))
       :print syntax-highlight-pprint)
     ;; When the REPL stops, stop:
     (System/exit 0)))


[style] start simplifying sidebar.

[style] start simplifying sidebar.

--- src-cljs/pepa/style.cljs
+++ src-cljs/pepa/style.cljs
@@ -170,12 +170,9 @@
      sidebar-header-css

      ;; Sections
-     [:nav.workflows (list
-                      {:overflow-y :auto}
-                      (calc-property :height ["100%"
-                                              - 1 ; border
-                                              ]))
-      [:ul {:padding-left 0, :margin 0}
+     [:nav.workflows {:overflow-y :auto
+                      :flex-grow 1}
+      [:>ul {:padding-left 0, :margin 0}
        (let [item-height 50
              padding (/ item-height 8)
              line-height (/ item-height 1.5)


Use threading macro to make code read more naturally

--- src/hu/ssh/github_changelog.clj
+++ src/hu/ssh/github_changelog.clj
@@ -31,7 +31,10 @@
   "Fetch the version tags in the correct order"
   [user repo]
   (let [sort-fn #(semver/older? (:version %1) (:version %2))]
-    (sort sort-fn (filter :version (map-semver (repos/tags user repo))))))
+    (->> (repos/tags user repo)
+         map-semver
+         (filter :version)
+         (sort sort-fn))))

 (defn changelog
   "Fetches the changelog"
@@ -42,4 +45,4 @@
     (println (first @tags))))

 (core/with-defaults {:oauth-token (env :github-token) :all_pages true}
-                    (changelog "raszi" "node-tmp"))+                    (changelog "raszi" "node-tmp"))


Remove unused test file

Remove unused test file

--- test/kevin/core_test.clj
+++ test/kevin/core_test.clj
@@ -1,7 +0,0 @@
-(ns kevin.core-test
-  (:require [clojure.test :refer :all]
-            [kevin.core :refer :all]))
-
-(deftest a-test
-  (testing "FIXME, I fail."
-    (is (= 0 1))))


I want imagesssss

I want imagesssss

--- src/kushana/impl/component.cljs
+++ src/kushana/impl/component.cljs
@@ -16,7 +16,6 @@
 (defn v2 [[x y]] (b.Vector2. x y))
 (defn v3 [[x y z]] (b.Vector3. x y z))
 (defn v4 [[x y z w]] (b.Vector4. x y z w))
-
 (defn c3 [[r g _b]] (b.Color3. r g _b))

 (defn dispose [obj] (.dispose obj))


Uwes Algorithm: Remove all irreducible attributes

and not only those which are the infimum of only two others.

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

--- src/conexp/contrib/experimental/ryssel_algorithm.clj
+++ src/conexp/contrib/experimental/ryssel_algorithm.clj
@@ -26,13 +26,15 @@
 (defn ryssel-base
   "Returns the implications computed by Ryssels Algorithm, as a lazy sequence."
   [ctx]
-  (let [gens        (reduce! (fn [map x]     ;generating elements of attribute extents
+  (let [gens        (reduce! (fn [map x]      ;generating elements of attribute extents
                                (let [extent (aprime ctx #{x})]
                                  (assoc! map extent
                                          (conj (get map extent #{}) x))))
                              {}
                              (attributes ctx)),
-        M           (set (keys gens)),       ;all attribute extents
+        all-extents (set (keys gens)),        ;all attribute extents
+        irr-extents (set-of (aprime ctx #{m}) ;attribute extents of irreducible attributes
+                            | m (attributes (reduce-attributes ctx))),
         empty-prime (adprime ctx #{})]
     (->> (reduce into
                  (for [m (attributes ctx)
@@ -40,19 +42,15 @@
                                    (conj empty-prime m))]
                    #{m})
                  (pmap (fn [A]
-                         (let [candidates (set-of U | U (disj M A),
+                         (let [candidates (set-of U | U (disj irr-extents A),
                                                       :let [U-cap-A (intersection U A)]
-                                                      :when (not (exists [V M]
+                                                      :when (not (exists [V all-extents]
                                                                    (and (proper-subset? V A)
                                                                         (subset? U-cap-A V))))),
-                               candidates (difference candidates
-                                                      (set-of (intersection X Y) | X candidates, Y candidates
-                                                                                :when (and (not (subset? X Y))
-                                                                                (not (subset? Y X))))),
                                covers     (cover (objects ctx) candidates A)]
                            (for [X covers]
                              (set-of m | Y X, m (gens Y)))))
-                       M))
+                       all-extents))
          distinct
          (map #(make-implication % (adprime ctx %))))))


Make use of defservice in the example screen app

--- src/examples/workflo/macros/examples/screen_app.cljs
+++ src/examples/workflo/macros/examples/screen_app.cljs
@@ -10,6 +10,8 @@
             [workflo.macros.screen :refer-macros [defscreen]]
             [workflo.macros.screen.bidi :as sb]
             [workflo.macros.screen.om-next :as so]
+            [workflo.macros.service :as service
+             :refer-macros [defservice]]
             [workflo.macros.view :refer-macros [defview]]))

 ;;;; Setup
@@ -209,17 +211,18 @@
    (println "goto" data)
    {:location data}))

-(defn process-emit
-  [{:keys [state location]}]
-  (when state
-    (d/transact! (om/app-state reconciler) (vals state))
-    (cljs.pprint/pprint (om/app-state reconciler)))
-  (when location
-    (so/goto @application
-             (:screen location)
-             (:params location))))
-
-(c/configure-commands! {:process-emit process-emit})
+;;;; Services
+
+(defservice state
+  (process
+   (d/transact! (om/app-state reconciler) (vals data))
+   (cljs.pprint/pprint (om/app-state reconciler))))
+
+(defservice location
+  (process
+   (so/goto @application (:screen data) (:params data))))
+
+(c/configure-commands! {:process-emit service/deliver-to-services!})

 ;;;;;; Example app

@@ -249,6 +252,8 @@
 ;;;; Bootstrapping

 (defn init []
+  (-> 'location service/new-service-component component/start)
+  (-> 'state service/new-service-component component/start)
   (->> (so/application {:reconciler reconciler
                         :target (gdom/getElement "app")
                         :root app


Using default index

Using default index

--- zambuko-back/src/zambuko_back/routes/default.clj
+++ zambuko-back/src/zambuko_back/routes/default.clj
@@ -9,9 +9,15 @@
             [noir.util.cache :as cache]
             [zambuko-back.data.sites :as sites]))

+(defn- default-index [request]
+  (if (= (get request :uri) "/")
+    (assoc request :uri "/index.html")
+    request))
+
 (defn resources [db bstore]
-  (fn [request]
-    (let [host (get-in request [:headers "host"] "default")
+  (fn [original-request]
+    (let [request (default-index original-request)
+          host (get-in request [:headers "host"] "default")
           uri  (get request :uri)
           site (sites/site @db host)
           site-id (:_id site "default")


Drop ritz and upgrade eastwood

Drop ritz and upgrade eastwood

--- dot/lein/profiles.clj
+++ dot/lein/profiles.clj
@@ -1,13 +1,7 @@
 {:user
  {:plugins [[lein-vanity "0.2.0"]
-            [jonase/eastwood "0.0.2"]
+            [jonase/eastwood "0.1.2"]
             [cider/cider-nrepl "0.7.0-SNAPSHOT"]
-            ;[lein-ritz "0.7.0"]
             [com.palletops/pallet-lein "0.8.0-alpha.1"]]
-  :dependencies [;[ritz/ritz-nrepl-middleware "0.7.0"]
-                 [org.clojure/tools.trace "0.7.6"]
-                 [slamhound "1.5.0"]]
-  ;; :repl-options {:nrepl-middleware
-  ;;                [ritz.nrepl.middleware.javadoc/wrap-javadoc
-  ;;                 ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}
+  :dependencies [[slamhound "1.5.0"]]
   :aliases {"slamhound" ["run" "-m" "slam.hound"]}}}


Reverting changes to the test.

Reverting changes to the test.

--- system-int-test/test/cmr/system_int_test/search/granule_search_index_name_test.clj
+++ system-int-test/test/cmr/system_int_test/search/granule_search_index_name_test.clj
@@ -12,7 +12,7 @@
             [cmr.system-int-test.utils.dev-system-util :as dev-sys-util]
             [cmr.indexer.system :as indexer-system]))

-(use-fixtures :each (ingest/reset-fixture {"provguid1" "PROV1" "provguid2" "LONG_PROV2"}))
+(use-fixtures :each (ingest/reset-fixture {"provguid1" "PROV1"}))

 (defn get-colls-with-separate-indexes
   "Gets the collections with separate indexes configured in the running dev system."
@@ -42,8 +42,7 @@
   [body]
   `(let [orig-colls-with-sep-indexes# (get-colls-with-separate-indexes)]
      (set-colls-with-separate-indexes!
-       (concat orig-colls-with-sep-indexes# ["C2-PROV1" "C3-PROV1"]
-               (map #(str "C" % "-LONG_PROV2") (range 250))))
+       (concat orig-colls-with-sep-indexes# ["C2-PROV1" "C3-PROV1"]))
      (try
        ~body
        (finally


removes clojurescript dependencies (#932)

--- waiter/project.clj
+++ waiter/project.clj
@@ -55,7 +55,7 @@
                  [digest "1.4.8"
                   :exclusions [org.clojure/clojure]]
                  [fullcontact/full.async "1.0.0"
-                  :exclusions [org.clojure/clojure org.clojure/core.async]]
+                  :exclusions [org.clojure/clojure org.clojure/clojurescript org.clojure/core.async]]
                  [io.dropwizard.metrics/metrics-graphite "3.1.1"
                   :exclusions [org.slf4j/slf4j-api]]
                  [joda-time "2.10.1"]


reverts websocket backpressure support (#1545)

--- waiter/project.clj
+++ waiter/project.clj
@@ -45,7 +45,7 @@
                  [io.grpc/grpc-core "1.20.0"
                   :exclusions [com.google.guava/guava]
                   :scope "test"]
-                 [twosigma/jet "0.7.10-20220331_163431-g5c2743a"
+                 [twosigma/jet "0.7.10-20220407_144841-gd100014"
                   :exclusions [org.mortbay.jetty.alpn/alpn-boot]]
                  [twosigma/clj-http "1.0.2-20180124_201819-gcdf23e5"
                   :exclusions [commons-codec commons-io org.clojure/tools.reader potemkin slingshot]]


CLJS-1321: remove getNamespace & getName method calls from defrecord

--- src/main/clojure/cljs/core.cljc
+++ src/main/clojure/cljs/core.cljc
@@ -1575,7 +1575,11 @@
   (core/let [hinted-fields fields
              fields (vec (map #(with-meta % nil) fields))
              base-fields fields
-             pr-open (core/str "#" (.getNamespace rname) "." (.getName rname) "{")
+             pr-open (core/str "#" #?(:clj  (.getNamespace rname)
+                                      :cljs (namespace rname))
+                               "." #?(:clj  (.getName rname)
+                                      :cljs (name rname))
+                               "{")
              fields (conj fields '__meta '__extmap (with-meta '__hash {:mutable true}))]
     (core/let [gs (gensym)
                ksym (gensym "k")


Remove unnecessary code

Remove unnecessary code

--- src/main/clojure/pigpen/pig.clj
+++ src/main/clojure/pigpen/pig.clj
@@ -371,12 +371,10 @@
   (thaw (.get value)))

 (defmethod thaw-values Tuple [^Tuple value]
-  (let [v (->> value (.getAll) (mapv thaw-values))]
-    (vec v)))
+  (->> value (.getAll) (mapv thaw-values)))

 (defmethod thaw-values DataBag [^DataBag value]
-  (let [v (->> value (.iterator) iterator-seq (map thaw-values))]
-    (list* v)))
+  (->> value (.iterator) iterator-seq (map thaw-values)))

 ;; **********


Rename reader variable to reader

Rename reader variable to reader

--- src/hu/ssh/github_changelog/dependencies/bundler.clj
+++ src/hu/ssh/github_changelog/dependencies/bundler.clj
@@ -1,7 +1,7 @@
 (ns hu.ssh.github-changelog.dependencies.bundler
   (:require
     [clojure.string :refer [split-lines]]
-    [clojure.java.io :refer [reader]]))
+    [clojure.java.io :as io]))

 (defn- get-specs [reader]
   (->> (doall (line-seq reader))
@@ -18,5 +18,5 @@
        (map parse-spec)))

 (defn parse [file]
-  (with-open [rdr (reader file)]
-    (parse-specs (get-specs rdr))))
+  (with-open [reader (io/reader file)]
+    (parse-specs (get-specs reader))))


[#80] add explicit dependency on 'clj-http'.

Adding the exclusions prevents "Trying to load ..." warnings when
running Leiningen but it means we're depending on those libraries being
provided externally.

--- lein-ancient/project.clj
+++ lein-ancient/project.clj
@@ -7,12 +7,16 @@
                  ;; (to avoid dependency conflicts)
                  ^:source-dep [rewrite-clj "0.4.13"]
                  ^:source-dep [org.clojure/tools.reader "0.10.0"]
-                 ^:source-dep [potemkin "0.4.3"]
+                 ^:source-dep [potemkin "0.4.4"]
                  ^:source-dep [version-clj "0.1.2"]
                  ^:source-dep [jansi-clj "0.1.0"]
                  ^:source-dep [ancient-clj "0.6.12"
                                :exclusions [com.amazonaws/aws-java-sdk-s3
                                             clj-http]]
+
+                 [clj-http "3.7.0"
+                  :exclusions [commons-codec
+                               org.apache.httpcomponents/httpcore]]

                  ;; S3 dependency is pinned because of conflicts of newer
                  ;; versions with Leiningen's precompiled dependencies.


Version 0.6.4

Version 0.6.4

--- metlog-vault/project.clj
+++ metlog-vault/project.clj
@@ -1,4 +1,4 @@
-(defproject metlog-vault "0.6.4-SNAPSHOT"
+(defproject metlog-vault "0.6.4"
   :description "Repository for storing and displaying time series data reported by metlog-agent.."

   :license {:name "Eclipse Public License"


Use :replace option to run-spec in watchers

--- src/main/clojure/com/stuartsierra/lazytest/watch.clj
+++ src/main/clojure/com/stuartsierra/lazytest/watch.clj
@@ -81,7 +81,7 @@
     (apply watch-dir d
            (fn [names]
              (try
-              (when-let [results (run-spec names :reload)]
+              (when-let [results (run-spec names :replace)]
                 (reporter results))
               (catch Throwable t
                 (reporter (TestThrown names nil t)))))


Bumped version to 0.1.0

Bumped version to 0.1.0

--- clients/clojure/project.clj
+++ clients/clojure/project.clj
@@ -1,4 +1,4 @@
-(defproject samsara/samsara-client "0.1.0-beta2"
+(defproject samsara/samsara-client "0.1.0"
   :description "Clojure SDK for Samsara"
   :url "http://samsara.github.io"
   :license {:name "Apache License 2.0"
@@ -9,8 +9,7 @@
                  [http-kit "2.1.16"]
                  [prismatic/schema "0.4.0"]
                  [amalloy/ring-buffer "1.0"]
-                 [jarohen/chime "0.1.6"]
-                 ]
+                 [jarohen/chime "0.1.6"]]
   :target-path "target/%s"
   :plugins [[lein-pprint "1.1.1"]
             [lein-midje "3.1.3"]]


Small fix for caffe compat.

Small fix for caffe compat.

--- cortex/src/cortex/nn/caffe.clj
+++ cortex/src/cortex/nn/caffe.clj
@@ -124,7 +124,7 @@
   reading this based on version/type of caffe model file and there may
   be others we haven't yet tried to support."
   [model]
-  (let [[batch-size n-chan width height] (or (.getInputDimList model)
+  (let [[batch-size n-chan width height] (or (seq (.getInputDimList model))
                                              (-> (.getInputShapeList model)
                                                  first
                                                  (.getDimList)


Исправления

Исправления

--- src-cljs/ixinfestor/omut.cljs
+++ src-cljs/ixinfestor/omut.cljs
@@ -2028,10 +2028,11 @@
                                      :danger  " list-group-item-danger"
                                      } type "")
                                (if active? "active" "")
-                               (or class+ "")
+                               " " (or class+ "")
                                )}
          (when badge (dom/span #js {:className "badge"} badge))
          text))
+

 (defn ui-list-group--counts-by [text f points & [nil-text]]


elevio Fix syntax error with _elev.openModule

--- src-cljs/frontend/support.cljs
+++ src-cljs/frontend/support.cljs
@@ -9,7 +9,7 @@
   (try
     (if (config/elevio-enabled?)
       ((-> (aget js/window "_elev")
-           (aget js/_elev "openModule")) "support")
+           (aget "openModule")) "support")
       (js/Intercom "show"))
     (catch :default e
       (utils/notify-error ch "Uh-oh, our Help system isn't available. Please email us instead, at sayhi@circleci.com")


Remove printlns

Remove printlns

--- src-cljs/kixi/hecuba/menu.cljs
+++ src-cljs/kixi/hecuba/menu.cljs
@@ -20,7 +20,6 @@
   (reify
     om/IRenderState
     (render-state [_ {page-pathname :pathname}]
-      (println "page-pathname:" page-pathname)
       (html
        [:div
         [:ul {:class "nav navbar-nav"}
@@ -36,6 +35,6 @@
            {:target hecuba-menu
             :init-state {:pathname (-> js/window .-location .-pathname)}})
   (GET "/4/whoami"
-       {:handler (fn [x] (println "X:" x) (swap! menu-model assoc :whoami x))
+       {:handler (fn [x] (swap! menu-model assoc :whoami x))
         :response-format :json
         :keywords? true}))


mul-add doesn't need to check that the rates are the same as the first input

--- src/overtone/sc/machinery/ugen/metadata/basicops.clj
+++ src/overtone/sc/machinery/ugen/metadata/basicops.clj
@@ -27,7 +27,6 @@
            {:name "add" :doc "Addition Value"}],
     :rates #{:dr :ir :ar :kr}
     :default-rate :auto
-    :check (same-rate-as-first-input)
     :doc "Multiply the input source by mul then add the add
           value. Equivalent to, but more efficient than, (+ add (* mul
           in))"}])


Paginate posts only if the request is not coming from Digest service tokens.

--- src/oc/storage/api/activity.clj
+++ src/oc/storage/api/activity.clj
@@ -25,7 +25,8 @@
 ;; changes to `entry/list-entries-by-org`
 (defn- assemble-activity
   "Assemble the requested activity (params) for the provided org."
-  [conn {start :start direction :direction must-see :must-see} org sort-type board-by-uuid allowed-boards user-id]
+  [conn {start :start direction :direction must-see :must-see digest-request :digest-request}
+   org sort-type board-by-uuid allowed-boards user-id]
   (let [order (if (= :after direction) :asc :desc)
         activities (cond

@@ -37,9 +38,11 @@
                         around-stamp (t/minus start-stamp (t/millis 1))
                         around-start (f/unparse db-common/timestamp-format around-stamp)
                         previous-entries (entry-res/list-entries-by-org conn (:uuid org) :asc around-start :after allowed-boards {:must-see must-see})
+                        previous-activity-limit (if digest-request (count previous-entries) config/default-activity-limit)
                         next-entries (entry-res/list-entries-by-org conn (:uuid org) :desc start :before allowed-boards {:must-see must-see})
-                        previous-activity (sort/sort-activity previous-entries sort-type around-start :asc config/default-activity-limit user-id)
-                        next-activity (sort/sort-activity next-entries sort-type start :desc config/default-activity-limit user-id)]
+                        next-activity-limit (if digest-request (count previous-entries) config/default-activity-limit)
+                        previous-activity (sort/sort-activity previous-entries sort-type around-start :asc previous-activity-limit user-id)
+                        next-activity (sort/sort-activity next-entries sort-type start :desc next-activity-limit user-id)]
                     {:direction :around
                      :previous-count (count previous-activity)
                      :next-count (count next-activity)
@@ -47,14 +50,16 @@

                   (= order :asc)
                   (let [previous-entries (entry-res/list-entries-by-org conn (:uuid org) order start direction allowed-boards {:must-see must-see})
-                        previous-activity (sort/sort-activity previous-entries sort-type start :asc config/default-activity-limit user-id)]
+                        activity-limit (if digest-request (count previous-entries) config/default-activity-limit)
+                        previous-activity (sort/sort-activity previous-entries sort-type start :asc activity-limit user-id)]
                     {:direction :previous
                      :previous-count (count previous-activity)
                      :activity (reverse previous-activity)})

                   :else
                   (let [next-entries (entry-res/list-entries-by-org conn (:uuid org) order start direction allowed-boards {:must-see must-see})
-                        next-activity (sort/sort-activity next-entries sort-type start :desc config/default-activity-limit user-id)]
+                        activity-limit (if digest-request (count next-entries) config/default-activity-limit)
+                        next-activity (sort/sort-activity next-entries sort-type start :desc activity-limit user-id)]
                     {:direction :next
                      :next-count (count next-activity)
                      :activity next-activity}))]
@@ -161,7 +166,10 @@
                              board-uuids (map :uuid boards)
                              board-slugs-and-names (map #(array-map :slug (:slug %) :access (:access %) :name (:name %)) boards)
                              board-by-uuid (zipmap board-uuids board-slugs-and-names)
-                             activity (assemble-activity conn params org sort-type board-by-uuid allowed-boards user-id)]
+                             fixed-params (if (= (:auth-source user) "digest")
+                                            (assoc params :digest-request true)
+                                            params)
+                             activity (assemble-activity conn fixed-params org sort-type board-by-uuid allowed-boards user-id)]
                           (activity-rep/render-activity-list params org "entries" sort-type activity boards user))))

 ;; A resource for operations on the activity of a particular Org


WIP, bloom filter scratch trials

WIP, bloom filter scratch trials

--- src/onyx/state/filter/bloom.clj
+++ src/onyx/state/filter/bloom.clj
@@ -1,5 +1,22 @@
 (ns onyx.state.filter.bloom
+  (:import [orestes.bloomfilter BloomFilter FilterBuilder])
   (:require [onyx.state.state-extensions :as state-extensions]))
+
+
+(comment
+  (def uuid-set (set (repeatedly 200000 #(java.util.UUID/randomUUID))))
+
+  (def one-val (first uuid-set))
+
+  (identity one-val)
+
+  (def bloom-filter (.buildBloomFilter (FilterBuilder. 200000 0.01)))
+
+  (time (mapv #(.add bloom-filter %) uuid-set))
+  (time (into #{} uuid-set))
+
+  (time (count (filter true? (repeatedly 200000 #(.contains bloom-filter (java.util.UUID/randomUUID))))))
+  (time (count (filter true? (repeatedly 200000 #(uuid-set-set (java.util.UUID/randomUUID)))))))

 (defrecord BloomFilters [bloom-buckets])


Fix NPE when no origin header is provided

Tested, this time…

--- src/org/spootnik/fleet/http.clj
+++ src/org/spootnik/fleet/http.clj
@@ -93,7 +93,9 @@
   [{:keys [origins] :or {origins []}}]
   (let [patterns (mapv re-pattern origins)]
     (fn [origin]
-      (some #(re-find % origin) patterns))))
+      (if (nil? origin)
+        false
+        (some #(re-find % origin) patterns)))))

 (defn start-http
   [scenarios engine opts]


add prof wrapper

add prof wrapper

--- src/polismath/math/clusters.clj
+++ src/polismath/math/clusters.clj
@@ -126,6 +126,11 @@
                      #(conj %1 (weights %2))
                      []
                      (nm/rownames nmat)))))
+
+;; Rename all above to weighted-mean* for profiling
+;(defnp weighted-mean
+;  [& args]
+;  (apply weighted-mean* args))

 (defn cluster-weights
   "Get a weights seq given a cluster with :members and a hash-map of weights. Returns nil


Make sure reactify-component always re-renders

It might get mutable data from js

--- src/reagent/impl/component.cljs
+++ src/reagent/impl/component.cljs
@@ -226,11 +226,19 @@
   (into {} (for [k (js-keys o)]
              [(keyword k) (aget o k)])))

+(def elem-counter 0)
+
 (defn reactify-component [comp]
   (.' js/React createClass
       #js{:displayName "react-wrapper"
           :render
           (fn []
-            (this-as
-             this (as-element
-                   [comp (shallow-obj-to-map (.' this :props))])))}))
+            (this-as this
+                     (as-element
+                      [comp
+                       (-> (.' this :props)
+                           shallow-obj-to-map
+                           ;; ensure re-render, might get mutable js data
+                           (assoc :-elem-count
+                                  (set! elem-counter
+                                        (inc elem-counter))))])))}))


use counts data for model-stats page

use counts data for model-stats page

--- src/semtag_web/client/main.cljs
+++ src/semtag_web/client/main.cljs
@@ -197,6 +197,7 @@
 (defn ^:export model-stats []
   (backend-request (path-to "/types")
     #(create-sort-table ($ :#model_stats_box)
-            (generate-table "model_stats_table" %
+            (generate-table "model_stats_table" (:results %)
+                            :caption (format "%s things, %s tags" (get-in % [:counts :thing]) (get-in % [:counts :tags]))
                             :row-partial view/model-stats-row
                             :fields [:name :count :name-percent :url-percent]))))


missed file

missed file

--- src/set_solver/match_shapes.clj
+++ src/set_solver/match_shapes.clj
@@ -1,23 +1,20 @@
-(ns set-solver.match-shapes)
-
-(defn- sgn [n]
-  (cond (pos? n) 1
-        (neg? n) -1
-        :else 0))
+(ns set-solver.match-shapes
+  (:require [set-solver.util :refer [sgn]]))

 (def ^:private eps 1.e-5)

 (defn- match-shapes [ma mb map-fn reduce-fn]
-  (reduce reduce-fn
-          (keep (fn [[ma mb]]
-                  (let [ama (Math/abs ma)
-                        amb (Math/abs mb)
-                        sma (sgn ma)
-                        smb (sgn mb)]
-                    (when (and (> ama eps)
-                               (> amb eps))
-                      (map-fn ama amb sma smb))))
-                (map vector ma mb))))
+  (let [map-res (keep (fn [[ma mb]]
+                        (let [ama (Math/abs ma)
+                              amb (Math/abs mb)
+                              sma (sgn ma)
+                              smb (sgn mb)]
+                          (when (and (> ama eps)
+                                     (> amb eps))
+                            (map-fn ama amb sma smb))))
+                      (map vector ma mb))]
+    (if (empty? map-res) 999
+      (reduce reduce-fn map-res))))

 ;;       ama = 1. / (sma * log10( ama ));


Remove logshipper

Remove logshipper

Using local filebeat now

--- src/terraboot/elasticsearch.clj
+++ src/terraboot/elasticsearch.clj
@@ -5,8 +5,6 @@
             [cheshire.core :as json]
             [clojure.string :as str]
             [clojure.core.strint :refer [<<]]))
-
-(def logshipper "")

 (def stop-update-engine {:name "update-engine.service"
                          :command "stop"})


Clean up camera specification

Clean up camera specification

--- spectacles/src/spectacles/mirror_camera.clj
+++ spectacles/src/spectacles/mirror_camera.clj
@@ -7,17 +7,22 @@

 (defn setup []

-  (def camera-resolution {:width 1024
-                          :height 768
-                          :frame-rate 30})
+  (def camera-specs {:device "/dev/video1"
+                     :width 1024
+                     :height 768
+                     :frame-rate 30})
   (def cell-size 15)
-  (def cols (/ (:width camera-resolution) cell-size))
-  (def rows (/ (:height camera-resolution) cell-size))
+  (def cols (/ (:width camera-specs) cell-size))
+  (def rows (/ (:height camera-specs) cell-size))
   (q/color-mode :rgb 255 255 255 100)
   (q/rect-mode :center)

   (println "Initializing Camera...")
-  (let [camera (Capture. (quil.applet/current-applet) (:width camera-resolution) (:height camera-resolution) "/dev/video1" (:frame-rate camera-resolution))]
+  (let [camera (Capture. (quil.applet/current-applet)
+                         (:width camera-specs)
+                         (:height camera-specs)
+                         (:device camera-specs)
+                         (:frame-rate camera-specs))]
     (do
       (.start camera))
     {:camera camera})
@@ -38,7 +43,7 @@
         (let [x (* i cell-size)
               y (* j cell-size)
               pixels (.pixels (:camera state))
-              location (+ (- (:width camera-resolution) x 1) (* (:width camera-resolution) y))
+              location (+ (- (:width camera-specs) x 1) (* (:width camera-specs) y))
               color (nth pixels location)
               size (* (/ (q/brightness color) 255) cell-size)
               ]


fix missing paren

fix missing paren

--- src-cljs/frontend/controllers/controls.cljs
+++ src-cljs/frontend/controllers/controls.cljs
@@ -1901,4 +1901,4 @@
 (defmethod post-control-event! :billing-email-changed
   [browser-state message {:keys [plan-id email]} previous-state current-state]
   (d/transact! (:team-db current-state)
-               [[:db/add plan-id :plan/billing-email email]])))
+               [[:db/add plan-id :plan/billing-email email]]))


[PDOK-1949] set the batch-size read parameter -> 10000 for reading feature


fixed the bug

fixed the bug

--- src/twentyfortyeight/logic.cljs
+++ src/twentyfortyeight/logic.cljs
@@ -133,7 +133,7 @@
   [board]
   (let [occupied-positions (into #{} (map ::position) board)
         free-positions (filter (complement occupied-positions) all-positions)]
-    (rand-nth free-positions)))
+    (when (not-empty free-positions) (rand-nth free-positions))))

 (defn random-tile-value
   []
@@ -145,8 +145,10 @@

 (defn insert-new-random-tile
   [board]
-  (conj board {::position (random-open-position board)
-               ::value (random-tile-value)}))
+  (if-let [position (random-open-position board)]
+    (conj board {::position position
+                 ::value (random-tile-value)})
+    board))

 (s/fdef move-direction
         :args (s/cat :board ::game-board :direction ::direction)


checkin

checkin

--- src/twentyfortyeight/logic.cljs
+++ src/twentyfortyeight/logic.cljs
@@ -3,15 +3,6 @@
             [cljs.spec.impl.gen :as gen]
             [cljs.spec.test :as st]))

-(defmacro if-let*
-  "Like if-let, but allow multiple bindings.  Do then only if
-   all bindings are true."
-  [bindings then]
-  (if (empty? bindings)
-    then
-    (let [[e v & r] bindings]
-      `(if-let [~e ~v]
-         (if-let* ~r ~then )))))

 (def directions #{::up ::down ::right ::left})

@@ -35,7 +26,7 @@
   (and (pos-int? n) (mod (log2 n) 1)))

 (s/def ::value (s/with-gen is-2048-num?
-                 #(gen/fmap pow-2 (s/gen (s/int-in 0 5)))))
+                 #(gen/fmap pow-2 (s/gen (s/int-in 1 5)))))

 (s/def ::tile (s/keys :req [::position ::value]))

@@ -99,19 +90,27 @@
     (vertical? direction) (group-by  #(-> % ::position ::x) board)
     (horizontal? direction) (group-by #(-> % ::position ::y) board)))

+(defn maybe-count-decreased-by-one?
+  [in-tiles out-tiles]
+  (or
+   (= (count out-tiles) (count in-tiles))
+   (= (count out-tiles) (dec (count in-tiles)))))
+
 (s/fdef join-first
         :args (s/cat :tiles (s/and (s/coll-of ::tile) not-empty))
-        :ret (s/coll-of ::tile))
+        :ret (s/coll-of ::tile)
+        :fn #(maybe-count-decreased-by-one? (-> % :args :tiles) (-> % :ret)))

 (defn join-first
   [tiles]
-  (let [[first-tile second-tile] tiles
-        new-value (+ (::value first-tile) (::value second-tile))
-        new-position (or (::position second-tile) (::position first-tile))
-        new-tile {::value new-value ::position new-position}]
-    (if (= (::value first-tile) (::value second-tile))
-      (cons new-tile (drop 2 tiles))
-      tiles)))
+  (if-let [match (first (filter #(<= 2 (count %))(partition-by ::value tiles)))]
+    (let [first-tile (first match)
+          second-tile (second match)
+          new-value (+ (::value first-tile) (::value second-tile))
+          new-position (or (::position second-tile) (::position first-tile))
+          new-tile {::value new-value ::position new-position}]
+      (cons new-tile (drop 2 tiles)))
+    tiles))

 (s/fdef stack-tiles
         :args (s/cat :direction ::direction :tiles (s/and (s/coll-of ::tile) not-empty))


Add collapsing group shape events.

Add collapsing group shape events.

And reorganize a little bit the shapes events ns.

--- src/uxbox/main/data/shapes.cljs
+++ src/uxbox/main/data/shapes.cljs
@@ -23,6 +23,8 @@
             [uxbox.util.geom.point :as gpt]
             [uxbox.util.data :refer (index-of)]))

+;; --- Shapes CRUD
+
 (defn add-shape
   "Create and add shape to the current selected page."
   [shape]
@@ -52,6 +54,8 @@
     rs/UpdateEvent
     (-apply-update [_ state]
       (update-in state [:shapes-by-id id] merge shape))))
+
+;; --- Shape Transformations

 (defn move-shape
   "Move shape using relative position (delta)."
@@ -165,47 +169,6 @@
                  merge
                  (when color {:fill color})
                  (when opacity {:fill-opacity opacity})))))
-
-(defn lock-proportions
-  "Mark proportions of the shape locked and save the current
-  proportion as additional precalculated property."
-  [sid]
-  {:pre [(uuid? sid)]}
-  (reify
-    udp/IPageUpdate
-    rs/UpdateEvent
-    (-apply-update [_ state]
-      (let [[width height] (-> (get-in state [:shapes-by-id sid])
-                               (geom/size)
-                               (keep [:width :height]))
-            proportion (/ width height)]
-        (update-in state [:shapes-by-id sid] assoc
-                   :proportion proportion
-                   :proportion-lock true)))))
-
-(defn unlock-proportions
-  [sid]
-  {:pre [(uuid? sid)]}
-  (reify
-    udp/IPageUpdate
-    rs/UpdateEvent
-    (-apply-update [_ state]
-      (update-in state [:shapes-by-id sid] assoc
-                 :proportion-lock false))))
-
-(defn setup-proportions
-  [sid]
-  {:pre [(uuid? sid)]}
-  (reify
-    udp/IPageUpdate
-    rs/UpdateEvent
-    (-apply-update [_ state]
-      (let [[width height] (-> (get-in state [:shapes-by-id sid])
-                               (geom/size)
-                               (keep [:width :height]))
-            proportion (/ width height)]
-        (update-in state [:shapes-by-id sid] assoc
-                   :proportion proportion)))))

 (defn update-font-attrs
   [sid {:keys [family style weight size align
@@ -247,6 +210,72 @@
                  merge
                  (when rx {:rx rx})
                  (when ry {:ry ry})))))
+
+
+;; --- Shape Proportions
+
+(defn lock-proportions
+  "Mark proportions of the shape locked and save the current
+  proportion as additional precalculated property."
+  [sid]
+  {:pre [(uuid? sid)]}
+  (reify
+    udp/IPageUpdate
+    rs/UpdateEvent
+    (-apply-update [_ state]
+      (let [[width height] (-> (get-in state [:shapes-by-id sid])
+                               (geom/size)
+                               (keep [:width :height]))
+            proportion (/ width height)]
+        (update-in state [:shapes-by-id sid] assoc
+                   :proportion proportion
+                   :proportion-lock true)))))
+
+(defn unlock-proportions
+  [sid]
+  {:pre [(uuid? sid)]}
+  (reify
+    udp/IPageUpdate
+    rs/UpdateEvent
+    (-apply-update [_ state]
+      (update-in state [:shapes-by-id sid] assoc
+                 :proportion-lock false))))
+
+(defn setup-proportions
+  [sid]
+  {:pre [(uuid? sid)]}
+  (reify
+    udp/IPageUpdate
+    rs/UpdateEvent
+    (-apply-update [_ state]
+      (let [[width height] (-> (get-in state [:shapes-by-id sid])
+                               (geom/size)
+                               (keep [:width :height]))
+            proportion (/ width height)]
+        (update-in state [:shapes-by-id sid] assoc
+                   :proportion proportion)))))
+
+;; --- Group Collapsing
+
+(defn collapse-shape
+  [id]
+  {:pre [(uuid? id)]}
+  (reify
+    udp/IPageUpdate
+    rs/UpdateEvent
+    (-apply-update [_ state]
+      (update-in state [:shapes-by-id id] assoc :collapsed true))))
+
+(defn uncollapse-shape
+  [id]
+  {:pre [(uuid? id)]}
+  (reify
+    udp/IPageUpdate
+    rs/UpdateEvent
+    (-apply-update [_ state]
+      (update-in state [:shapes-by-id id] assoc :collapsed false))))
+
+;; --- Shape Visibility

 (defn hide-shape
   [sid]


Keep the original mime type check just in case

--- src/vignette/util/thumbnail.clj
+++ src/vignette/util/thumbnail.clj
@@ -58,6 +58,7 @@

 (defn original->thumbnail
   [resource thumb-map]
+  (assert-original-mime-type resource thumb-map)
   (let [temp-file (temp-filename (str (wikia thumb-map) "_thumb"))
         base-command [thumbnail-bin
                       "--in" (.getAbsolutePath resource)


defun -> defmacro for 'disable-logging!'

--- src/whisper2cyanite/logging.clj
+++ src/whisper2cyanite/logging.clj
@@ -4,10 +4,10 @@
             [clojure.tools.logging :as log]
             [org.spootnik.logconfig :as logconfig]))

-(defn disable-logging!
+(defmacro disable-logging!
   "Disable logging."
   []
-  (logconfig/start-logging! {:level "off" :console false :files ""}))
+  `(logconfig/start-logging! {:level "off" :console false :files ""}))

 (disable-logging!)


need class files from tokyocabinet.jar, so can't remove compile dep from jar

--- tasks.clj
+++ tasks.clj
@@ -14,8 +14,6 @@
 (deftask clean
   (clean (file "src" tokyocabinet))
   (clean (file "src" tokyocabinet-java)))
-
-(remove-dep! jar compile)

 (deftask compile-native #{clean}
   (log (format "Compiling tokyocabinet for %s/%s" (os-name) (os-arch)))


Remove lock.

Remove lock.

--- src/wonko/export/prometheus.clj
+++ src/wonko/export/prometheus.clj
@@ -43,16 +43,13 @@
 (defn register-event [{:keys [service metric-value properties] :as event}]
   ;; FIXME: This is a broad fix to make this function thread-safe. We should
   ;; understand the problem better and apply the fix in a more localized way.
-  (.lock lock)
   (try
     (let [registry (get-or-create-registry service)
           metric (get-or-create-metric registry event)
           label-values (get-label-values properties)]
       (register/metric metric (assoc event :label-values label-values)))
     (catch Exception e
-      (log/info {:msg "unable to register event in prometheus" :event event}))
-    (finally
-      (.unlock lock))))
+      (log/info {:msg "unable to register event in prometheus" :event event}))))

 (defn metrics-endpoint [service]
   (let [registry (get-in @created-metrics [service :registry])


:synsem {:cat :verb} for 'querer'

:synsem {:cat :verb} for 'querer'

--- src/babel/espanol/lexicon.cljc
+++ src/babel/espanol/lexicon.cljc
@@ -739,7 +739,8 @@
                                        :sem subject-semantics}}}})

    "querer" (let [shared-part-of-querer
-                  {:espanol {:boot-stem "quier"
+                  {:synsem {:cat :verb}
+                   :espanol {:boot-stem "quier"
                              :preterito-stem "quis"
                              :futuro-stem "querr"}}]
               [(unify shared-part-of-querer


gagner: human=true

gagner: human=true

--- src/babel/francais/lexicon.clj
+++ src/babel/francais/lexicon.clj
@@ -198,7 +198,7 @@

    "entrer" {:synsem {:cat :verb
                       :essere true
-                     :sem {:pred :enter}}}
+                      :sem {:pred :enter}}}

    "envoyer" {:synsem {:cat :verb
                        :sem {:pred :send}}}
@@ -258,7 +258,8 @@
                        :sem {:pred :earn
                              :subj {:human true}}}}
              {:synsem {:cat :verb
-                       :sem {:pred :win}}}]
+                       :sem {:pred :win
+                             :subj {:human true}}}}]

    "gérer" {:synsem {:cat :verb
                     :sem {:pred :manage}}}


[page-inbox] Change canonical inbox thread order

Now: thread with most recent activity first
Prev: thread with most recent activity of logged-in user first
Note: this is just the canonical ordering; the inbox still preserves state to avoid jumping of threads while viewing inbox

--- src/braid/page_inbox/core.cljc
+++ src/braid/page_inbox/core.cljc
@@ -39,8 +39,7 @@
           ;; TODO could be made more efficient by depending on other subs
           ;; or using reg-sub-raw and reactions
           (fn [state [_ group-id]]
-            (let [user-id (get-in state [:session :user-id])
-                  open-thread-ids (get-in state [:user :open-thread-ids])
+            (let [open-thread-ids (get-in state [:user :open-thread-ids])
                   threads (state :threads)
                   open-threads (vals (select-keys threads open-thread-ids))]
               (->> open-threads
@@ -50,7 +49,6 @@
                    (sort-by
                      (fn [thread]
                        (->> (thread :messages)
-                            (filter (fn [m] (= (m :user-id) user-id)))
                             (map :created-at)
                             (apply max))))
                    reverse)))})


Eval the data elements that are functions

--- src/clj/comic_reader/sites.clj
+++ src/clj/comic_reader/sites.clj
@@ -57,10 +57,10 @@
   (:root-url options))

 (defn link-url-normalize []
-  (:link-url-normalize options))
+  (eval (:link-url-normalize options)))

 (defn link-name-normalize []
-  (:link-name-normalize options))
+  (eval (:link-name-normalize options)))

 (defn manga-pattern-match-portion []
   (:manga-pattern-match-portion options))


fix to many args in if

fix to many args in if

--- src/clj/reader_web_app/fsw.clj
+++ src/clj/reader_web_app/fsw.clj
@@ -37,7 +37,7 @@
   (if (nil? data)
     nil
     (case (str k)
-      "image" (saver (javax.xml.bind.DatatypeConverter/parseBase64Binary (first (xml/content data))) (str cover-path uuid) ".jpeg"))
+      "image" (saver (javax.xml.bind.DatatypeConverter/parseBase64Binary (first (xml/content data))) (str cover-path uuid) ".jpeg")
       "body" (let [bp (str body-path uuid ".xml")]
-        (spit bp data)
-        bp)))) ; (saver (.toCharArray data) (str body-path (.toString (char-array 29)) ".xml"))+               (spit bp data)
+               bp)))) ; (saver (.toCharArray data) (str body-path (.toString (char-array 29)) ".xml"))


Rename loop parameters

Rename loop parameters

--- src/clj_gatling/simulation.clj
+++ src/clj_gatling/simulation.clj
@@ -73,16 +73,16 @@
   RunnerProtocol
   (run-requests-constantly [_ cs timeout scenario scenario-start concurrency]
     (let [results (async/chan)]
-      (go-loop [^long i 0]
+      (go-loop [^long requests-left number-of-requests
+                ^long user-id concurrency]
         (let [[result c] (alts! cs)]
-          (when (< (+ i concurrency) number-of-requests)
-            (run-requests (:requests scenario) timeout (+ i concurrency) c))
+          (when (< user-id number-of-requests)
+            (run-requests (:requests scenario) timeout user-id c))
           (>! results (response->result scenario result))
-          (when (< i number-of-requests)
-            (recur (inc i)))))
+          (when (> requests-left 0)
+            (recur (dec requests-left) (inc user-id)))))
       results))
   (runner-info [_] (str "requests " number-of-requests)))
-

 (defn- request-result [id request-name success start]
   {:id id :name request-name :result success :start start :end (now)})


correct column sizing

correct column sizing

--- src/clj_money/web/accounts.clj
+++ src/clj_money/web/accounts.clj
@@ -61,7 +61,7 @@
       [:div.col-md-6
        [:table.table.table-striped
         [:tr
-         [:th.col-md-10 "Name"]
+         [:th.col-sm-10 "Name"]
          [:th.col-sm-2 " "]]
         (let [groups (accounts/select-nested-by-entity-id (env :db) (Integer. entity-id))]
           (map account-rows groups))]


made trace-var button use action such that all buttons & menu-items share handler and state  - sweet

--- src/clj_ns_browser/browser.clj
+++ src/clj_ns_browser/browser.clj
@@ -361,9 +361,16 @@
                                (.start (seesaw.meta/get-meta root :auto-refresh-browser-timer))
                                (.stop (seesaw.meta/get-meta root :auto-refresh-browser-timer)))))))

+(add-app-action :var-trace-btn-action
+  (action :name "Trace Var"
+          :enabled? false
+          :handler (fn [e] (let [root (to-root e)]
+                             (letfn [(id [kw] (select-id root kw))]
+                               (swap! (id :var-trace-btn-atom) not))))))
+
 (add-app-action :ns-trace-btn-action
   (action :name "Trace NS"
-          :enabled? true
+          :enabled? false
           :handler (fn [e] (let [root (to-root e)]
                              (letfn [(id [kw] (select-id root kw))]
                                (when-let [ns-str (selection (id :ns-lb))]
@@ -374,7 +381,7 @@

 (add-app-action :ns-untrace-btn-action
   (action :name "Untrace NS"
-          :enabled? true
+          :enabled? false
           :handler (fn [e] (let [root (to-root e)]
                              (letfn [(id [kw] (select-id root kw))]
                                (when-let [ns-str (selection (id :ns-lb))]
@@ -396,18 +403,18 @@
     (config! (id :vars-lb) :model [])
     (config! (id :ns-entries-lbl) :text "0")
     (config! (id :ns-require-btn) :enabled? false)
+    (config! (id :ns-require-btn) :text "Require")
     (config! (id :doc-cbx) :model doc-cbx-value-list)
     (config! (id :edit-btn) :enabled? false)
     (config! (id :browse-btn) :enabled? false)
-    (config! (id :var-trace-btn) :enabled? false)
     (config! (id :clojuredocs-online-rb) :selected? true)
     (config! (id :inspect-btn) :enabled? false)
     (listen (id :inspect-btn)
       :action (fn [event] (swap! (id :inspect-btn-atom) not)))
     (listen (id :ns-require-btn)
       :action (fn [event] (swap! (id :ns-require-btn-atom) not)))
-    (listen (id :var-trace-btn)
-      :action (fn [event] (swap! (id :var-trace-btn-atom) not)))
+    (config! (id :var-trace-btn)
+      :action (id :var-trace-btn-action))
     (listen (id :browse-btn)
       :action (fn [event] (swap! (id :browse-btn-atom) not)))
     (listen (id :edit-btn)
@@ -454,7 +461,6 @@
       (b/transform widget-model-count (id :vars-lb))
       (id :vars-entries-lbl))
     ;; new ns selected in ns-lb =>
-    ;; dis/enable var-trace-btn
     (b/bind
       (b/selection (id :doc-tf))
       (b/transform
@@ -463,14 +469,14 @@
             (let [vr (resolve-fqname fqn)]
               (if (var-traceable? vr)
                 (do (if (var-traced? vr)
-                      (config! (id :var-trace-btn) :text "untrace")
-                      (config! (id :var-trace-btn) :text "trace"))
+                      (config! (id :var-trace-btn-action) :name "Untrace Var")
+                      (config! (id :var-trace-btn-action) :name "Trace Var"))
                     true)
-                (do (config! (id :var-trace-btn) :text "trace")
+                (do (config! (id :var-trace-btn-action) :name "Trace Var")
                     false)))
-            (do (config! (id :var-trace-btn) :text "trace")
+            (do (config! (id :var-trace-btn-action) :name "Trace Var")
                 false))))
-      (b/property (id :var-trace-btn) :enabled?))
+      (b/property (id :var-trace-btn-action) :enabled?))
     ;; dis/enable require-btn, update fqn in doc-tf, scroll within view
     (b/bind
       (b/selection (id :ns-lb))
@@ -525,9 +531,9 @@
               (when (var-traceable? vr)
                 (if (var-traced? vr)
                   (do (clojure.tools.trace/untrace-var* vr)
-                      (config! (id :var-trace-btn) :text "trace"))
+                      (config! (id :var-trace-btn-action) :name "Trace Var"))
                   (do (clojure.tools.trace/trace-var* vr)
-                      (config! (id :var-trace-btn) :text "untrace")))
+                      (config! (id :var-trace-btn-action) :name "Untrace Var")))
                 (selection! (id :vars-lb) (selection (id :vars-lb)))))))))
     ;;
     ;; select item in vars-lb => set associated fqn in doc-tf
@@ -880,9 +886,9 @@
       (config! edit-menu :items [(id :copy-fqn-action) (id :fqn-from-clipboard-action)
                                  (id :fqn-from-selection-action) (id :open-url-from-selection-action)])

-      (config! ns-menu :items ["Load" :separator (id :ns-trace-btn-action) (id :ns-untrace-btn-action)])
-
-      (config! vars-menu :items ["Trace" "Un-Map" "Un-Alias" :separator vars-categorized-cb vars-fqn-listing-cb vars-search-doc-also-cb])
+      (config! ns-menu :items ["Require" :separator (id :ns-trace-btn-action) (id :ns-untrace-btn-action)])
+
+      (config! vars-menu :items [(id :var-trace-btn-action) "Un-Map" "Un-Alias" :separator vars-categorized-cb vars-fqn-listing-cb vars-search-doc-also-cb])

       (config! auto-refresh-browser-cb
@@ -931,7 +937,7 @@
       (config! ns-lb-popup :items [(id :new-browser-action) :separator (id :copy-fqn-action)
                                     (id :fqn-from-clipboard-action) (id :fqn-from-selection-action)
                                     (id :open-url-from-selection-action) :separator
-                                    "Load" :separator
+                                    "Require" :separator
                                     (id :ns-trace-btn-action) (id :ns-untrace-btn-action)
                                     ;;:separator auto-refresh-browser-cb
                                     ])
@@ -940,7 +946,7 @@
       (config! vars-lb-popup :items [(id :new-browser-action) :separator (id :copy-fqn-action)
                                     (id :fqn-from-clipboard-action) (id :fqn-from-selection-action)
                                     (id :open-url-from-selection-action) :separator
-                                    "Trace" "Un-Map" "Un-Alias"
+                                    (id :var-trace-btn-action) :separator "Un-Map" "Un-Alias"
                                     ;;:separator vars-categorized-cb
                                     ;;vars-fqn-listing-cb vars-search-doc-also-cb
                                     ;;:separator auto-refresh-browser-cb


Fix scroll-to in firefox

Fix scroll-to in firefox

--- src/cljs/clojuredocs/anim.cljs
+++ src/cljs/clojuredocs/anim.cljs
@@ -21,12 +21,14 @@
 (defn scroll-to
     [elem & [{:keys [pad]}]]
     (let [body (sel1 :body)
-          start (.-scrollTop body)
+          html (sel1 :html)
+          start (max  (.-scrollTop body) (.-scrollTop html))
           end (- (offset-top elem) pad)]
       (.tween js/morpheus
         250
         (fn [pos]
-          (aset body "scrollTop" pos))
+          (aset body "scrollTop" pos)
+          (aset html "scrollTop" pos))
         nil
         nil
         start


update factory

update factory

--- src/cljs/material/factory.cljs
+++ src/cljs/material/factory.cljs
@@ -60,6 +60,7 @@
 (def card (create-factory js/MaterialUI.Card))
 (def card-header (create-factory js/MaterialUI.CardHeader))
 (def card-content (create-factory js/MaterialUI.CardContent))
+(def card-actions (create-factory js/MaterialUI.CardActions))

 (def visibility-icon (create-factory js/MaterialUIIcons.Visibility))
 (def visibility-off-icon (create-factory js/MaterialUIIcons.VisibilityOff))
@@ -81,7 +82,12 @@
 (def warning-icon (create-factory js/MaterialUIIcons.Warning))
 (def cancel-icon (create-factory js/MaterialUIIcons.Cancel))
 (def sync-icon (create-factory js/MaterialUIIcons.Sync))
-
+(def access-time-icon (create-factory js/MaterialUIIcons.AccessTime))
+(def fingerprint-icon (create-factory js/MaterialUIIcons.Fingerprint))
+(def check-icon (create-factory js/MaterialUIIcons.Check))
+(def close-icon (create-factory js/MaterialUIIcons.Close))
+(def add-circle-icon (create-factory js/MaterialUIIcons.AddCircle))
+(def more-icon (create-factory js/MaterialUIIcons.MoreVert))


Fix typo.

Fix typo.

--- src/clojure/buddy/core/kdf.clj
+++ src/clojure/buddy/core/kdf.clj
@@ -137,8 +137,8 @@
   KDFType
   (generate-bytes! [obj length] (generate-bytes-impl impl length)))

-(alter-meta! #'->FMKDF assoc :no-doc true :private true)
-(alter-meta! #'map->FMKDF assoc :no-doc true :private true)
+(alter-meta! #'->DPIMKDF assoc :no-doc true :private true)
+(alter-meta! #'map->DPIMKDF assoc :no-doc true :private true)

 (defn dpimkdf
   "Double-Pipeline Iteration Mode KDF defined by the publicly


Allow additional arguments to be sent to the run/repl/build commands

--- src/clojure/nightcode/lein.clj
+++ src/clojure/nightcode/lein.clj
@@ -74,7 +74,7 @@
       (.waitFor @process))))

 (defn start-process-command
-  [process cmd path]
+  [process cmd path args]
   (let [project-map (read-project-clj path)
         java-cmd (or (:java-cmd project-map) (System/getenv "JAVA_CMD") "java")]
     (start-process process
@@ -83,7 +83,8 @@
                    (System/getProperty "java.class.path" ".")
                    namespace-name
                    cmd
-                   path)))
+                   path
+                   (or args []))))

 (defn stop-process
   [process]
@@ -139,31 +140,31 @@
     (start-process process cmd)))

 (defn run-project
-  [process thread in out path]
+  [process thread in out path & args]
   (stop-process process)
   (stop-thread thread)
   (->> (do (println (utils/get-string :running))
          (if (is-android-project? path)
-           (start-process-command process "run-android" path)
+           (start-process-command process "run-android" path args)
            (run-project-fast process path)))
        (start-thread thread in out)))

 (defn run-repl-project
-  [process thread in out path]
+  [process thread in out path & args]
   (stop-process process)
   (stop-thread thread)
   (->> (do (println (utils/get-string :running_with_repl))
          (let [cmd (if (is-android-project? path) "repl-android" "repl")]
-           (start-process-command process cmd path)))
+           (start-process-command process cmd path args)))
        (start-thread thread in out)))

 (defn build-project
-  [process thread in out path]
+  [process thread in out path & args]
   (stop-process process)
   (stop-thread thread)
   (->> (do (println (utils/get-string :building))
          (let [cmd (if (is-android-project? path) "build-android" "build")]
-           (start-process-command process cmd path)))
+           (start-process-command process cmd path args)))
        (start-thread thread in out)))

 (defn test-project
@@ -211,17 +212,17 @@
        (start-thread thread in out)))

 (defn -main
-  [& args]
+  [cmd path & args]
   (System/setProperty "jline.terminal" "dumb")
-  (let [project-map (read-project-clj (nth args 1))]
-    (case (nth args 0)
-      "run" (leiningen.run/run project-map)
-      "run-android" (doseq [cmd ["build" "apk" "install" "run"]]
-                      (leiningen.droid/droid project-map cmd))
-      "build" (leiningen.uberjar/uberjar project-map)
-      "build-android" (leiningen.droid/droid project-map "release")
-      "repl" (leiningen.repl/repl project-map)
-      "repl-android" (doseq [cmd ["doall" "repl"]]
-                       (leiningen.droid/droid project-map cmd)
+  (let [project-map (read-project-clj path)]
+    (case cmd
+      "run" (apply leiningen.run/run project-map args)
+      "run-android" (doseq [sub-cmd ["build" "apk" "install" "run"]]
+                      (apply leiningen.droid/droid project-map sub-cmd args))
+      "build" (apply leiningen.uberjar/uberjar project-map args)
+      "build-android" (apply leiningen.droid/droid project-map "release" args)
+      "repl" (apply leiningen.repl/repl project-map args)
+      "repl-android" (doseq [sub-cmd ["doall" "repl"]]
+                       (apply leiningen.droid/droid project-map sub-cmd args)
                        (Thread/sleep 10000))
       nil)))


Updated logging level.

Updated logging level.

--- src/cmr/opendap/auth/token.clj
+++ src/cmr/opendap/auth/token.clj
@@ -24,7 +24,7 @@

 (defn parse-token-data
   [xml-str]
-  (log/debug "Got token XML data:" xml-str)
+  (log/trace "Got token XML data:" xml-str)
   (first
     (remove nil?
       (mapcat #(when (map? %)


CMR-5199 Adds import java.util.UUID to handler.clj.

--- src/cmr/sizing/app/handler.clj
+++ src/cmr/sizing/app/handler.clj
@@ -4,7 +4,9 @@
    [cmr.authz.token :as token]
    [cmr.http.kit.response :as response]
    [cmr.sizing.core :as sizing]
-   [taoensso.timbre :as log]))
+   [taoensso.timbre :as log])
+  (:import
+    (java.util UUID)))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;   Size Estimate Handlers   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -15,7 +17,7 @@
   (fn [req]
     (log/debug "Estimating download size based on HTTP GET ...")
     (let [user-token (token/extract req)
-          request-id (str (java.util.UUID/randomUUID))
+          request-id (str (UUID/randomUUID))
           concept-id (get-in req [:path-params :concept-id])]
       (->> req
            :params


Changed echo-rest health response format.

--- src/cmr/transmit/echo/rest.clj
+++ src/cmr/transmit/echo/rest.clj
@@ -81,5 +81,9 @@
   [context]
   (let [conn (config/context->app-connection context :echo-rest)
         url (format "%s%s" (conn/root-url conn) "/availability")
-        response (client/get url {:throw-exceptions false})]
-    (if (= 200 (:status response)) "ok" "down")))
+        response (client/get url {:throw-exceptions false})
+        status-code (:status response)]
+    (if (= 200 status-code)
+      {:ok? true}
+      {:ok? false
+       :problem (format "Recieved %d from availability check. %s" status-code (:body response))})))


Inline hash function

Inline hash function

--- src/aurora/language.cljs
+++ src/aurora/language.cljs
@@ -8,22 +8,6 @@
 ;; TODO facts and plans need to be serializable

 ;; FACTS
-
-(defn- hash-array [array]
-  (if (> (alength array) 0)
-    (loop [result (hash (aget array 0))
-           i 1]
-      (if (< i (alength array))
-        (recur (hash-combine result (hash (aget array i))) (+ i 1))
-        result))
-    0))
-
-(defn- hash-fact [fact]
-  (hash-array (.-values fact)))
-
-(comment
-  (= (hash-array #js [1 2 :c]) (hash [1 2 :c]))
-  )

 (deftype FactShape [id madlib keys]
   Object
@@ -55,7 +39,18 @@
                      false)))))

   IHash
-  (-hash [this] (caching-hash this hash-fact __hash))
+  (-hash [this]
+         (if __hash
+           __hash
+           (let [hash (if (> (alength values) 0)
+                        (loop [result (hash (aget values 0))
+                               i 1]
+                          (if (< i (alength values))
+                            (recur (hash-combine result (hash (aget values i))) (+ i 1))
+                            result))
+                        0)]
+             (set! __hash hash)
+             hash)))

   IIndexed
   (-nth [this n]


remove Italian semantic info that is not used in English for generation

--- src/babel/directory.cljc
+++ src/babel/directory.cljc
@@ -25,7 +25,12 @@
                           (let [model (babel.english.grammar/medium)]
                             (log/debug (str "finished loading english model."))
                             (conj model
-                                  {:generate-fn (fn [spec]
+                                  {:semantic-correspondence {:it [[:obj :null]
+                                                                  [:obj :number]
+                                                                  [:shared-with-obj]
+                                                                  [:subj :null]
+                                                                  [:subj :number]]}
+                                   :generate-fn (fn [spec]
                                                   (en/generate spec :model model))}))))))
      :es (fn []
            (if (realized? es)


Aws options

Aws options

--- test/celestial/test/config.clj
+++ test/celestial/test/config.clj
@@ -6,17 +6,22 @@
     [celestial.config :only (validate-conf proxmox-v)]))

 (defn validate-missing [& ks]
- (-> (validate-conf (dissoc-in* local-prox ks)) :bouncer.core/errors vals))
+  (-> (validate-conf (dissoc-in* local-prox ks)) :bouncer.core/errors vals))

 (fact "legal configuration"
-     (:bouncer.core/errors (validate-conf local-prox))  => nil)
+      (:bouncer.core/errors (validate-conf local-prox))  => nil)

 (fact "missing celestial options detected"
-     (validate-missing :celestial :https-port) => (contains {:https-port '("https-port must be present")})
-     (validate-missing :celestial :port) => (contains {:port '("port must be present")}))
+      (validate-missing :celestial :https-port) => (contains {:https-port '("https-port must be present")})
+      (validate-missing :celestial :port) => (contains {:port '("port must be present")}))

 (fact "missing proxmox options"
       (validate-missing :hypervisor :proxmox :password) =>
       (contains {:proxmox {:password '("password must be present")}} ))

+(fact "missing aws options"
+      (get-in
+        (validate-conf
+          (assoc-in local-prox [:hypervisor :aws] {})) [:bouncer.core/errors :hypervisor :aws]) =>
+      (contains {:access-key '("access-key must be present")}))


correct expectation

correct expectation

--- test/clj_money/import_test.clj
+++ test/clj_money/import_test.clj
@@ -211,7 +211,8 @@
 (def ^:private expected-lots
   [{:purchase-date (t/local-date 2015 1 17)
     :shares-purchased 100M
-    :shares-owned 100M}])
+    :shares-owned 100M
+    :purchase-price 10M}])

 (def ^:private expected-prices
   #{{:trade-date (t/local-date 2015 1 17)


set test mode to start without worker.  all tests pass locally.  last commit was the same but travis failed

--- test/lcmap/aardvark/shared.clj
+++ test/lcmap/aardvark/shared.clj
@@ -11,7 +11,8 @@
   [& body]
   `(let [cfg# (edn/read-string (slurp (io/resource "lcmap-landsat.edn")))]
      (log/debugf "starting test system with config: %s" cfg#)
-     (mount/start (mount/with-args {:config cfg#}))
+     (mount/start-without #'lcmap.aardvark.worker/worker-consumer
+                          (mount/with-args {:config cfg#}))
      (try
        (do ~@body)
        (finally


removing try/catch from the tests as we want them to fail if there is an exception

--- test/org/akvo/resumed_test.clj
+++ test/org/akvo/resumed_test.clj
@@ -140,59 +140,55 @@
 (deftest java-client
   (testing "Java client"
     (let [handler (make-handler)
-          srv (jetty/run-jetty handler {:port 0 :join? false})
-          port (port srv)
-          client (TusClient.)
-          _ (.setUploadCreationURL client (URL. (format "http://localhost:%s/" port)))
-          _ (.enableResuming client (TusURLMemoryStore.) )
-          f (io/file (io/resource "resources/pg11.txt"))
-          upload (TusUpload. f)
-          uploader (.resumeOrCreateUpload client upload)
-          chunk-size 1024
-          _ (.setChunkSize uploader chunk-size)]
-      (loop [up (.uploadChunk uploader)]
-        (when (> up -1)
-          (is (> (.getOffset uploader) 0))
-          (recur (.uploadChunk uploader))))
+          srv (jetty/run-jetty handler {:port 0 :join? false})]
       (try
-        (.finish uploader)
-        (catch Exception e
-          (.printStackTrace e)))
-      (.stop srv))))
+        (let [port (port srv)
+              client (TusClient.)
+              _ (.setUploadCreationURL client (URL. (format "http://localhost:%s/" port)))
+              _ (.enableResuming client (TusURLMemoryStore.))
+              f (io/file (io/resource "resources/pg11.txt"))
+              upload (TusUpload. f)
+              uploader (.resumeOrCreateUpload client upload)
+              chunk-size 1024
+              _ (.setChunkSize uploader chunk-size)]
+          (loop [up (.uploadChunk uploader)]
+            (when (> up -1)
+              (is (> (.getOffset uploader) 0))
+              (recur (.uploadChunk uploader))))
+          (.finish uploader))
+        (finally
+          (.stop srv))))))

 (deftest java-client-resume
   (testing "Java client - resuming"
     (let [handler (make-handler)
-          srv (jetty/run-jetty handler {:port 0 :join? false})
-          port (port srv)
-          client (TusClient.)
-          _ (.setUploadCreationURL client (URL. (format "http://localhost:%s/" port)))
-          _ (.enableResuming client (TusURLMemoryStore.) )
-          f (io/file (io/resource "resources/pg11.txt"))
-          limit (/ (.length f) 2)
-          upload1 (TusUpload. f)
-          upldr (.resumeOrCreateUpload client upload1)
-          chunk-size 1024
-          _ (.setChunkSize upldr chunk-size)
-          _ (loop [up (.uploadChunk upldr)] ;; upload first half
-              (when (and (> up -1) (< (.getOffset upldr) limit))
-                (recur (.uploadChunk upldr))))
-          _ (try
-              (.finish upldr)
-              (catch Exception e
-                (.printStackTrace e)))
-          upload2 (TusUpload. f) ;; resume
-          upldr2 (.resumeOrCreateUpload client upload2)
-          _ (.setChunkSize upldr2 chunk-size)]
-      (loop [up (.uploadChunk upldr2)]
-        (when (> up -1)
-          (is (> (.getOffset upldr2) 0))
-          (recur (.uploadChunk upldr2))))
+          srv (jetty/run-jetty handler {:port 0 :join? false})]
       (try
-        (.finish upldr2)
-        (catch Exception e
-          (.printStackTrace e)))
-      (.stop srv))))
+        (let [port (port srv)
+              client (TusClient.)
+              _ (.setUploadCreationURL client (URL. (format "http://localhost:%s/" port)))
+              _ (.enableResuming client (TusURLMemoryStore.))
+              f (io/file (io/resource "resources/pg11.txt"))
+              limit (/ (.length f) 2)
+              upload1 (TusUpload. f)
+              upldr (.resumeOrCreateUpload client upload1)
+              chunk-size 1024
+              _ (.setChunkSize upldr chunk-size)
+              _ (loop [up (.uploadChunk upldr)]             ;; upload first half
+                  (when (and (> up -1) (< (.getOffset upldr) limit))
+                    (recur (.uploadChunk upldr))))
+              _ (.finish upldr)
+              upload2 (TusUpload. f)                        ;; resume
+              upldr2 (.resumeOrCreateUpload client upload2)
+              _ (.setChunkSize upldr2 chunk-size)]
+          (loop [up (.uploadChunk upldr2)]
+            (when (> up -1)
+              (is (> (.getOffset upldr2) 0))
+              (recur (.uploadChunk upldr2))))
+          (.finish upldr2)
+          (.stop srv))
+        (finally
+          (.stop srv))))))

 (deftest google-cloud-load-balancer-complience
   (testing "Lack of x-forwarded-host should fallback on host header"


Refactor, simplify

Refactor, simplify

--- src/buildviz/jobinfo.clj
+++ src/buildviz/jobinfo.clj
@@ -10,18 +10,10 @@
   (filter schema/build-with-outcome? build-data-entries))

-(defn- build-inputs-as-map [build]
-  (let [inputs (:inputs build)
-        input-map (->> inputs
-                       (map (fn [{id :id revision :revision}] {id revision}))
-                       (into {}))]
-    (assoc build :inputs input-map)))
-
 (defn builds-grouped-by-same-inputs [builds]
   (->> builds
        (filter :inputs)
-       (map build-inputs-as-map)
-       (group-by :inputs)
+       (group-by #(set (:inputs %)))
        vals))

 ;; flaky builds