cleanup

cleanup

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -31,9 +31,7 @@
 (defn generate
   "Return one expression matching spec _spec_ given the model _model_."
   ([spec]
-   (binding [model model
-             index-fn index-fn]
-     (first (gen spec))))
+   (first (gen spec)))

   ([spec model]
    (log/debug (str "(generate) with model named: " (:name model)


move lazy-seq

move lazy-seq

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -85,14 +85,14 @@
    at each supplied path in comp-paths, the bolts for that path."
   [bolt model comp-paths bolts-at-paths depth max-depth & [top-bolt truncate? take-n]]
   (when (not (= :fail bolt))
-    (lazy-seq
-     (let [top-bolt (or top-bolt bolt)
-           truncate? (if (= truncate? false)
-                       false
-                       true)]
-       (if (empty? comp-paths)
-         [bolt] ;; done: we've added all the comps to the bolt, so just return the bolt as a singleton vector.
-         ;; else, more comp-paths to go.
+    (let [top-bolt (or top-bolt bolt)
+          truncate? (if (= truncate? false)
+                      false
+                      true)]
+      (if (empty? comp-paths)
+        [bolt] ;; done: we've added all the comps to the bolt, so just return the bolt as a singleton vector.
+        ;; else, more comp-paths to go.
+        (lazy-seq
          (flatten
           (mapfn #(add-comps % model
                              (rest comp-paths)


revert back to previous (defn add-all-comps-with-paths)

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -90,30 +90,30 @@
   (lazy-mapcat
    (fn [bolt]
      (log/debug (str "add-all-comps: adding comps to bolt: " (show-bolt bolt language-model)))
-     (add-all-comps-with-paths bolt language-model total-depth
+     (add-all-comps-with-paths [bolt] language-model total-depth
                                (find-comp-paths-in (bolt-depth bolt))
                                truncate-children max-total-depth))
    bolts))

-(defn add-all-comps-with-paths [bolt language-model total-depth comp-paths truncate-children max-total-depth]
+(defn add-all-comps-with-paths [bolts language-model total-depth comp-paths truncate-children max-total-depth]
   (if (not (empty? comp-paths))
-    (let [path (first comp-paths)]
+    (let [path (first comp-paths)
+          result
+             (lazy-mapcat
+              (fn [bolt]
+                (add-complement-to-bolt bolt path
+                                        language-model (+ total-depth (count path))
+                                        :max-total-depth max-total-depth
+                                        :truncate-children truncate-children))
+              bolts)]
       (add-all-comps-with-paths
-       (lazy-mapcat
-        (fn [bolt]
-          (log/trace (str "add-all-comps-with-paths: " (show-bolt bolt language-model)
-                          "@[" (string/join " " path) "]" "^" total-depth))
-          (add-complement-to-bolt bolt path
-                                  language-model (+ total-depth (count path))
-                                  :max-total-depth max-total-depth
-                                  :truncate-children truncate-children))
-        [bolt])
+       result
        language-model
        total-depth
        (rest comp-paths)
        truncate-children
        max-total-depth))
-    bolt))
+    bolts))

 (defn bolt-depth [bolt]
   (if-let [head (get-in bolt [:head] nil)]


rewriting comp-paths-to-complements recursively to hopefully get an exit-early performance boost on a path with no complements

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -171,6 +171,12 @@
       (log/trace (str "language-model has no default function."))
       tree)))

+(defn comp-paths-to-complements [bolt comp-paths model depth max-depth]
+  (zipmap comp-paths
+          (map (fn [path]
+                 (filter not-fail? (comp-path-to-complements bolt path model depth max-depth)))
+               comp-paths)))
+
 (defn bolts-with-comps
   "return a lazy sequence of maps. Each member in this lazy sequence
   associates a lightning bolt with the complements of that bolt. The
@@ -184,11 +190,7 @@
           (merge
            {[]
             (filter not-fail? [lb])}
-           (let [comp-paths (find-comp-paths lb)]
-             (zipmap comp-paths
-                     (map (fn [path]
-                            (filter not-fail? (comp-path-to-complements lb path model depth max-depth)))
-                          comp-paths)))))
+           (comp-paths-to-complements lb (find-comp-paths lb) model depth max-depth)))
         (let [bolts (lightning-bolts model spec depth max-depth)]
           (if (empty? bolts)
             (do
@@ -197,6 +199,8 @@
             (do
               (log/debug (str "bolts-with-comps:" depth "/" max-depth ":" (strip-refs spec) ": one or more bolts found."))
               bolts)))))
+
+

 ;; TODO: lightning-bolts should use this.
 (defn get-lexemes [model spec]


remove excess debugging

remove excess debugging

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -167,7 +167,6 @@
                                            (+ 1 depth) max-depth)))
         lexemes-before-phrases
         (or true (lexemes-before-phrases depth max-depth))]
-    (if (not (nil? bolts-at)) (log/info (str "realized? of bolts-at:" (realized? bolts-at))))
     (cond (nil? bolts-at)
           (lazy-seq lexemes)
           lexemes-before-phrases


(defn generate): transmit :do-enrich option (if given) to engine/generate

--- src/babel/italiano.cljc
+++ src/babel/italiano.cljc
@@ -69,12 +69,14 @@

 (defn generate
   [spec & [model
-           {:keys [max-total-depth truncate-children]
-            :or {max-total-depth generate/max-total-depth
+           {:keys [do-enrich max-total-depth truncate-children]
+            :or {do-enrich true
+                 max-total-depth generate/max-total-depth
                  truncate-children true}}]]
   (log/debug (str "generating with spec: " (strip-refs spec) " with max-total-depth: " max-total-depth))
   (let [model (if model model medium)]
     (let [result (engine/generate spec model
+                                  :do-enrich do-enrich
                                   :max-total-depth max-total-depth
                                   :truncate-children truncate-children)]
       (if result


my clojure version

my clojure version

--- ipd.clj
+++ ipd.clj
@@ -1,58 +1,33 @@
 (defn prisoner [name strategy]
-  {:name name :strategy strategy :moves '() :scores '() :total-score 0})
+  {:name name :strategy strategy})

-(def defect 0)
+(def score {
+    [:cooperate :defect] [0 5]
+    [:defect :defect] [1 1]
+    [:cooperate :cooperate] [1 1]
+    [:defect :cooperate] [5 0]})

-(def cooperate 1)
+(defn game
+  [p1 p2]
+  (let [s1 (partial (:strategy p1) p2)
+        s2 (partial (:strategy p2) p1)]
+    (repeatedly
+     (fn []
+       (score [(s1) (s2)])))))

-(defn AlwaysDefect [mover opponent]
-  defect)
+(defn game-score
+  [result]
+  [(reduce + (map first result))
+   (reduce + (map second result))])

-(defn AlwaysCooperate [mover opponent]
-  cooperate)
+(defn play-game
+  [moves-count a b]
+  (->> (game a b)
+       (take moves-count)
+       game-score))

-(defn game [& prisoners]
-  (map (fn [mover opponent]
-         (->> (map :moves [mover, opponent])
-              (apply (:strategy mover))
-              (update-in mover [:moves] conj)))
-        prisoners
-        (reverse prisoners)))
-
-(defn iterated-game [iterations & prisoners]
-  (reduce (fn [ps _] (apply game ps))
-          prisoners
-          (range 0 iterations)))
-
-(def scores {[1 0] 0
-             [0 0] 1
-             [1 1] 3
-             [0 1] 5})
-
-(defn compute-scores [prisoners moves]
-  (map (fn [prisoner moves]
-         (let [point (get scores moves)
-               scores (:scores prisoner)
-               total (:total-score prisoner)]
-           (assoc prisoner
-             :scores (conj scores point)
-             :total-score (+ total point))))
-       prisoners
-       [moves (reverse moves)]))
-
-(defn total-scores [& prisoners]
-  (let [move-pairs (->> (map :moves prisoners)
-                        (apply interleave)
-                        (partition 2))]
-    (reduce compute-scores prisoners move-pairs)))
-
-(->> [(prisoner :a AlwaysCooperate) (prisoner :b AlwaysDefect)]
-     (apply iterated-game 10)
-     (apply total-scores)
-     (map (fn [prisoner]
-            (format "Prisoner %s (%s): %d"
-                    (-> (:name prisoner) name .toUpperCase)
-                    (->> (:strategy prisoner) str (re-matches #".*\$(.*)\@.*") last)
-                    (:total-score prisoner))))
-     (clojure.string/join "\n")
-      println)
+(let [[a-score b-score] (play-game 10
+                                   (prisoner "A" (constantly :cooperate))
+                                   (prisoner "B" (constantly :defect)))]
+  (println "Prisoner A (AlwaysCooperate):" a-score)
+  (println "Prisoner B (AlwaysDefect)   :" b-score))


Adding faq to linux plans.

Adding faq to linux plans.

--- src-cljs/frontend/components/org_settings.cljs
+++ src-cljs/frontend/components/org_settings.cljs
@@ -278,6 +278,34 @@
     :answer ["We also offer the Seed plan for OS X open-source projects. Contact us at "
              [:a {:href "mailto:billing@circleci.com"} "billing@circleci.com"]
              " for access. If you are building a bigger open-source project and need more resources, let us know how we can help you!"]}])
+
+(def linux-faq-items
+  [{:question "How do I get started?"
+    :answer [[:div "Linux plans start with the ability to run one build simultaneously without parallelism at no charge. Open source projects get 3 additional free containers, so you can use the power of parallelism and/or run more than one build concurrently. Purchasing a Linux plan enables access to additional containers at $50/container/month."]
+             [:div "During the signup process, you can decide which plan(s) you need - you can build for free regardless!"]]}
+
+   {:question "How do containers work?"
+    :answer ["Every time you push to your VCS system, we checkout your code and run your build inside of a fresh, on-demand, and isolated Linux container pre-loaded with most popular languages, tools, and framework. CircleCI, in many cases, will detect and automatically download and cache your dependencies, and you can fully script any steps or integrations."]}
+
+   {:question "What is concurrency? What is parallelism?"
+    :answer [[:div "Concurrency refers to utilizing multiple containers to run multiple builds at the same time. Otherwise, if you don't have enough free containers available, your builds queue up until other builds finish."]
+             [:div "Parallelism splits a given build’s tests across multiple containers, allowing you to dramatically speed up your test suite. This enables your developers to finish even the most test-intensive builds in a fraction of the time."]]}
+
+   {:question "How many containers do I need?"
+    :answer ["Most of our customers tend to use about 2-3 containers per full-time developer. Every team is different, however, and we're happy to set you up with a trial to help you figure out how many works best for you. As your team grows and/or as the speed of your build grows you can scale to any number of containers at any level of parallelism and concurrency is right for your team."]}
+
+   {:question "Why should I trust CircleCI with my code?"
+    :answer ["Security is one of our top priorities. Read our security policy to learn more about why many other customers rely on CircleCI to keep their code safe."]}
+
+   {:question "Can I change my plan at a later time? Can I cancel anytime?"
+    :answer ["Yes and yes! We offer in-app tools to fully control your plan and have account managers and an international support team standing by when you need help."]}
+
+   {:question "What if I want something custom?"
+    :answer ["Feel free to contact us "
+             [:a {:href "mailto:billing@circleci.com"} "billing@circleci.com"]]}
+
+   {:question "What if I am building open-source?"
+    :answer ["We offer a total of four free linux containers ($2400 annual value) for open-source projects. Simply keeping your project public will enable this for you!"]}])

 (defn faq-answer [answer]
   (apply merge [:dd]
@@ -611,7 +639,7 @@
              (condp = selected-tab
                :linux [:div.card
                        (om/build linux-plan {:app app :checkout-loaded? checkout-loaded?})
-                       (project-common/mini-parallelism-faq {})]
+                       (om/build faq linux-faq-items)]

                :osx [:div.card
                      (om/build osx-plans-list-ga plan)


access private field `speed` of `Application`

--- src/maqueta/hello/input_system.clj
+++ src/maqueta/hello/input_system.clj
@@ -3,6 +3,13 @@
   (:import (com.jme3.math ColorRGBA Vector3f)
            com.jme3.scene.Geometry
            com.jme3.scene.shape.Box))
+
+(defn get-speed
+  [app]
+  (-> com.jme3.app.Application
+      (.getDeclaredField "speed")
+      (doto (.setAccessible true))
+      (.get app)))

 (def player (let [b (Box. Vector3f/ZERO 1 1 1)
                   geo (Geometry. "Player" b)
@@ -21,21 +28,27 @@
 (defn rotate
   [app value tpf]
   (if @is-running
-    (.rotate player 0 value 0)
+    (.rotate player 0 (* value (get-speed app)) 0)
     (println "Press P to unpause")))

 (defn right
   [app value tpf]
   (if @is-running
     (let [v (.getLocalTranslation player)]
-      (.setLocalTranslation player (+ (.getX v) value) (.getY v) (.getZ v)))
+      (.setLocalTranslation player
+                            (+ (.getX v) (* value (get-speed app)))
+                            (.getY v)
+                            (.getZ v)))
     (println "Press P to unpause")))

 (defn left
   [app value tpf]
   (if @is-running
     (let [v (.getLocalTranslation player)]
-      (.setLocalTranslation player (- (.getX v) value) (.getY v) (.getZ v)))
+      (.setLocalTranslation player
+                            (- (.getX v) (* value (get-speed app)))
+                            (.getY v)
+                            (.getZ v)))
     (println "Press P to unpause")))

 (defn -main


Retry for cases where fspec happens to not catch bug

Since fspec checks are based on test.check, it may occasionally
not happen to generate args that make test fail

--- test/expound/alpha_test.cljc
+++ test/expound/alpha_test.cljc
@@ -1562,6 +1562,21 @@
 (defn my-div [x y]
   (assert (not (zero? (/ x y)))))

+(defmacro until-unsuccessful [form]
+  `(let [nil-or-failure# #(if (= "Success!\n" %)
+                            nil
+                            %)]
+     (or (nil-or-failure# ~form)
+         (nil-or-failure# ~form)
+         (nil-or-failure# ~form)
+         (nil-or-failure# ~form)
+         (nil-or-failure# ~form))
+     )
+
+
+
+  )
+
 (deftest fspec-exception-test
   (testing "args that throw exception"
     (is (= (pf "-- Exception ----------------------
@@ -1589,7 +1604,7 @@

 -------------------------
 Detected 1 error\n")
-           (expound/expound-str :fspec-test/div my-div)))
+           (until-unsuccessful (expound/expound-str :fspec-test/div my-div))))

     (is (= (pf "-- Exception ----------------------

@@ -1617,7 +1632,7 @@

 -------------------------
 Detected 1 error\n")
-           (expound/expound-str (s/coll-of :fspec-test/div) [my-div])))))
+           (until-unsuccessful (expound/expound-str (s/coll-of :fspec-test/div) [my-div]))))))

 (s/def :fspec-ret-test/my-int pos-int?)
 (s/def :fspec-ret-test/plus (s/fspec
@@ -1655,7 +1670,7 @@

 -------------------------
 Detected 1 error\n")
-           (expound/expound-str :fspec-ret-test/plus my-plus)))
+           (until-unsuccessful (expound/expound-str :fspec-ret-test/plus my-plus))))

     (is (= (pf "-- Function spec failed -----------

@@ -1685,7 +1700,7 @@

 -------------------------
 Detected 1 error\n")
-           (expound/expound-str (s/coll-of :fspec-ret-test/plus) [my-plus])))))
+           (until-unsuccessful (expound/expound-str (s/coll-of :fspec-ret-test/plus) [my-plus]))))))

 (s/def :fspec-fn-test/minus (s/fspec
                              :args (s/cat :x int? :y int?)
@@ -1721,7 +1736,7 @@
    (< (:ret %) (-> % :args :x)))"
                   :cljs "(fn [%] (< (:ret %) (-> % :args :x)))"))
            (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
-             (s/explain-str :fspec-fn-test/minus my-minus))))
+             (until-unsuccessful (s/explain-str :fspec-fn-test/minus my-minus)))))

     (is (= (pf "-- Function spec failed -----------

@@ -1746,7 +1761,7 @@
    (< (:ret %) (-> % :args :x)))"
                   :cljs "(fn [%] (< (:ret %) (-> % :args :x)))"))
            (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
-             (s/explain-str (s/coll-of :fspec-fn-test/minus) [my-minus]))))))
+             (until-unsuccessful (s/explain-str (s/coll-of :fspec-fn-test/minus) [my-minus])))))))

 (deftest ifn-fspec-test
   (testing "keyword ifn / ret failure"
@@ -1768,10 +1783,10 @@
 -------------------------
 Detected 1 error\n"
            (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
-             (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
-                            [:foo])))))
-  (testing "set ifn / ret failure"
-    (is (= "-- Function spec failed -----------
+             (until-unsuccessful (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
+                                                [:foo])))))
+    (testing "set ifn / ret failure"
+      (is (= "-- Function spec failed -----------

   [#{}]
    ^^^
@@ -1788,9 +1803,9 @@

 -------------------------
 Detected 1 error\n"
-           (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
-             (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
-                            [#{}])))))
+             (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
+               (until-unsuccessful (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
+                                                  [#{}])))))))
   #?(:clj
      (testing "vector ifn / exception failure"
        (is (= "-- Exception ----------------------
@@ -1811,5 +1826,5 @@
 -------------------------
 Detected 1 error\n"
               (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
-                (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
-                               [[]])))))))
+                (until-unsuccessful (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
+                                                   [[]]))))))))


couple of frontend debugging helpers

couple of frontend debugging helpers

--- frontend/core.cljs
+++ frontend/core.cljs
@@ -285,7 +285,13 @@
     (swap! debug-state assoc-in test-path value)
     (println "value for" test-name "is now" (get-in @debug-state test-path))))

-(defn reinstall-om! []
+(defn ^:export app-state-to-js
+  "Used for inspecting app state in the console."
+  []
+  (clj->js @debug-state))
+
+
+(defn ^:export reinstall-om! []
   (install-om debug-state (find-app-container (find-top-level-node)) (:comms @debug-state) true))

 (defn refresh-css! []


adding vpc with public ip case and enabling all facts on vpc

--- test/celestial/integration/workflows/ec2.clj
+++ test/celestial/integration/workflows/ec2.clj
@@ -27,19 +27,34 @@
           (wf/reload (spec)) => nil
           (wf/destroy (spec)) => nil)

-      (fact "vpc" :integration :ec2 :vpc
+      (fact "vpc public ip" :integration :ec2 :vpc
+        (when-let [subnet (System/getenv "VPC_SUB")]
+          (s/update-system 1
+           (spec {
+             :machine {:os :ubuntu-14.04}
+             :aws {
+               :network-interfaces [
+                  {:device-index 0 :associate-public-ip-address true :subnet-id subnet}
+               ]
+             }}))
+          (wf/create (spec)) => nil
+          (wf/stop (spec)) => nil
+          (wf/reload (spec)) => nil
+          (wf/destroy (spec)) => nil))
+
+      (fact "vpc eip" :integration :ec2 :vpc
         ; will be run only if VPC_SUB env var is defined
         (when-let [eip (System/getenv "EIP")]
           (when-let [subnet (System/getenv "VPC_SUB")]
-           (wf/create (spec {:machine {:ip eip :os :ubuntu-14.04} :aws {:subnet-id subnet}})) => nil
-           #_(wf/stop (spec)) => nil
-           #_(wf/reload (spec {:machine {:ip eip} :aws {:subnet-id subnet}})) => nil
-           ; (instance-desc (get-spec :aws :endpoint) (get-spec :aws :instance-id))
-             ;; => (contains {:public-ip-address eip})
-           ;; (:machine (spec)) => (contains {:ip eip})
-           (wf/destroy (spec)) => nil
-          )))
-
+           (s/update-system 1 (spec {:machine {:ip eip :os :ubuntu-14.04} :aws {:subnet-id subnet}}))
+           (wf/create (spec)) => nil
+           (:machine (spec)) => (contains {:ip eip})
+           (wf/stop (spec)) => nil
+           (wf/reload (spec)) => nil
+           (instance-desc (get-spec :aws :endpoint) (get-spec :aws :instance-id))
+              => (contains {:public-ip-address eip})
+           (wf/destroy (spec)) => nil)))
+
       (fact "aws eip workflows" :integration :ec2 :workflow
         ; will be run only if EIP env var is defined
         (when-let [eip (System/getenv "EIP")]
@@ -50,8 +65,7 @@
            (instance-desc (get-spec :aws :endpoint) (get-spec :aws :instance-id))
              => (contains {:public-ip-address eip})
            (:machine (spec)) => (contains {:ip eip})
-           (wf/destroy (spec)) => nil
-          ))
+           (wf/destroy (spec)) => nil))

       (fact "aws with ebs volumes" :integration :ec2 :workflow
         (let [with-vol {:aws {:volumes [{:device "/dev/sdn" :size 10 :clear true :volume-type "standard" }]}}]


aws clone workflow works

aws clone workflow works

--- test/celestial/integration/workflows/ec2.clj
+++ test/celestial/integration/workflows/ec2.clj
@@ -3,6 +3,7 @@
   (:require
     [aws.common :refer (with-ctx instance-desc)]
     [celestial.fixtures.core :refer (with-defaults is-type? with-admin with-conf)]
+    [celestial.persistency.systems :as s]
     [celestial.fixtures.data :refer
      (redis-type redis-ec2-spec local-conf redis-ec2-centos)]
     [celestial.fixtures.populate :refer (populate-system)]
@@ -66,7 +67,14 @@
                             "s3://opsk-sandboxes/redis-sandbox-0.3.5.tar.gz")]
             (wf/create (spec)) => nil
             (wf/puppetize s3-redis (spec)) => nil
-            (wf/destroy (spec)) => nil)))
+            (wf/destroy (spec)) => nil))
+
+      (fact "aws clone workflows" :integration :ec2 :workflow
+        (wf/create (spec)) => nil
+        (wf/clone 1 {:hostname "bar" :owner "ronen"}) => nil
+        (wf/destroy (assoc (s/get-system 2) :system-id 2)) => nil
+        (wf/destroy (spec)) => nil)
+      )

   (with-state-changes [(before :facts (populate-system redis-type redis-ec2-centos))]
      (fact "aws centos provisioning" :integration :ec2 :workflow


Add actual comparison

Add actual comparison

--- test/powderkeg/core_test.clj
+++ test/powderkeg/core_test.clj
@@ -10,5 +10,5 @@
 (use-fixtures :once with-local)

 (deftest rdd
-  (is (into [] (keg/rdd (range 10)))
-      (into [] (range 10))))
+  (is (= (into [] (keg/rdd (range 10)))
+         (into [] (range 10)))))


Allow trailing slash or not on company list REST request.

--- src/open_company/api/companies.clj
+++ src/open_company/api/companies.clj
@@ -78,4 +78,5 @@

 (defroutes company-routes
   (ANY "/v1/companies/:ticker" [ticker] (company ticker))
+  (GET "/v1/companies/" [] (company-list))
   (GET "/v1/companies" [] (company-list)))


(maint) Fix capsule/summarize invocation

Here we add a missing argument to the call to capsule/summarize in the
process-expired-message function.

--- src/puppetlabs/pcp/broker/core.clj
+++ src/puppetlabs/pcp/broker/core.clj
@@ -147,7 +147,7 @@
 (s/defn ^:always-validate process-expired-message :- Capsule
   "Reply with a ttl_expired message to the original message sender"
   [broker :- Broker capsule :- Capsule]
-  (sl/maplog :trace (assoc (capsule/summarize)
+  (sl/maplog :trace (assoc (capsule/summarize capsule)
                            :type :message-expired)
              "Message {messageid} for {destination} has expired. Sending a ttl_expired.")
   (let [message (:message capsule)


Revert ext-cb removal, as we need it.

Revert ext-cb removal, as we need it.

--- src/cbfg/fence.cljs
+++ src/cbfg/fence.cljs
@@ -35,34 +35,40 @@
 ;; request format
 ;; {:rq function-to-call :fence true-or-false}

-(defn make-fenced-pump [actx name in-ch out-ch max-inflight close?]
+(defn make-fenced-pump [actx name in-ch out-ch max-inflight close? &
+                        {:keys [ext-cb]}]
   (act-loop fenced-pump actx
    [name name
     inflight-chs #{}                ; chans of requests currently being processed.
     fenced-ch nil                   ; chan of last, inflight "fenced" request.
-    fenced-ch-res nil]              ; last received result from last fenced request.
+    fenced-ch-res nil               ; last received result from last fenced request.
+    ext-state nil]
    (let [chs (vec (if (or fenced-ch ; if we're fenced or too many inflight requests,
                           (>= (count inflight-chs) max-inflight))
                     inflight-chs    ; then ignore in-ch & finish any inflight requests.
                     (conj inflight-chs in-ch)))]
      (if (seq chs)                  ; empty when in-ch is closed and no inflight-chs.
-       (let [[v ch] (aalts fenced-pump chs)]
+       (let [[v ch] (aalts fenced-pump chs)
+             [v ext-state] (if ext-cb
+                             (ext-cb (= ch in-ch) v ext-state)
+                             [v ext-state])]
          (cond
           (= ch in-ch) (if (nil? v)
-                         (recur name inflight-chs out-ch nil) ; using out-ch as sentinel.
+                         (recur name inflight-chs out-ch ; using out-ch as sentinel.
+                                 nil ext-state)
                          (let [new-inflight ((:rq v) fenced-pump)]
                            (recur name (conj inflight-chs new-inflight)
                                   (when (:fence v) new-inflight)
-                                  nil)))
+                                  nil ext-state)))
           (= v nil) (let [new-inflight-chs (disj inflight-chs ch)] ; inflight request done.
                       (if (empty? new-inflight-chs)           ; all inflight requests done,
                         (do (when fenced-ch-res               ; so send held fenced-ch-res.
                               (aput fenced-pump out-ch fenced-ch-res))
-                            (recur name new-inflight-chs nil nil))
-                        (recur name new-inflight-chs fenced-ch fenced-ch-res)))
+                            (recur name new-inflight-chs nil nil ext-state))
+                        (recur name new-inflight-chs fenced-ch fenced-ch-res ext-state)))
           (= ch fenced-ch) (do (when fenced-ch-res ; send held fenced-res to hold onto v.
                                  (aput fenced-pump out-ch fenced-ch-res))
-                               (recur name inflight-chs fenced-ch v))
+                               (recur name inflight-chs fenced-ch v ext-state))
           :else (do (aput fenced-pump out-ch v)
-                    (recur name inflight-chs fenced-ch fenced-ch-res))))
+                    (recur name inflight-chs fenced-ch fenced-ch-res ext-state))))
        (when close? (aclose fenced-pump out-ch))))))


Fix typo.

Fix typo.

--- src/cli4clj/cli.clj
+++ src/cli4clj/cli.clj
@@ -86,7 +86,7 @@
 ;;; ;; software.
 ;;; ;; Originally contributed by Stephen C. Gilardi
 ;;;
-;;; Changes aim at "making graalvm happy" and include::
+;;; Changes aim at "making GraalVM happy" and include::
 ;;; - Add type hints.
 ;;; - Remove "readLine" case.
   [#^PushbackReader s]


CMR-5231: Change xmlns:echo location.

CMR-5231: Change xmlns:echo location.

--- search-app/src/cmr/search/results_handlers/atom_results_handler.clj
+++ search-app/src/cmr/search/results_handlers/atom_results_handler.clj
@@ -287,7 +287,7 @@
    :xmlns:dc "http://purl.org/dc/terms/"
    :xmlns:georss "http://www.georss.org/georss/10"
    :xmlns:time "http://a9.com/-/opensearch/extensions/time/1.0/"
-   :xmlns:echo "https://cmr.earthdata.nasa.gov/legacy-services"
+   :xmlns:echo "https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#atom"
    :xmlns:gml "http://www.opengis.net/gml"
    :xmlns:esipdiscovery "http://commons.esipfed.org/ns/discovery/1.2/"
    :xmlns:os "http://a9.com/-/spec/opensearch/1.1/"


Corrected hbridge specification

Corrected hbridge specification

--- src/chicken_coop/hbridge.clj
+++ src/chicken_coop/hbridge.clj
@@ -43,12 +43,12 @@
   (forward! [this]
     (with-sleeps (or (:ms-wait this) 20)
       (bb/write! power :off)
-      (bb/writes! [+pin -pin] :on)
+      (bb/writes! [+pin -pin] :off)
       (bb/write! power :on)))
   (reverse! [this]
     (with-sleeps (or (:ms-wait this) 20)
       (bb/write! power :off)
-      (bb/writes! [+pin -pin] :off)
+      (bb/writes! [+pin -pin] :on)
       (bb/write! power :on)))
   (stop! [_]
     (bb/write! power :off)))
@@ -59,12 +59,12 @@
   (forward! [this]
     (with-sleeps (or (:ms-wait this) 10)
       (bb/write! power :off)
-      (bb/write! pin :on)
+      (bb/write! pin :off)
       (bb/write! power :on)))
   (reverse! [this]
     (with-sleeps (or (:ms-wait this) 10)
       (bb/write! power :off)
-      (bb/writes! [pin power] :off)
+      (bb/write! pin :on)
       (bb/write! power :on)))
   (stop! [_]
     (bb/write! power :off)))
@@ -95,7 +95,7 @@
                    (let [[header pin] (if (coll? pin-spec)
                                         pin-spec
                                         [header pin-spec])]
-                     (bb/gpio header pin :on)))
+                     (bb/gpio header pin :out)))
                  pins))
         (assoc :ms-wait ms-wait))))


remove error message, make fail proof

remove error message, make fail proof

--- src/clj/salava/badge/pdf.clj
+++ src/clj/salava/badge/pdf.clj
@@ -9,7 +9,8 @@
             [clj-pdf-markdown.core :refer [markdown->clj-pdf]]
             [clojure.string :refer [ends-with? blank?]]
             [salava.user.db :as ud]
-            [ring.util.io :as io]))
+            [ring.util.io :as io]
+            [clojure.tools.logging :as log]))

 (defqueries "sql/badge/main.sql")

@@ -46,11 +47,9 @@
 (defn process-markdown [content markdown]
   (if (== 1 (count markdown))
     markdown
-    (let [markdown-to-clj (markdown->clj-pdf {:image {:x 10 :y 10} :spacer {:extra-starting-value 1 :allow-extra-line-breaks? true :single-value 2} :wrap {:global-wrapper :paragraph}} markdown)
-          p (slurp (io/piped-input-stream (fn [out] (pdf/pdf [{} markdown-to-clj] out))))]
-      (if (blank? p)
-        [:paragraph (str content " can't be displayed")]
-        markdown-to-clj))))
+      (if-let [p (blank? (slurp (io/piped-input-stream (fn [out] (pdf/pdf [{} (markdown->clj-pdf {:spacer {:extra-starting-value 1 :allow-extra-line-breaks? true :single-value 2} :wrap {:global-wrapper :paragraph}} markdown)] out)))))]
+        ""
+        (markdown->clj-pdf {:image {:x 10 :y 10} :spacer {:extra-starting-value 1 :allow-extra-line-breaks? true :single-value 2} :wrap {:global-wrapper :paragraph}} markdown))))

 (defn generatePDF [ctx user-id input lang]
   (let [data-dir (get-in ctx [:config :core :data-dir])


Use actual bootstrap toggle for district toggle

--- src/cljs/geoforms/forms.cljs
+++ src/cljs/geoforms/forms.cljs
@@ -146,11 +146,10 @@

 (defn district-toggle [d]
   ^{:key d}
-  [:button.btn.btn-default
-   {:active   (selected-district? d)
+  [:button.btn.btn-sm.btn-default
+   {:class   (if (selected-district? d) :active)
     :on-click #(toggle-district! d)}
-   [(if (selected-district? d) :b :span)
-    d]])
+   d])

 (defn select-districts-component []
   [:div.btn-group {:field :multi-select :id :every.position}


bug fix

bug fix

--- src/cljs/netrunner/auth.cljs
+++ src/cljs/netrunner/auth.cljs
@@ -119,10 +119,11 @@
 (defn auth-forms [cursor owner]
   (om/component
    (sab/html
-    [:div
-     (when-not (:user @app-state)
+    (if (:user @app-state)
+      [:div]
+      [:div
        (om/build register-form cursor)
-       (om/build login-form cursor))])))
+       (om/build login-form cursor)]))))

 (om/root auth-menu app-state {:target (. js/document (getElementById "right-menu"))})
 (om/root auth-forms app-state {:target (. js/document (getElementById "auth-forms"))})


minimax

minimax

--- src/cljs/triboard/ai/ai.cljs
+++ src/cljs/triboard/ai/ai.cljs
@@ -27,6 +27,54 @@
     #(scores/update-scores-with %1 %2 cell-weights)
     scores/null-scores
     transition))
+
+;; -----------------------------------------
+;; Attempts game - tree (later minimax decoupled)
+;; -----------------------------------------
+
+(defn build-game-tree
+  [game depth]
+  (if (= 0 depth)
+    game
+    (let [transitions (turn/player-transitions (game/current-turn game))
+          next-games (map #(game/play-move game (first %)) transitions)]
+      (map vector
+        transitions
+        (map #(build-game-tree % (dec depth)) next-games)))
+    ))
+
+(defn test-build-game-tree
+  []
+  (let [init-game (game/new-game)]
+    (build-game-tree init-game 1)))
+
+;; -----------------------------------------
+;; Attempts minimax
+;; -----------------------------------------
+
+(defn leaf-score
+  [ai game]
+  (:scores (game/current-turn game)))
+
+(defn tree-score
+  [ai game depth]
+  (if (= 0 depth)
+    (leaf-score ai game)
+    (let [turn (game/current-turn game)
+          transitions (turn/player-transitions turn)
+          next-games (map #(game/play-move game (first %)) transitions)
+          min-max (if (= (:player ai) (:player turn)) max min)]
+      (apply min-max (map #(tree-score ai % (dec depth)) next-games)))
+    ))
+
+(defn test-score-tree
+  []
+  (let [init-game (game/new-game)
+        turn (game/current-turn init-game)
+        ai (make-ai (:board turn) (:player turn))]
+    (tree-score ai init-game 2)))
+
+;; -----------------------------------------

 (defn- worst-possible-score-from
   [{:keys [player other-players] :as ai} moves]


ideas for ai

ideas for ai

--- src/cljs/triboard/ai/ai.cljs
+++ src/cljs/triboard/ai/ai.cljs
@@ -11,17 +11,23 @@
 ;; Private
 ;; -----------------------------------------

+;; TODO - Blue score + min-max modification for AI Aliance
+
 (defn- make-ai
   [board player]
   {:player player})

 (defn- summarize-score
   [ai scores]
-  (get scores (:player ai))) ;; TODO - Blue score + min-max modification for AI Aliance
+  (get scores (:player ai))
+  ;; (+ (:red scores) (:green scores)) ;; Aligned against player
+  )

 (defn- maximizing-turn?
   [ai turn]
-  (= (:player ai) (:player turn)))
+  (= (:player ai) (:player turn))
+  ;; (not= :blue (:player turn)) ;; Aligned against player
+  )

 ;; -----------------------------------------


include more classes

include more classes

--- src/clojure_fabric/block.clj
+++ src/clojure_fabric/block.clj
@@ -1,5 +1,71 @@
 (ns clojure-fabric.block
-  (:import [org.hyperledger.fabric.sdk BlockEvent]))
+  (:import [org.hyperledger.fabric.sdk BlockInfo]
+           [org.hyperledger.fabric.sdk BlockEvent]
+           [org.hyperledger.fabric.sdk BlockChainInfo]))
+
+;;;---------------------------------------------------
+;;;org.hyperledger.fabric.sdk.BlockInfo
+;;;
+
+;;;  getChannelId
+(defn
+ get-channel-id
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getChannelId))
+
+;;;  getEnvelopeCount
+(defn
+ get-envelope-count
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getEnvelopeCount))
+
+;;;  getBlockNumber
+(defn
+ get-block-number
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getBlockNumber))
+
+;;;  getEnvelopeInfos
+(defn
+ get-envelope-infos
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getEnvelopeInfos))
+
+;;;  getEnvelopeInfo
+(defn
+ get-envelope-info
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info  int0]
+ (. block-info getEnvelopeInfo int0))
+
+;;;  getPreviousHash
+(defn
+ get-previous-hash
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getPreviousHash))
+
+;;;  getBlock
+(defn
+ get-block
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getBlock))
+
+;;;  getTransActionsMetaData
+(defn
+ get-trans-actions-meta-data
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getTransActionsMetaData))
+
+;;;  getTransactionActionInfos
+(defn
+ get-transaction-action-infos
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getTransactionActionInfos))
+
+;;;  getDataHash
+(defn
+ get-data-hash
+ [^org.hyperledger.fabric.sdk.BlockInfo block-info]
+ (. block-info getDataHash))

 ;;;---------------------------------------------------
 ;;;org.hyperledger.fabric.sdk.BlockEvent
@@ -22,3 +88,32 @@
  get-event-hub
  [^org.hyperledger.fabric.sdk.BlockEvent block-event]
  (. block-event getEventHub))
+
+
+;;;---------------------------------------------------
+;;;org.hyperledger.fabric.sdk.BlockchainInfo
+;;;
+
+;;;  getPreviousBlockHash
+(defn
+ get-previous-block-hash
+ [^org.hyperledger.fabric.sdk.BlockchainInfo blockchain-info]
+ (. blockchain-info getPreviousBlockHash))
+
+;;;  getBlockchainInfo
+(defn
+ get-blockchain-info
+ [^org.hyperledger.fabric.sdk.BlockchainInfo blockchain-info]
+ (. blockchain-info getBlockchainInfo))
+
+;;;  getCurrentBlockHash
+(defn
+ get-current-block-hash
+ [^org.hyperledger.fabric.sdk.BlockchainInfo blockchain-info]
+ (. blockchain-info getCurrentBlockHash))
+
+;;;  getHeight
+(defn
+ get-height
+ [^org.hyperledger.fabric.sdk.BlockchainInfo blockchain-info]
+ (. blockchain-info getHeight))


fixed update issue

fixed update issue

--- src/clojure_todo/handler.clj
+++ src/clojure_todo/handler.clj
@@ -7,6 +7,7 @@
    cheshire.core
    [monger.core :only [connect! connect-via-uri! connect set-db! get-db]]
    [monger.collection :only [insert find-maps find-one-as-map update-by-id remove-by-id]]
+   monger.operators
    [ring.adapter.jetty :as ring]
    )
 (:require [compojure.route :as route]
@@ -33,7 +34,8 @@

 (defn select-task [id] (find-one-as-map "clojure-todo" { :_id (ObjectId. id) }))

-(defn update-task-status [id status] (update-by-id "clojure-todo" (ObjectId. id) {:done? status}))
+(defn update-task-status [id status]
+  (update-by-id "clojure-todo" (ObjectId. id) {$set {:done? status } }))

 (defn delete-task [id] (remove-by-id "clojure-todo" (ObjectId. id)))


Update en.cljs

Update en.cljs

Latest changes from Vic

--- src/status_im/translations/en.cljs
+++ src/status_im/translations/en.cljs
@@ -349,7 +349,7 @@
    :cost-fee                              "Cost/Fee"
    :nonce                                 "Nonce"
    :confirmations                         "Confirmations"
-   :confirmations-helper-text             "If you want to be sure your transaction has been securely processed, wait for 12 confirmations"
+   :confirmations-helper-text             "Please wait for at least 12 confirmations to make sure your transaction is processed securely"
    :copy-transaction-hash                 "Copy transaction hash"
    :open-on-etherscan                     "Open on Etherscan.org"

@@ -400,9 +400,9 @@
    :transactions-filter-type              "Type"
    :transactions-filter-select-all        "Select all"
    :view-transaction-details              "View transaction details"
-   :transaction-description               "If you want to be sure your transaction has been securely processed, wait for 12 confirmations"
+   :transaction-description               "Please wait for at least 12 confirmations to make sure your transaction is processed securely"
    :transaction-sent                      "Transaction sent"
-   :transaction-moved-text                "The transaction has been moved to the 'Unsigned' list. It will be deleted after 5 minutes."
+   :transaction-moved-text                "The transaction will remain in the 'Unsigned' list for the next 5 mins"
    :transaction-moved-title               "Transaction moved"
    :sign-later-title                      "Sign transaction later?"
    :sign-later-text                       "Check the transaction history to sign this transaction"


Fix doc string

Fix doc string

--- src/structural_typing/api/path.clj
+++ src/structural_typing/api/path.clj
@@ -13,7 +13,7 @@
   "Use this in a path to select all values of a
    collection.

-       (type! :Figure {:points ALL (type/include :Point)})
+       (type! :Figure {[:points ALL] (type/include :Point)})
 "
   specter/ALL)


Fix new thread not being focused after sending first message

--- src/braid/core/client/ui/views/new_message.cljs
+++ src/braid/core/client/ui/views/new_message.cljs
@@ -23,52 +23,53 @@
     ;; because of the 2 resizes that occur in the above
     (set! (.. el -parentNode -style -height) new-height)))

-(defn textarea-view [{:keys [config]}]
-  (let [this-elt (atom nil)
-        connected? (subscribe [:connected?])
-        focused? (subscribe [:thread-focused? (config :thread-id)])
-        send-message!
-        (fn [config text]
-          (dispatch [:new-message {:thread-id (config :thread-id)
-                                   :group-id (config :group-id)
-                                   :content text
-                                   :mentioned-user-ids (config :mentioned-user-ids)
-                                   :mentioned-tag-ids (config :mentioned-tag-ids)}]))
-        _ (run! (do
-                  (when (and @focused? @this-elt)
-                    (.focus @this-elt))))]
+(defn textarea-view [_]
+  (let [this-elt (atom nil)]
     (r/create-class
       {:component-did-update
-       (fn [this [_ new-props]]
+       (fn [this [_ old-props]]
          (when (not= (:text (r/props this))
-                     (:text new-props))
-           (resize-textbox! @this-elt)))
+                     (:text old-props))
+           (resize-textbox! @this-elt))
+         (when (and (not (:focused? old-props))
+                    (:focused? (r/props this)))
+           (.focus @this-elt)))

        :reagent-render
-       (fn [{:keys [text set-text! config on-key-down on-change]}]
+       (fn [{:keys [text set-text! config on-key-down on-change focused?]}]
          ;; wrap with a div that has a fixed height and overflow: hidden
          ;; so that the auto-resize behaviour of the textarea does not cause
          ;; double scroll events
          [:div.textarea {:style {:overflow "hidden"
                                  ;; height gets overriden by JS
                                  :height "0px"}}
-          [:textarea {:placeholder (config :placeholder)
-                      :value text
-                      :ref (fn [x]
-                             (when (and x (nil? @this-elt))
-                               (reset! this-elt x)
-                               (resize-textbox! @this-elt)))
-                      :disabled (not @connected?)
-                      :on-focus (fn [e]
-                                  (dispatch [:focus-thread (config :thread-id)]))
-                      :on-change (on-change
-                                   {:on-change
-                                    (fn [e]
-                                      (set-text! (.. e -target -value)))})
-                      :on-key-down (on-key-down
-                                     {:on-submit (fn [e]
-                                                   (send-message! config text)
-                                                   (set-text! ""))})}]])})))
+          [:textarea
+           {:placeholder (config :placeholder)
+            :value text
+            :ref (fn [x]
+                   (when (and x (nil? @this-elt))
+                     (reset! this-elt x)
+                     (resize-textbox! @this-elt)
+                     (when focused?
+                       (.focus @this-elt))))
+            :disabled (not @(subscribe [:connected?]))
+            :on-focus (fn [e]
+                        (dispatch [:focus-thread (config :thread-id)]))
+            :on-change (on-change
+                         {:on-change
+                          (fn [e]
+                            (set-text! (.. e -target -value)))})
+            :on-key-down
+            (on-key-down
+              {:on-submit
+               (fn [e]
+                 (dispatch [:new-message
+                            {:thread-id (config :thread-id)
+                             :group-id (config :group-id)
+                             :content text
+                             :mentioned-user-ids (config :mentioned-user-ids)
+                             :mentioned-tag-ids (config :mentioned-tag-ids)}])
+                 (set-text! ""))})}]])})))

 (defn autocomplete-results-view [{:keys [results highlighted-result-index on-click]}]
   [:div.autocomplete
@@ -251,6 +252,7 @@
          [:div.autocomplete-wrapper
           [textarea-view {:text (@state :text)
                           :config config
+                          :focused? @(subscribe [:thread-focused? (config :thread-id)])
                           :on-key-down autocomplete-on-key-down
                           :on-change autocomplete-on-change
                           :set-text! set-text!}]


Remove reflection

Remove reflection

--- web/src/immutant/web/internal/wunderboss.clj
+++ web/src/immutant/web/internal/wunderboss.clj
@@ -40,7 +40,7 @@
     (assoc opts :port
       (.getLocalPort (doto (ServerSocket.)
                        (.setReuseAddress true)
-                       (.bind (InetSocketAddress. (:host opts "") 0))
+                       (.bind (InetSocketAddress. ^String (:host opts "") 0))
                        .close)))
     opts))


Spy some stuff

Spy some stuff

--- src/icecap/rest.clj
+++ src/icecap/rest.clj
@@ -20,23 +20,23 @@
 (defroutes routes
   (context "/v0/caps" {store :store kdf :kdf scheme :scheme}
            (POST "/" {plan :body-params :as request}
-                 (let [{cap :cap} (<!! (create-cap plan
-                                                   :store store
-                                                   :kdf kdf
-                                                   :scheme scheme))]
+                 (let [{cap :cap} (spy (<!! (create-cap plan
+                                                        :store store
+                                                        :kdf kdf
+                                                        :scheme scheme)))]
                    {:body (cap-url request cap)}))
            (context "/:encoded-cap" [encoded-cap]
                     (GET "/" []
-                         (let [cap (safebase64-decode encoded-cap)]
-                           (<!! (execute-cap cap
-                                             :store store
-                                             :kdf kdf
-                                             :scheme scheme))))
+                         (let [cap (spy (safebase64-decode encoded-cap))]
+                           (spy (<!! (execute-cap cap
+                                                  :store store
+                                                  :kdf kdf
+                                                  :scheme scheme)))))
                     (DELETE "/" []
-                            (let [cap (safebase64-decode encoded-cap)]
-                              (<!! (revoke-cap cap
-                                               :store store
-                                               :kdf kdf)))))))
+                            (let [cap (spy (safebase64-decode encoded-cap))]
+                              (spy (<!! (revoke-cap cap
+                                                    :store store
+                                                    :kdf kdf))))))))

 (defn ^:private wrap-components
   "Adds some components to each request map."


Add filtering to `invadm data`

Add filtering to `invadm data`

--- src/invadm/core.clj
+++ src/invadm/core.clj
@@ -17,13 +17,13 @@
         ""
         "Usage: invadm [options] action"
         ""
-        "  invadm create -c CURRENCY -r CLIENT -a AMOUNT [-f FILENAME] ID"
+        "  invadm create -c CURRENCY -r CLIENT -a AMOUNT [-d ISSUE_DATE] [-f FILENAME] ID"
         "    Creates an invoice."
         ""
         "  invadm list {-c CURRENCY, -r CLIENT, -f FILENAME}"
         "    Lists invoices."
         ""
-        "  invadm data"
+        "  invadm data {-c CURRENCY, -r CLIENT, -f FILENAME}"
         "    Dump all the data in a JSON array."]
        (string/join \newline)))

@@ -67,12 +67,12 @@
 (defn read-all-invoices []
   (map read-json (get-invoice-filenames)))

-(defn data []
-  (println (json/write-str (read-all-invoices))))
-
 (defn options-to-filter [options]
   (fn [invoice]
     (every? (fn[key_](= (get options key_) (get invoice (name key_)))) (keys options))))
+
+(defn data [options]
+  (println (json/write-str (filter (options-to-filter options) (read-all-invoices)))))

 (defn list_ [options]
   (println (json/write-str (filter (options-to-filter options) (read-all-invoices)))))
@@ -86,6 +86,6 @@
     ;; Execute program with options
     (case (first arguments)
       "create" (create options arguments)
-      "data" (data)
+      "data" (data options)
       "list" (list_ options)
       (exit 1 (usage summary)))))


Add sets to gen/any{-printable}

Add sets to gen/any{-printable}

--- src/main/clojure/clojure/test/check/generators.cljc
+++ src/main/clojure/clojure/test/check/generators.cljc
@@ -1322,6 +1322,7 @@
   [inner-type]
   (one-of [(vector inner-type)
            (list inner-type)
+           (set inner-type)
            ;; scaling this by half since it naturally generates twice
            ;; as many elements
            (scale #(quot % 2) (map inner-type inner-type))]))


added logging analyzing extracts citygml

--- src/main/clojure/pdok/featured/extracts.clj
+++ src/main/clojure/pdok/featured/extracts.clj
@@ -7,7 +7,8 @@
             [pdok.featured.template :as template]
             [clojure.tools.logging :as log]
             [clojure.core.async :as a
-             :refer [>! <! >!! <!! go chan]])
+             :refer [>! <! >!! <!! go chan]]
+            [clojure.string :as str])
   (:gen-class)
   (:import (java.sql SQLException)))

@@ -85,8 +86,12 @@
     (if (nil? error)
       (if (nil? features-for-extract)
         {:status "ok" :count 0}
-        {:status "ok" :count (add-extract-records extracts-db dataset extract-type features-for-extract)})
-      {:status "error" :msg error :count 0})))
+        (let [n-inserted-records (add-extract-records extracts-db dataset extract-type features-for-extract)]
+          (log/info "Extract records inserted: " n-inserted-records (str/join "-" (list dataset feature-type extract-type)))
+          {:status "ok" :count n-inserted-records}))
+      (do
+        (log/error "Error creating extracts" error)
+        {:status "error" :msg error :count 0}))))

 (defn- jdbc-delete-versions [db table versions]
@@ -156,7 +161,8 @@
                                   (filter (complement nil?) (map changelog->deletes records)))
         (if (= 0 (mod i 10))
           (log/info "Creating extracts" (str dataset "-" extract-type "-" collection) "processed:" (* i batch-size)))
-        (recur (inc i) (a/<!! parts))))))
+        (recur (inc i) (a/<!! parts))))
+    (log/info "Finished extract" (str dataset "-" extract-type "-" collection))))

 (defn- create-extract [dataset extract-type fn-timeline-query collections]
    (if-not (every? *initialized-collection?* (map (partial template/template-key dataset extract-type)


better name for interface

better name for interface

--- src/hackerrank/even_tree.clj
+++ src/hackerrank/even_tree.clj
@@ -13,8 +13,8 @@
   (map parseInt (split string #" ")))

 (definterface INode
-  (get-left [])
-  (get-right [])
+  (getLeft [])
+  (getRight [])
   (insert [k v]))

 (deftype Node
@@ -24,8 +24,8 @@
    ^:volatile-mutable ^INode right]

   INode
-  (get-left [_] left)
-  (get-right [_] right)
+  (getLeft [_] left)
+  (getRight [_] right)

   (insert [this k v]))

@@ -49,3 +49,4 @@
 ;; tree-seq
 ;; http://macromancy.com/2014/04/09/data-structures-clojure-trees.html
 ;; http://www.ibm.com/developerworks/library/j-treevisit/
+;; https://www.cs.cmu.edu/~rwh/theses/okasaki.pdf - 6.2 Binary Representations


Fixes #30

Fixes #30

--- src/unspun/screens/story_list.cljs
+++ src/unspun/screens/story_list.cljs
@@ -9,7 +9,7 @@
 (def palette-titles
   (mapv name (keys palettes)))

-(rum/defc icon-example [name]
+#_(rum/defc icon-example [name]
   (content {:theme (aget my-theme "default")}
            (n-icon {:name  name
                     :style {:color (:dark-primary (get-palette @palette-index))}})))
@@ -26,7 +26,7 @@
            :style {:color (:dark-primary palette)}
            }))

-(defn nnt-icon [palette]
+#_(defn nnt-icon [palette]
   (n-icon {:name  "md-keypad"
            :key   (gensym "nnt")
            :style {:color (:accent palette)}
@@ -34,7 +34,7 @@

 (defn show-icon [palette]
   (n-icon {:name  "ios-arrow-dropright-outline"
-           :key   (gensym "icon")
+           :key   (gensym "icon-foo")
            :style {:color     (:accent palette)
                    :transform [{:scale 1.67}]}
            }))
@@ -43,17 +43,15 @@
   (n-icon {:name  "ios-add-circle-outline"
            :key   (gensym "add")
            :style {:color     (:accent palette)
-                   :transform [{:scale 1.67}]}
-           }))
+                   :transform [{:scale 1.67}]}}))

-(defn bars-icon [palette]
+#_(defn bars-icon [palette]
   (n-icon {:name  "ios-stats"
            :key   (gensym "bars")
            :style {:width 9
                    ;:paddingRight 5
-                   :color (:accent palette)
-                   }}))
+                   :color (:accent palette)}}))

 (defn select-palette-item! [index]
   (n-list-item
@@ -63,17 +61,24 @@
             :selected (= @palette-index index)})
     (txt {:key 2} (palette-titles index))))

+(def card-style {:flex         1
+                 :marginLeft   15
+                 :marginRight  15
+                 :marginTop    5
+                 :marginBottom 0})
+
+(def card-item-style {:backgroundColor "white"
+                      :justifyContent  "flex-start"
+                      :flexDirection   "row"
+                      :alignItems      "center"
+                      :padding         10})
+
 (defn add-card! [navigator palette]
-  (card {:key   20
-         :style {:flex   1
-                 :margin 15}}
+  (card {:key   (gensym "add-card")
+         :style card-style}
         (card-item {:header true
                     :key    1
-                    :style  {:backgroundColor "white"
-                             :justifyContent  "flex-start"
-                             :flexDirection   "row"
-                             :alignItems      "center"
-                             }}
+                    :style  card-item-style}
                    (txt {:key   1
                          :style {:flex       4
                                  :marginLeft 34
@@ -82,28 +87,17 @@
                         "Add your own scenario")
                    (button {:key       2
                             :bordered  true
-                            ;:small     true
                             :textStyle {:color (:accent palette)}
                             :style     {:borderWidth 0}
-                            :onPress   #(do (.push navigator "not-yet"))}
-                           (add-icon palette)
-                           ;(txt "")
-                           ))
-        )
-
-  )
+                            :onPress   #(.push navigator "not-yet")}
+                           (add-icon palette)))))

 (defn story-card! [navigator palette index]
   (card {:key   (gensym "story-card")
-         :style {:flex   1
-                 :margin 15}}
+         :style card-style}
         (card-item {:header true
                     :key    1
-                    :style  {:backgroundColor "white"
-                             :justifyContent  "flex-start"
-                             :flexDirection   "row"
-                             :alignItems      "center"
-                             }}
+                    :style  card-item-style}
                    (story-icon palette (:icon (@stories index)))
                    (txt {:key   1
                          :style {:flex       4
@@ -112,17 +106,11 @@
                         (caps-tidy (story index)))
                    (button {:key       2
                             :bordered  true
-                            ;:small true
                             :textStyle {:color (:accent palette)}
                             :style     {:borderWidth 0}
                             :onPress   #(do (reset! story-index index)
                                             (.push navigator "tabs"))}
-                           (show-icon palette)
-                           ;(txt "")
-                           ))
-        ))
-
-
+                           (show-icon palette)))))

 (rum/defcs page < rum/reactive
                   (rum/local 0 ::selection) (add-page-title "Scenarios")
@@ -146,6 +134,5 @@
                (concat [{:key   1
                          :style {:flex 1}}]
                        [(add-card! navigator palette)]
-                       [(map (partial story-card! navigator palette) (range story-count))]))
-        )
-      )))+                       ;[(story-card! navigator palette 0)]
+                       [(map (partial story-card! navigator palette) (range story-count))]))))))


add mac and linux detection

add mac and linux detection

--- src-cljs/cljsbuild_ui/util.cljs
+++ src-cljs/cljsbuild_ui/util.cljs
@@ -18,6 +18,12 @@

 (def on-windows?
   (.test #"^win" js/process.platform))
+
+(def on-mac?
+  (.test #"^darwin" js/process.platform))
+
+(def on-linux?
+  (.test #"^linux" js/process.platform))

 (defn log
   "Log a Clojure thing."


Automatically flush the native server's stdout every 500ms. Fixes #195.

--- src/overtone/sc/machinery/server/native.clj
+++ src/overtone/sc/machinery/server/native.clj
@@ -1,6 +1,7 @@
 (ns overtone.sc.machinery.server.native
   (:import [java.nio ByteOrder ByteBuffer])
-  (:require [overtone.jna-path])
+  (:require [overtone.jna-path]
+            [overtone.at-at :as at-at])
   (:use [overtone.helpers.file :only [get-current-directory home-dir]]
         [overtone.helpers.system :only [get-os get-cpu-bits]]
         [overtone.sc.machinery.server args]
@@ -157,7 +158,9 @@
           (world-copy-sound-buffer World_CopySndBuf [void* i32 sound-buffer* byte byte*] i32)))

       (loadlib libc)
-      (loadlib lib-scsynth))))
+      (loadlib lib-scsynth)
+      (defonce flush-pool (at-at/mk-pool))
+      (defonce flusher (at-at/every 500 #(fflush nil) flush-pool :desc "Flush stdout")))))

 (defn flush-all
   []


Add default values for unfollow and dismiss-at records in the inbox query to avoid filter out records w/o user visibility.

--- src/oc/storage/lib/inbox.clj
+++ src/oc/storage/lib/inbox.clj
@@ -53,10 +53,10 @@
                      ;; Leave in only posts whose last activity is within a certain amount of time
                      (r/gt (r/get-field post-row :last-activity-at) minimum-date-timestamp)
                      ;; All records with follow true
-                     (r/not (r/get-field (r/get-field (r/get-field post-row :user-visibility) user-id) :unfollow))
+                     (r/not (r/default (r/get-field (r/get-field (r/get-field post-row :user-visibility) user-id) :unfollow) false))
                      ;; All records that have a dismiss-at later or equal than the last activity
                      (r/gt (r/get-field post-row :last-activity-at)
-                           (r/get-field (r/get-field (r/get-field post-row :user-visibility) user-id) :dismiss-at)))))
+                           (r/default (r/get-field (r/get-field (r/get-field post-row :user-visibility) user-id) :dismiss-at) "")))))
             ;; Merge in all the interactions
             (if-not count
               (r/merge query (r/fn [post-row]


Simplify macros

Simplify macros

--- src/play_clj/core_render.clj
+++ src/play_clj/core_render.clj
@@ -10,9 +10,7 @@

 (defmacro tiled-map
   [s & options]
-  `(let [object# (tiled-map* ~s)]
-     (u/calls! ^TiledMap object# ~@options)
-     object#))
+  `(u/calls! ^TiledMap (tiled-map* ~s) ~@options))

 (defmacro tiled-map!
   [{:keys [^BatchTiledMapRenderer renderer]} k & options]
@@ -35,9 +33,7 @@

 (defmacro tiled-map-layer
   [screen layer & options]
-  `(let [object# (tiled-map-layer* ~screen ~layer)]
-     (u/calls! ^TiledMapTileLayer object# ~@options)
-     object#))
+  `(u/calls! ^TiledMapTileLayer (tiled-map-layer* ~screen ~layer) ~@options))

 (defmacro tiled-map-layer!
   [layer k & options]
@@ -49,9 +45,8 @@

 (defmacro tiled-map-cell
   [screen layer x y & options]
-  `(let [object# (tiled-map-cell* ~screen ~layer ~x ~y)]
-     (u/calls! ^TiledMapTileLayer$Cell object# ~@options)
-     object#))
+  `(u/calls! ^TiledMapTileLayer$Cell (tiled-map-cell* ~screen ~layer ~x ~y)
+             ~@options))

 (defmacro tiled-map-cell!
   [cell k & options]
@@ -78,9 +73,8 @@

 (defmacro orthogonal-tiled-map
   [path unit & options]
-  `(let [object# (orthogonal-tiled-map* ~path ~unit)]
-     (u/calls! ^OrthogonalTiledMapRenderer object# ~@options)
-     object#))
+  `(u/calls! ^OrthogonalTiledMapRenderer (orthogonal-tiled-map* ~path ~unit)
+             ~@options))

 (defmacro orthogonal-tiled-map!
   [screen k & options]
@@ -92,9 +86,8 @@

 (defmacro isometric-tiled-map
   [path unit & options]
-  `(let [object# (isometric-tiled-map* ~path ~unit)]
-     (u/calls! ^IsometricTiledMapRenderer object# ~@options)
-     object#))
+  `(u/calls! ^IsometricTiledMapRenderer (isometric-tiled-map* ~path ~unit)
+             ~@options))

 (defmacro isometric-tiled-map!
   [screen k & options]
@@ -106,9 +99,9 @@

 (defmacro isometric-staggered-tiled-map
   [path unit & options]
-  `(let [object# (isometric-staggered-tiled-map* ~path ~unit)]
-     (u/calls! ^IsometricStaggeredTiledMapRenderer object# ~@options)
-     object#))
+  `(u/calls! ^IsometricStaggeredTiledMapRenderer
+             (isometric-staggered-tiled-map* ~path ~unit)
+             ~@options))

 (defmacro isometric-staggered-tiled-map!
   [screen k & options]
@@ -121,9 +114,8 @@

 (defmacro hexagonal-tiled-map
   [path unit & options]
-  `(let [object# (hexagonal-tiled-map* ~path ~unit)]
-     (u/calls! ^HexagonalTiledMapRenderer object# ~@options)
-     object#))
+  `(u/calls! ^HexagonalTiledMapRenderer (hexagonal-tiled-map* ~path ~unit)
+             ~@options))

 (defmacro hexagonal-tiled-map!
   [screen k & options]
@@ -135,9 +127,7 @@

 (defmacro stage
   [& options]
-  `(let [object# (stage*)]
-     (u/calls! ^Stage object# ~@options)
-     object#))
+  `(u/calls! ^Stage (stage*) ~@options))

 (defmacro stage!
   [screen k & options]
@@ -167,9 +157,7 @@

 (defmacro orthographic-camera
   [& options]
-  `(let [object# (orthographic-camera*)]
-     (u/calls! ^OrthographicCamera object# ~@options)
-     object#))
+  `(u/calls! ^OrthographicCamera (orthographic-camera*) ~@options))

 (defmacro orthographic-camera!
   [screen k & options]
@@ -181,9 +169,7 @@

 (defmacro perspective-camera
   [& options]
-  `(let [object# (perspective-camera*)]
-     (u/calls! ^PerspectiveCamera object# ~@options)
-     object#))
+  `(u/calls! ^PerspectiveCamera (perspective-camera*) ~@options))

 (defmacro perspective-camera!
   [screen k & options]


+quote in comment

+quote in comment

--- src/babel/config.clj
+++ src/babel/config.clj
@@ -54,7 +54,7 @@
         language-keyword (keyword language-keyword-name)]
     {:root {language-keyword {language-keyword root}}}))

-;; TODO: throw exception rather than 'unknown for unknown languages.
+;; TODO: throw exception rather than 'unknown' for unknown languages.
 (defn short-language-name-to-long [lang]
   (cond (= lang "it") "Italian"
         (= lang "en") "English"


redesign config create form

redesign config create form

--- src/cljs/swarmpit/component/config/create.cljs
+++ src/cljs/swarmpit/component/config/create.cljs
@@ -29,6 +29,8 @@
      :variant         "outlined"
      :defaultValue    value
      :required        true
+     :margin          "normal"
+     :helperText      "Specify config name"
      :InputLabelProps {:shrink true}
      :onChange        #(state/update-value [:configName] (-> % .-target .-value) state/form-value-cursor)}))

@@ -42,6 +44,7 @@
      :required        true
      :multiline       true
      :disabled        true
+     :margin          "normal"
      :InputLabelProps {:shrink true}
      :value           value}))

@@ -95,44 +98,29 @@
       (html
         [:div.Swarmpit-form
          [:div.Swarmpit-form-context
-          [:div.Swarmpit-form-paper
-           (common/form-title "Create a new config" "store non-sensitive information such as config files")
-           (comp/grid
-             {:container true
-              :className "Swarmpit-form-main-grid"
-              :spacing   5}
-             (comp/grid
-               {:item true
-                :xs   12
-                :sm   12
-                :md   12
-                :lg   8
-                :xl   8}
-               (comp/grid
-                 {:container true
-                  :spacing   5}
-                 (comp/grid
-                   {:item true
-                    :xs   12}
-                   (form-name configName))
-                 (comp/grid
-                   {:item true
-                    :xs   12}
-                   (form-data data))
-                 (comp/grid
-                   {:item true
-                    :xs   12}
-                   (html
-                     [:div.Swarmpit-form-buttons
-                      (composite/progress-button
-                        "Create"
-                        create-config-handler
-                        processing?)]))))
-             (comp/grid
-               {:item true
-                :xs   12
-                :sm   12
-                :md   12
-                :lg   4
-                :xl   4}
-               (form/open-in-new "Learn more about configs" doc-configs-link)))]]]))))
+          (comp/container
+            {:className "Swarmpit-container"
+             :maxWidth  "md"}
+            (comp/card
+              {:className "Swarmpit-form-card Swarmpit-fcard"}
+              (comp/box
+                {:className "Swarmpit-fcard-header"}
+                (comp/typography
+                  {:className "Swarmpit-fcard-header-title"
+                   :variant   "h6"
+                   :component "div"}
+                  "Create config"))
+              (comp/card-content
+                {}
+                (comp/typography
+                  {:variant   "body2"
+                   :className "Swarmpit-fcard-message"}
+                  "Store non-sensitive information such as config files")
+                (form-name configName)
+                (form-data data)
+                (html
+                  [:div.Swarmpit-form-buttons
+                   (composite/progress-button
+                     "Create"
+                     create-config-handler
+                     processing?)]))))]]))))


Improved argument name and comments.

Improved argument name and comments.

--- src/bencode/core.clj
+++ src/bencode/core.clj
@@ -20,8 +20,8 @@
              (String. arr "UTF-8")))))))

 (defn bdecode
-  "Bdecodes the given string."
-  ([obj]
-     (protocol/bdecode obj nil))
-  ([obj opts]
-     (protocol/bdecode obj opts)))
+  "Bdecodes the given input."
+  ([in]
+     (protocol/bdecode in nil))
+  ([in opts]
+     (protocol/bdecode in opts)))


[ISSUE#3105] Fixed section renderer data access

--- src/status_im/ui/components/list/views.cljs
+++ src/status_im/ui/components/list/views.cljs
@@ -142,7 +142,9 @@

 (defn- wrap-render-section-header-fn [f]
   (fn [data]
-    (reagent/as-element (f (.-section data)))))
+    (let [section (.-section data)]
+      (reagent/as-element (f {:title (.-title section)
+                              :data  (.-data section)})))))

 (defn- default-render-section-header [{:keys [title data]}]
   (when (seq data)


Whitespace

Whitespace

--- src/braid/lib/s3.clj
+++ src/braid/lib/s3.clj
@@ -1,13 +1,13 @@
 (ns braid.lib.s3
   (:require
-    [clojure.data.json :as json]
-    [clojure.string :as string]
-    [org.httpkit.client :as http]
-    [braid.base.conf :refer [config]]
-    [braid.lib.aws :as aws])
+   [clojure.data.json :as json]
+   [clojure.string :as string]
+   [org.httpkit.client :as http]
+   [braid.base.conf :refer [config]]
+   [braid.lib.aws :as aws])
   (:import
-    (java.time.temporal ChronoUnit)
-    (org.apache.commons.codec.binary Base64 Hex)))
+   (java.time.temporal ChronoUnit)
+   (org.apache.commons.codec.binary Base64 Hex)))

 (defn s3-host
   [config]
@@ -122,6 +122,6 @@
   [url]
   (when url
     (or ;; old style, with bucket after domain
-      (second (re-matches #"^https://s3\.amazonaws\.com/[^/]+(/.*)$" url))
-      ;; new style, with bucket in domain
-      (second (re-matches #"^https://.+\.amazonaws\.com(/.*)$" url)))))
+     (second (re-matches #"^https://s3\.amazonaws\.com/[^/]+(/.*)$" url))
+     ;; new style, with bucket in domain
+     (second (re-matches #"^https://.+\.amazonaws\.com(/.*)$" url)))))


Add vcs_type to test example user plans

Add vcs_type to test example user plans

--- test-cljs/frontend/test_utils.cljs
+++ test-cljs/frontend/test_utils.cljs
@@ -126,31 +126,25 @@
       (assoc :piggieback-orgs ["circleci"]
              :org_name "test-org")))

+(defn- make-example-user-plans [plans]
+  (-> {:org_name "circleci"
+       :vcs_type "github"}
+      (assoc :plans plans)
+      (vector)))
+
 ;; The three functions below are to mimic the /api/v1/user/organizations/plans
 ;; payload for different possible cases.
-(def example-user-plans-free
-  [(-> {:org_name "circleci"}
-       (assoc :plans [(example-plan :free)]))])
+(def example-user-plans-free (make-example-user-plans [(example-plan :free)]))

-(def example-user-plans-paid
-  [(-> {:org_name "circleci"}
-       (assoc :plans [(example-plan :paid)]))])
+(def example-user-plans-paid (make-example-user-plans [(example-plan :paid)]))

-(def example-user-plans-osx
-  [(-> {:org_name "circleci"}
-       (assoc :plans [(example-plan :osx)]))])
+(def example-user-plans-osx (make-example-user-plans [(example-plan :osx)]))

-(def example-user-plans-trial
-  [(-> {:org_name "circleci"}
-       (assoc :plans [(example-plan :trial)]))])
+(def example-user-plans-trial (make-example-user-plans [(example-plan :trial)]))

-(def example-user-plans-expired-trial
-  [(-> {:org_name "circleci"}
-       (assoc :plans [(example-plan :expired-trial)]))])
+(def example-user-plans-expired-trial (make-example-user-plans [(example-plan :expired-trial)]))

-(def example-user-plans-piggieback
-  [(-> {:org_name "circleci"}
-       (assoc :plans [example-piggieback-plan (example-plan :free)]))])
+(def example-user-plans-piggieback (make-example-user-plans [example-piggieback-plan (example-plan :free)]))

 (defn state [{:keys [view user repo org state]}]
   (merge {:current-user {:login (or user "test-user")}


fix NPE when deps has not been run yet by making reset-classloader! a no-op

--- src/cake/project.clj
+++ src/cake/project.clj
@@ -55,7 +55,7 @@
   (alter-var-root #'*classloader*
     (fn [cl]
       (when cl (eval-in cl '(shutdown-agents)))
-      (let [classloader (make-classloader)]
+      (when-let [classloader (make-classloader)]
         (set-classpath! classloader)
         classloader))))


remove :deps and :dev-deps support since they break lein compatibility and the new :dev, :test, :ext options are better anyway

--- src/cake/project.clj
+++ src/cake/project.clj
@@ -215,22 +215,19 @@
         artifact (name project-name)
         artifact-version (str artifact "-" version)]
     (-> opts
-        (assoc :artifact-id       artifact
-               :group-id          (group project-name)
-               :version           version
-               :name              (or (:name opts) artifact)
-               :aot               (or (:aot opts) (:namespaces opts))
-               :context           (symbol (or (get *config* "project.context") (:context opts) "dev"))
-               :jar-name          (or (:jar-name opts) artifact-version)
-               :war-name          (or (:war-name opts) artifact-version)
-               :uberjar-name      (or (:uberjar-name opts) (str artifact-version "-standalone"))
-               :dependencies
-               (merge-with adjoin
-                           (qualify :main (dep-map (concat (:dependencies        opts) (:deps        opts)
-                                                           (:native-dependencies opts) (:native-deps opts))))
-                           (qualify :dev  (dep-map (concat (:dev-dependencies    opts) (:dev-deps    opts))))
-                           (qualify :test (dep-map (concat (:test-dependencies   opts) (:test-deps   opts))))))
-
+        (assoc :artifact-id  artifact
+               :group-id     (group project-name)
+               :version      version
+               :name         (or (:name opts) artifact)
+               :aot          (or (:aot opts) (:namespaces opts))
+               :context      (symbol (or (get *config* "project.context") (:context opts) "dev"))
+               :jar-name     (or (:jar-name opts) artifact-version)
+               :war-name     (or (:war-name opts) artifact-version)
+               :uberjar-name (or (:uberjar-name opts) (str artifact-version "-standalone"))
+               :dependencies (merge-with adjoin
+                               (qualify :main (dep-map (mapcat opts [:dependencies :native-dependencies])))
+                               (qualify :dev  (dep-map (:dev-dependencies  opts)))
+                               (qualify :test (dep-map (:test-dependencies opts)))))
         (assoc-path :source-path        "src")
         (assoc-path :test-path          "test")
         (assoc-path :resources-path     "resources")


cleanup

cleanup

--- test/clj/elephantdb/shard_test.clj
+++ test/clj/elephantdb/shard_test.clj
@@ -1,15 +0,0 @@
-(ns elephantdb.config-test
-  (:use clojure.test)
-  (:use [elephantdb shard testing]))
-
-(defn run-shard-test [numhosts numshards replication]
-  ;TODO finish
-  )
-
-(deftest test-sharder
-  (run-shard-test 1 1 1)
-  (run-shard-test 1 10 1)
-  (run-shard-test 2 2 1)
-  (run-shard-test 2 10 2)
-  (run-shard-test 20 64 3)
-  )


Children is a DOM property, not function.

--- src/cljs/c2/dom.cljs
+++ src/cljs/c2/dom.cljs
@@ -54,7 +54,7 @@
 (defn children
   "Return the children of a live DOM element."
   [node]
-  (.children (->dom node)))
+  (.-children (->dom node)))

 (defn parent
   "Return parent of a live DOM node."


tidying

tidying

--- src/clojure/core.clj
+++ src/clojure/core.clj
@@ -202,8 +202,8 @@
         (first cents)))))

-(defn peek-inside
-  ([sample-path] (peek-inside sample-path DEFAULT_BLOCK_SIZE))
+(defn frame-stats
+  ([sample-path] (frame-stats sample-path DEFAULT_BLOCK_SIZE))
   ([sample-path block-size]

    (let [SAMPLE_RATE (sample-rate sample-path)
@@ -370,19 +370,10 @@
         (assoc :f0-mean   (/ (:f0 f0-totals) n-f0s))
         )))

+(comment
   (dotimes [i 1]
-    (let [frame-stats (peek-inside "test/fixtures/test.wav")]
-;;      (doseq [frame frame-stats] (println frame))
-
-
-      (println :global (global-stats frame-stats))
-      ))
-
-(comment
-
-  (dotimes [i 1]
-    (lDet [frame-stats (peek-inside "test/fixtures/test.wav")]
-      ;;(doseq [frame frame-stats] (println frame))
+    (let [frame-stats (frame-stats "test/fixtures/test.wav")]
+      (doseq [frame frame-stats] (println frame))
       (println :global (global-stats frame-stats))
       ))


add web front end

add web front end

--- src/codestat/web.clj
+++ src/codestat/web.clj
@@ -1,5 +1,6 @@
 (ns codestat.web
-  (:use (clojure.java io)))
+  (:use (clojure.java io))
+  (:use (codestat mysql git)))

 ;;;
 ;;; web interface for code stat
@@ -8,40 +9,65 @@
 	"get the body"
 	[body]
 	(let [ret (line-seq (reader body))]
-		(spit "/tmp/req" ret)
+		(spit (str "/tmp/" (gensym)) ret)
 		ret))
+
+;;;
+;;; add a project to the database
+;;;/project.add
+;;;
+(defn add-project
+  [req]
+  (insert-project
+    (->project-rec
+      0 "project_name" "project_desc"
+      "vcs_url2" "vcs_login2" "vcs_pass2"
+      "issue_url3" "issue_login3" "issue_pass3"))
+  {:status 200
+   :headers {"Content-Type" "text/plain"}
+   :body "add-project"})
+
+;;;
+;;; return project list
+;;; /project.list
+;;;
+(defn get-project
+  [req]
+  (let [sb (StringBuffer.)]
+    (.append sb "
")
+    (doseq [p (query-project)]
+      (-> sb (.append "
")
+        (.append  "") (.append (:project_name p)) (.append "	")
+        (.append "") (.append (:vcs_url p)) (.append "	")
+        (.append "") (.append (:issue_url p)) (.append "	")
+        (.append "
")))
+    (.append sb "
")
+    {:status 200
+     :headers {"Content-Type" "text/html"}
+     :body (.toString sb)}))
+
+;;;
+;;; define handler map
+;;;
+(def ^:dynamic *handler-map*
+  (hash-map "/project.list" get-project
+            "/project.add" add-project))

+;;;
+;;; the dispatcher
+;;;
 (defn handler
    "ring handler"
-   [req]
+   [req]
+   (if-let [hlr (get *handler-map* (:uri req))]
+     (hlr req)
    (let [ret (str "uri:" (:uri req)
-                  "\nscheme:" (:scheme req)
-                  "\nrequest-method:" (:request-method req)
-                  "\nbody:" (get-body (:body req)))]
+             "\nscheme:" (:scheme req)
+             "\nrequest-method:" (:request-method req)
+             "\nbody:" (get-body (:body req)))]

    {:status 200
     :headers {"Content-Type" "text/plain"}
-    :body ret
-	}))
-
-;;;
-;;; add a project to the database
-;;;/project.add
-;;;
-(defn add-project
-  [req]
-  {:status 200
-   :headers {"Content-Type" "text/plain"}
-   :body ""})
-
-;;;
-;;; return project list
-;;; /project.list
-;;;
-(defn get-project
-  [req]
-  {:status 200
-   :headers {"Content-Type" "text/plain"}
-   :body ""})
+    :body ret })))


Another view tests added to the test-core module

--- test/emender_jenkins/core_test.clj
+++ test/emender_jenkins/core_test.clj
@@ -75,6 +75,36 @@
         (is (callable? 'emender-jenkins.core/get-port))))

+(deftest test-show-help-existence
+    "Check that the emender-jenkins.core/show-help definition exists."
+    (testing "if the emender-jenkins.core/show-help definition exists."
+        (is (callable? 'emender-jenkins.core/show-help))))
+
+
+(deftest test-print-environment-configuration-existence
+    "Check that the emender-jenkins.core/print-environment-configuration definition exists."
+    (testing "if the emender-jenkins.core/print-environment-configuration definition exists."
+        (is (callable? 'emender-jenkins.core/print-environment-configuration))))
+
+
+(deftest test-fetch-jobs-only-existence
+    "Check that the emender-jenkins.core/fetch-jobs-only definition exists."
+    (testing "if the emender-jenkins.core/fetch-jobs-only definition exists."
+        (is (callable? 'emender-jenkins.core/fetch-jobs-only))))
+
+
+(deftest test-show-config-existence
+    "Check that the emender-jenkins.core/show-config definition exists."
+    (testing "if the emender-jenkins.core/show-config definition exists."
+        (is (callable? 'emender-jenkins.core/show-config))))
+
+
+(deftest test-run-app-existence
+    "Check that the emender-jenkins.core/run-app definition exists."
+    (testing "if the emender-jenkins.core/run-app definition exists."
+        (is (callable? 'emender-jenkins.core/run-app))))
+
+
 (deftest test--main-existence
     "Check that the emender-jenkins.core/-main definition exists."
     (testing "if the emender-jenkins.core/-main definition exists."


Convert http tests to manifold

Convert http tests to manifold

--- test/icecap/handlers/http_test.clj
+++ test/icecap/handlers/http_test.clj
@@ -1,12 +1,12 @@
 (ns icecap.handlers.http-test
-  (:require [clojure.core.async :as a]
-            [manifold.deferred :as d]
+  (:require [manifold.deferred :as md]
             [icecap.handlers.core :refer [execute]]
             [icecap.schema :refer [check-plan]]
             [icecap.handlers.http :refer [valid-scheme?]]
             [icecap.test-data :refer [simple-http-step simple-https-step]]
             [aleph.http :as h]
-            [clojure.test :refer :all]))
+            [clojure.test :refer :all]
+            [manifold.stream :as ms]))

 (deftest schema-tests
   (testing "valid steps"
@@ -67,11 +67,9 @@

 (defn fake-request
   [_]
-  (d/success-deferred fake-response))
+  (md/success-deferred fake-response))

 (deftest execute-tests
-  (with-redefs
-   [h/request fake-request]
-    (is (let [ch (execute simple-http-step)
-              [result] (a/<!! (a/into [] ch))]
-          (= result fake-response)))))
+  (with-redefs [h/request fake-request]
+    (let [result (ms/stream->seq (execute simple-http-step))]
+      (= result [fake-response]))))


Functional wankery

Functional wankery

Cc @glyph @cyli

--- test/icecap/handlers/http_test.clj
+++ test/icecap/handlers/http_test.clj
@@ -18,10 +18,9 @@
     (are [s] (nil? (check-plan s))
          step))
   (testing "invalid steps"
-    (are [s expected] (= (let [step (merge {:type :http} s)
-                               result (check-plan step)]
-                           (pr-str result))
-                         (pr-str expected))
+    (are [s expected] (let [step (merge {:type :http} s)
+                            reprs (map pr-str [(check-plan step) expected])]
+                        (apply = reprs))
          {} '{:url missing-required-key}
          {:uri url} '{:uri disallowed-key
                       :url missing-required-key}


disable tests for old pooling lib

disable tests for old pooling lib

--- test/open_company/unit/db/pool.clj
+++ test/open_company/unit/db/pool.clj
@@ -5,134 +5,134 @@
 (def counter (atom 0))

 ;; simple init function that makes each resource a unique ascending int
-(def init (fn [] (swap! counter inc)))
+;; (def init (fn [] (swap! counter inc)))

-(def rethinkdb-connection-keys #{:ch :db :in :loops :out :pub :r-ch :socket :token :waiting})
+;; (def rethinkdb-connection-keys #{:ch :db :in :loops :out :pub :r-ch :socket :token :waiting})

-(defn reset-pool [new-pool] (reset! pool/rethinkdb-pool new-pool))
+;; (defn reset-pool [new-pool] (reset! pool/rethinkdb-pool new-pool))

-(with-state-changes [(before :facts (reset-pool nil))]
+;; (with-state-changes [(before :facts (reset-pool nil))]

-  (facts "about resource pools"
+;;   (facts "about resource pools"

-    (facts "when failing to start resource pools"
+;;     (facts "when failing to start resource pools"

-      ;; Pool size not positive
-      (pool/start* 0 0 init) => (throws AssertionError)
+;;       ;; Pool size not positive
+;;       (pool/start* 0 0 init) => (throws AssertionError)

-      ;; Pool size not sane
-      (pool/start* 5 3 init) => (throws AssertionError)
+;;       ;; Pool size not sane
+;;       (pool/start* 5 3 init) => (throws AssertionError)

-      ;; No init
-      (pool/start* 3 3 nil) => (throws AssertionError))
+;;       ;; No init
+;;       (pool/start* 3 3 nil) => (throws AssertionError))

-    (with-state-changes [(before :facts (reset! counter 0))]
+;;     (with-state-changes [(before :facts (reset! counter 0))]

-      (facts "when starting resource pools"
+;;       (facts "when starting resource pools"

-        (fact "pool starts at low size, not high size"
+;;         (fact "pool starts at low size, not high size"

-          (pool/start* 3 5 init) =>
-            {:connections #{
-              {:id 0 :connection 1}
-              {:id 1 :connection 2}
-              {:id 2 :connection 3}
-            }
-            :high 5
-            :low 3
-            :init init})
+;;           (pool/start* 3 5 init) =>
+;;             {:connections #{
+;;               {:id 0 :connection 1}
+;;               {:id 1 :connection 2}
+;;               {:id 2 :connection 3}
+;;             }
+;;             :high 5
+;;             :low 3
+;;             :init init})

-        (fact "pool knows when low and high size are the same"
+;;         (fact "pool knows when low and high size are the same"

-          (pool/start* 5 5 init) =>
-            {:connections #{
-              {:id 0 :connection 1}
-              {:id 1 :connection 2}
-              {:id 2 :connection 3}
-              {:id 3 :connection 4}
-              {:id 4 :connection 5}
-            }
-            :high 5
-            :low 5
-            :init init})))
+;;           (pool/start* 5 5 init) =>
+;;             {:connections #{
+;;               {:id 0 :connection 1}
+;;               {:id 1 :connection 2}
+;;               {:id 2 :connection 3}
+;;               {:id 3 :connection 4}
+;;               {:id 4 :connection 5}
+;;             }
+;;             :high 5
+;;             :low 5
+;;             :init init})))

-    (facts "when using resources"
+;;     (facts "when using resources"

-      (fact "it provides 2 resources, then no more"
+;;       (fact "it provides 2 resources, then no more"

-        (pool/start 2 2)
+;;         (pool/start 2 2)

-        (pool/with-connection [conn]
-          (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-          (pool/with-connection [conn]
-            (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-            (pool/with-connection [conn] (println conn)) =>
-              (throws RuntimeException "No connection available from DB pool")))) ; no more connections
+;;         (pool/with-connection [conn]
+;;           (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;           (pool/with-connection [conn]
+;;             (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;             (pool/with-connection [conn] (println conn)) =>
+;;               (throws RuntimeException "No connection available from DB pool")))) ; no more connections

-      (fact "it grows from 2 to 4, then no more"
+;;       (fact "it grows from 2 to 4, then no more"

-        (pool/start 2 4)
+;;         (pool/start 2 4)

-        (pool/with-connection [conn]
-          (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-          (pool/with-connection [conn]
-            (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-            (pool/with-connection [conn]
-              (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-              (pool/with-connection [conn]
-                (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-                (pool/with-connection [conn] (println conn)) =>
-                  (throws RuntimeException "No connection available from DB pool"))))))
+;;         (pool/with-connection [conn]
+;;           (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;           (pool/with-connection [conn]
+;;             (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;             (pool/with-connection [conn]
+;;               (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;               (pool/with-connection [conn]
+;;                 (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;                 (pool/with-connection [conn] (println conn)) =>
+;;                   (throws RuntimeException "No connection available from DB pool"))))))

-      (fact "it recovers from no more resources"
+;;       (fact "it recovers from no more resources"

-        (pool/start 2 2)
+;;         (pool/start 2 2)

-        (pool/with-connection [conn]
-          (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-          (pool/with-connection [conn]
-            (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
-            (pool/with-connection [conn] (println conn)) =>
-              (throws RuntimeException "No connection available from DB pool") ; no more connections
-            (pool/with-connection [conn] (println conn)) =>
-              (throws RuntimeException "No connection available from DB pool") ; no more connections
-            (pool/with-connection [conn] (println conn)) =>
-              (throws RuntimeException "No connection available from DB pool")) ; no more connections
-          (pool/with-connection [conn]
-            (keys @conn) => (just rethinkdb-connection-keys))))))) ; valid connection
+;;         (pool/with-connection [conn]
+;;           (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;           (pool/with-connection [conn]
+;;             (keys @conn) => (just rethinkdb-connection-keys) ; valid connection
+;;             (pool/with-connection [conn] (println conn)) =>
+;;               (throws RuntimeException "No connection available from DB pool") ; no more connections
+;;             (pool/with-connection [conn] (println conn)) =>
+;;               (throws RuntimeException "No connection available from DB pool") ; no more connections
+;;             (pool/with-connection [conn] (println conn)) =>
+;;               (throws RuntimeException "No connection available from DB pool")) ; no more connections
+;;           (pool/with-connection [conn]
+;;             (keys @conn) => (just rethinkdb-connection-keys))))))) ; valid connection

-(facts "about resource pools"
+;; (facts "about resource pools"

-  (fact "it provides the same resource sequentially"
+;;   (fact "it provides the same resource sequentially"

-    (reset! counter 0)
-    (reset-pool (pool/start* 2 4 init))
+;;     (reset! counter 0)
+;;     (reset-pool (pool/start* 2 4 init))

-    (pool/with-connection [res]
-      res => 1
-      (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}])))
+;;     (pool/with-connection [res]
+;;       res => 1
+;;       (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}])))

-    (pool/with-connection [res]
-      res => 1
-      (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}]))
+;;     (pool/with-connection [res]
+;;       res => 1
+;;       (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}]))

-    (pool/with-connection [res]
-      res => 1
-      (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}]))
+;;     (pool/with-connection [res]
+;;       res => 1
+;;       (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}]))

-    (pool/with-connection [res]
-      res => 1
-      (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}])
-      (pool/with-connection [res]
-        res => 2
-        (:connections @pool/rethinkdb-pool) =>
-          (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2 :busy true}])))
+;;     (pool/with-connection [res]
+;;       res => 1
+;;       (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}])
+;;       (pool/with-connection [res]
+;;         res => 2
+;;         (:connections @pool/rethinkdb-pool) =>
+;;           (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2 :busy true}])))

-    (pool/with-connection [res]
-      res => 1
-      (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}])
-      (pool/with-connection [res]
-        res => 2
-        (:connections @pool/rethinkdb-pool) =>
-          (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2 :busy true}]))))+;;     (pool/with-connection [res]
+;;       res => 1
+;;       (:connections @pool/rethinkdb-pool) => (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2}])
+;;       (pool/with-connection [res]
+;;         res => 2
+;;         (:connections @pool/rethinkdb-pool) =>
+;;           (just [{:id 0 :connection 1 :busy true} {:id 1 :connection 2 :busy true}]))))


Quick form to help with generating fixture

--- src/runbld/publish/email.clj
+++ src/runbld/publish/email.clj
@@ -96,6 +96,11 @@
                  (update :rcpt-to #(str/join ", " %1)))
              {:took-human (date/human-duration
                            (/ (:took ctx*) 1000))})]
+    ;; If needing to regenerate for render tests
+    #_(spit "context.edn"
+          (with-out-str
+            (clojure.pprint/pprint
+             (into (sorted-map) ctx))))
     (send* (opts :email)
            (-> opts :email :from)
            (split-addr (-> opts :email :to))


Fixed intermittent mime-types test failures.

--- common-lib/test/cmr/common/test/mime_types.clj
+++ common-lib/test/cmr/common/test/mime_types.clj
@@ -63,7 +63,8 @@
       (or ((disj supported-mime-types "*/*") mime-type)
           (= mime-type-str mime-type)
           (and (nil? mime-type)
-               (empty? mime-type-str))))))
+               (or (empty? mime-type-str)
+                   (= "*/*" mime-type-str)))))))

 (deftest convert-format-extension-to-mime-type
   (testing "valid extensions"


Update to ClojureScript 0.0-3269

Update to ClojureScript 0.0-3269

--- ClojureScript/project.clj
+++ ClojureScript/project.clj
@@ -1,7 +1,7 @@
 (defproject bocko-ios "0.2.0"
   :description "Use Bocko on iOS"
   :dependencies [[org.clojure/clojure "1.7.0-beta2"]
-                 [org.clojure/clojurescript "0.0-3255"]
+                 [org.clojure/clojurescript "0.0-3269"]
                  [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                  [bocko "0.3.0"]
                  [org.omcljs/ambly "0.1.0"]]


Release 0.2.0

Release 0.2.0

--- ClojureScript/project.clj
+++ ClojureScript/project.clj
@@ -1,4 +1,4 @@
-(defproject goby "0.2.0-SNAPSHOT"
+(defproject goby "0.2.0"
   :description "Develop iOS apps in ClojureScript"
   :url "http://github.com/mfikes/goby"
   :license {:name "Eclipse"


+dissoc-paths

+dissoc-paths

--- src/babel/italiano/lexicon.cljc
+++ src/babel/italiano/lexicon.cljc
@@ -49,7 +49,7 @@
    [clojure.edn :as edn]
    [clojure.java.io :refer [reader]]
    [clojure.repl :refer [doc]]
-   [dag_unify.core :refer [fail? get-in strip-refs unifyc]]))
+   [dag_unify.core :refer [dissoc-paths fail? get-in strip-refs unifyc]]))

 (declare edn2lexicon)


handle getting queue IDs from flare, generating queue data for 'system

--- src/gangway/util.clj
+++ src/gangway/util.clj
@@ -31,24 +31,29 @@
     (when worker-fn
       (msg/listen n (partial worker-fn (:db-conn system))))))

+(defn queue-definitions [qid]
+  (let [n (name qid)]
+    {:in {:name (str "queue.in." n)
+          :worker gangway.worker/do-work}
+     :out {:name (str "queue.out." n)
+           :worker gangway.disembark/disembark!}}))

 ;; TODO: handle exceptions
-(defn start-queues!
-  [system]
-  (let [queues (:queues system)]
+(defn start-queues! [system]
+  (let [qids (get-in system [:flare :queues])
+        queues (reduce (fn start-queues!- [c v]
+                         (assoc c v (queue-definitions v)))
+                       {} qids)]
+    #_
     (dorun (map (partial start-queue! system) queues))
-    (let [path [:gangway :queues]]
-      (assoc-in system path
-                (set (concat (get-in system path)
-                             (keys queues)))))))
+    (assoc-in system [:gangway :queues] queues)))

-(defn stop-queues!
 ;; TODO: handle exceptions
-  ([system] (stop-queues! system queues))
-  ([system queues]
-     (dorun
-      (map (fn stop-queues!- [k]
-             (let [q (queues k)]
-               (msg/stop (:name q))))
-           (get-in system [:gangway :queues])))
-     (assoc-in system [:gangway :queues] #{})))
+(defn stop-queues! [system]
+  (let [queues (get-in system [:gangway :queues])]
+    (dorun
+     (map (fn stop-queues!- [k]
+            (let [q (queues k)]
+              (msg/stop (:name q))))
+          (get-in system [:gangway :queues]))))
+  (assoc-in system [:gangway :queues] {}))


use the doseq, that's what it's there for

--- src/gangway/util.clj
+++ src/gangway/util.clj
@@ -32,7 +32,7 @@
                          (assoc c v (attache->queues v)))
                        {} attaches)
         qs (flatten (for [qsys queues] (vals (second qsys))))]
-    (dorun (map (partial start-queue! system) qs))
+    (doseq (map (partial start-queue! system) qs))
     (assoc-in system [:gangway :queues] queues)))

 ;; TODO: handle exceptions


Pacify kibit

Pacify kibit

--- src/grimoire/api.clj
+++ src/grimoire/api.clj
@@ -265,15 +265,15 @@
                      util/normalize-version)
         unv-path (t/thing->relative-path t/version thing)
         versions (e/result (list-versions config (:parent currentv)))]
-    (-> (for [v     versions
-              :when (<= 0 (semver/version-compare (:name v) added))
-              :when (>= 0 (semver/version-compare (:name v) current))]
-          ;; FIXME: this could be a direct constructor given an
-          ;; appropriate vehicle for doing so since the type is directed
-          ;; and single but may not generally make sense if this is not
-          ;; the case.
-          (t/path->thing (str (t/thing->path v) "/" unv-path)))
-        e/succeed)))
+    (e/succeed
+     (for [v     versions
+           :when (<= 0 (semver/version-compare (:name v) added))
+           :when (>= 0 (semver/version-compare (:name v) current))]
+       ;; FIXME: this could be a direct constructor given an
+       ;; appropriate vehicle for doing so since the type is directed
+       ;; and single but may not generally make sense if this is not
+       ;; the case.
+       (t/path->thing (str (t/thing->path v) "/" unv-path))))))

 (defn read-notes
   "Succeeds with a result Seq[Version, string], being the zip of list-notes with


Fix: phraser didn't use compsheet name!

Fix: phraser didn't use compsheet name!

--- src/aerobio/validate/compsheet.clj
+++ src/aerobio/validate/compsheet.clj
@@ -32,7 +32,8 @@

 (p/defphraser comp-eolok
   [_ problem]
-  "'CompSheet.csv' must use Linux or Win/Dos End Of Line (EOL) markers")
+  (format "'%s' must use Linux or Win/Dos End Of Line (EOL) markers"
+          (-> problem :val :name)))

 (def validate-eols (make-validator ::eolsok? :sep "\n"))