Add tests for transitive fns

Add tests for transitive fns

error: pathspec 'test/deepfns/transitive_test.cljc' did not match any file(s) known to git

--- test/deepfns/transitive_test.cljc
+++ test/deepfns/transitive_test.cljc
@@ -0,0 +1,127 @@
+(ns deepfns.transitive-test
+  (:require #?@(:clj [[clojure.test :refer :all]]
+                :cljs [[cljs.test :as test :refer [test-var]
+                        :refer-macros [is deftest]]])
+            [deepfns.transitive :refer :all]))
+
+(deftest =>-test
+  (are [expected fs m]
+      (is (= expected ((apply => fs) m)))
+    nil [:foo] nil
+
+    1 [:foo] {:foo 1}
+
+    2 [:foo :bar] {:foo {:bar 2}}
+
+    2 [:foo inc] {:foo 1}
+
+    "fizz" [:foo :bar] {:foo {:bar "fizz" :fizz 1} :buzz 2}))
+
+(deftest eq>-test
+  (are [expected expr1 expr2 m]
+      (is (= expected ((eq> expr1 expr2) m)))
+      true nil nil {}
+
+      true {:foo :bar} {:foo 1} {:bar 1}
+
+      false {:fizz :bar} {:foo 1} {:bar 1}
+
+      true {:foo :bar} {:foo :bar} {:bar 1}
+
+      true [:foo :bar] [:bar] {:bar 1}))
+
+(deftest if>-test
+  (are [expected pred then else m]
+      (is (= expected ((if> pred then else) m)))
+      nil nil nil nil {}
+
+      false nil true false {}
+
+      true {:foo :bar} true false {:bar 1}
+
+      true (eq> {:foo :bar} {:foo 1}) true false {:bar 1}
+
+      {:woot 1} (eq> {:foo :bar} {:foo 1})
+      {:woot :bar} "bad" {:bar 1}
+
+      "bad" (eq> {:foo :bar} {:foo 1})
+      {:woot :bar} "bad" {:bar 2}))
+
+(deftest when>-test
+  (are [expected pred then m]
+      (is (= expected ((when> pred then) m)))
+    nil nil nil {}
+
+    nil nil true {}
+
+    true {:foo :bar} true {:bar 1}
+
+    true (eq> {:foo :bar} {:foo 1}) true {:bar 1}
+
+    {:woot 1} (eq> {:foo :bar} {:foo 1}) {:woot :bar} {:bar 1}
+
+    nil (eq> {:foo :bar} {:foo 1}) {:woot :bar} {:bar 2}))
+
+(deftest map>-test
+  (are [expected f expr1 expr2 m]
+      (is (= expected ((map> f expr1 expr2) m)))
+    [] + nil nil {}
+
+    [] + [:foo] [:bar] {}
+
+    [] + [:foo] [:bar] {:foo 1}
+
+    [3] + [:foo] [:bar] {:foo 1 :bar 2}
+
+    [2] + [:foo] [:foo] {:foo 1 :bar 2}
+
+    [2] + [:foo :bar] [:foo] {:foo 1 :bar 2}
+
+    [2 3] + [:foo :bar] [:foo :foo] {:foo 1 :bar 2}))
+
+(deftest reduce1>-test
+  (are [expected f expr1 expr2 m]
+      (is (= expected ((reduce1> f expr1 expr2) m)))
+    nil + nil nil {}
+
+    nil + [:foo] [:bar] {}
+
+    1 + [:foo] [:bar] {:foo 1}
+
+    3 + [:foo] [:bar] {:foo 1 :bar 2}
+
+    4 + [:foo :bar] [:foo] {:foo 1 :bar 2}
+
+    5 + [:foo :bar] [:foo :foo] {:foo 1 :bar 2}))
+
+(deftest reduce2>-test
+  (are [expected f expr1 expr2 m]
+      (is (= expected ((reduce2> f 10 expr1 expr2) m)))
+    nil + nil nil {}
+
+    nil + [:foo] [:bar] {}
+
+    11 + [:foo] [:bar] {:foo 1}
+
+    13 + [:foo] [:bar] {:foo 1 :bar 2}
+
+    14 + [:foo :bar] [:foo] {:foo 1 :bar 2}
+
+    15 + [:foo :bar] [:foo :foo] {:foo 1 :bar 2}))
+
+(deftest filter>-test
+  (are [expected pred expr1 expr2 m]
+      (is (= expected ((filter> pred expr1 expr2) m)))
+    nil nil nil nil {}
+
+    nil nil [:foo] [:bar] {}
+
+    nil even? [:foo] [:bar] {:bazz (range 5)}
+
+    [0 2 4] even? [:foo] [:bar] {:foo (range 5)}
+
+    [0 2 4 0 2 4] even? [:foo] [:foo] {:foo (range 5)}
+
+    [0 2 4 6] even? [:foo] [:bar] {:foo (range 5) :bar 6}
+
+    [0 2 4 6 6] even? [:foo] [:bar :bar] {:foo (range 5) :bar 6}))


Split out columns

Split out columns

error: pathspec 'src/clojure/clojurewerkz/cassaforte/query/column.clj' did not match any file(s) known to git

--- src/clojure/clojurewerkz/cassaforte/query/column.clj
+++ src/clojure/clojurewerkz/cassaforte/query/column.clj
@@ -0,0 +1,24 @@
+(ns clojurewerkz.cassaforte.query.column)
+
+(defn write-time
+  "Selects the write time of provided column"
+  [column]
+  (fn writetime-query [query-builder]
+    (.writeTime query-builder (name column))))
+
+(defn ttl-column
+  "Selects the ttl of provided column."
+  [column]
+  (fn ttl-query [query-builder]
+    (.ttl query-builder (name column))))
+
+(defn distinct*
+  ""
+  [column]
+  (fn distinct-query [query-builder]
+    (.distinct (.column query-builder column))))
+
+(defn as
+  [wrapper alias]
+  (fn distinct-query [query-builder]
+    (.as (wrapper query-builder) alias)))


Adds progress-bar page.

Adds progress-bar page.

error: pathspec 'src/cljs/reagent_toolbox_docs/components/progress_bar.cljs' did not match any file(s) known to git

--- src/cljs/reagent_toolbox_docs/components/progress_bar.cljs
+++ src/cljs/reagent_toolbox_docs/components/progress_bar.cljs
@@ -0,0 +1,125 @@
+;;;; Copyright © 2017 Flexpoint Tech Ltd
+
+(ns reagent-toolbox-docs.components.progress-bar
+  (:require [reagent-toolbox-docs.layout :as layout]
+            [reagent-toolbox-docs.ui :as ui]))
+
+(defn view
+  []
+  (fn []
+    [:article
+     [:h1 "Progress Bar"]
+     [:p "Minimize visual changes that occur while your app loads content by representing "
+      "each operation with a single activity indicator. For example, a refresh operation should "
+      "display either a refresh bar or an activity circle, but not both."]
+
+     [ui/display-and-eval-code
+      "(defn progress-bar-test
+        []
+        (fn []
+          [:div
+           [reagent-toolbox.core/progress-bar {:type \"circular\"
+                                               :mode \"indeterminate\"}]
+           [reagent-toolbox.core/progress-bar {:type \"linear\"
+                                               :mode \"determinate\"
+                                               :value 83
+                                               :buffer 90}]]))
+
+       [progress-bar-test]"]
+
+     [:p "If you want to provide a theme via context, the component key is RTProgressBar."]
+
+     [:section
+      [:h2 "Properties"]
+
+      [:table
+       [:thead
+        [:tr
+         [:th "Name"]
+         [:th "Type"]
+         [:th "Default"]
+         [:th "Description"]]]
+       [:tbody
+        [:tr
+         [:td [:code "buffer"]]
+         [:td [:code "int"]]
+         [:td [:code "0"]]
+         [:td "Value of a secondary progress bar useful for buffering."]]
+        [:tr
+         [:td [:code "class-name"]]
+         [:td [:code "string"]]
+         [:td [:code "''"]]
+         [:td "Additional class name to provide custom styling."]]
+        [:tr
+         [:td [:code "disabled"]]
+         [:td [:code "boolean"]]
+         [:td [:code "false"]]
+         [:td "If true, component will be disabled."]]
+        [:tr
+         [:td [:code "max"]]
+         [:td [:code "int"]]
+         [:td [:code "100"]]
+         [:td "Maximum value permitted."]]
+        [:tr
+         [:td [:code "min"]]
+         [:td [:code "int"]]
+         [:td [:code "0"]]
+         [:td "Minimum value permitted."]]
+        [:tr
+         [:td [:code "mode"]]
+         [:td [:code "string"]]
+         [:td [:code "indeterminate"]]
+         [:td "Mode of the progress bar, it can be determinate or indeterminate."]]
+        [:tr
+         [:td [:code "multicolor"]]
+         [:td [:code "boolean"]]
+         [:td [:code "false"]]
+         [:td "If true, the circular progress bar will be changing its color."]]
+        [:tr
+         [:td [:code "type"]]
+         [:td [:code "string"]]
+         [:td [:code "linear"]]
+         [:td "Type of the progress bar, it can be circular or linear."]]
+        [:tr
+         [:td [:code "value"]]
+         [:td [:code "int"]]
+         [:td [:code "0"]]
+         [:td "Value of the current progress."]]
+        ]]]
+
+     [:section
+      [:h2 "Theme"]
+
+      [:table
+       [:thead
+        [:tr
+         [:th "Name"]
+         [:th "Description"]]]
+       [:tbody
+        [:tr
+         [:td [:code "buffer"]]
+         [:td "Used to style the buffer element in the linear progress."]]
+        [:tr
+         [:td [:code "circle"]]
+         [:td "Used for the circle element in the circular progress."]]
+        [:tr
+         [:td [:code "circular"]]
+         [:td "Used for the root element when the type is circular."]]
+        [:tr
+         [:td [:code "indeterminate"]]
+         [:td "Added to the root element if mode is indeterminate."]]
+        [:tr
+         [:td [:code "linear"]]
+         [:td "Used for the root element when the type is linear."]]
+        [:tr
+         [:td [:code "multicolor"]]
+         [:td "Added to the root if the component is multicolor (circular)."]]
+        [:tr
+         [:td [:code "path"]]
+         [:td "Used for the inner path in the circular progress."]]
+        [:tr
+         [:td [:code "value"]]
+         [:td "Used to style the value element in the linear progress."]]]]]]))
+
+(defmethod layout/pages :progress-bar [_]
+  [view])


implemented get-fields

implemented get-fields

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/skprasadu/crud-ui-framework.git/'


Sketch of UPR-like server/client goroutine state machines.

error: pathspec 'src/cbfg/npr.cljs' did not match any file(s) known to git

--- src/cbfg/npr.cljs
+++ src/cbfg/npr.cljs
@@ -0,0 +1,89 @@
+(ns cbfg.npr ; NPR stands for aNother Protocol for Replication, pronounced like UPR.
+  (:require-macros [cbfg.ago :refer [achan-buf ago ago-loop aclose aput atake]]))
+
+(defn npr-client-stream-request-msg [actx client token])
+(defn npr-snapshot-beg-msg [stream-request snapshot])
+(defn npr-snapshot-end-msg [stream-request snapshot])
+(defn npr-snapshot-item-msg [stream-request snapshot item])
+(defn npr-rollback-msg [stream-request rollback])
+(defn server-take-snapshot [actx server stream-request prev-snapshot])
+(defn client-snapshot-beg [actx client stream-request snapshot-beg])
+(defn client-snapshot-end [actx client stream-request snapshot-beg snapshot-end])
+(defn client-snapshot-item [actx client stream-request snapshot-beg snapshot-item])
+
+(defn make-npr-server-session [actx server stream-request to-client-ch]
+  (ago-loop npr-server-session actx
+            [stream-request stream-request
+             snapshot (server-take-snapshot actx server stream-request nil)
+             num-snapshots 0]
+            (cond
+             (nil? snapshot) (do (aput npr-server-session to-client-ch
+                                       (assoc stream-request :status :ok))
+                                 (aclose npr-server-session to-client-ch))
+             (:rollback snapshot) (do (aput npr-server-session to-client-ch
+                                            (npr-rollback-msg stream-request snapshot))
+                                      (aclose npr-server-session to-client-ch))
+             :else (do (aput npr-server-session to-client-ch
+                             (npr-snapshot-beg-msg stream-request snapshot))
+                       (doseq [item (:items snapshot)]
+                         (aput npr-server-session to-client-ch
+                               (npr-snapshot-item-msg stream-request snapshot item)))
+                       (aput npr-server-session to-client-ch
+                             (npr-snapshot-end-msg stream-request snapshot))
+                       (recur stream-request
+                              (server-take-snapshot actx server stream-request snapshot)
+                              (inc num-snapshots))))))
+
+(defn npr-client-loop [actx client stream-request snapshot-beg out from-server-ch]
+  (ago-loop npr-client-loop actx
+            [stream-request stream-request
+             snapshot-beg nil
+             r snapshot-beg
+             num-snapshots 0
+             num-items 0]
+            (cond
+             (nil? r) (do (aput npr-client-loop out {:status :closed})
+                          (aclose npr-client-loop out))
+             (= (:status r) :ok) (do (aput npr-client-loop out {:status :ok})
+                                     (aclose npr-client-loop out))
+             (and snapshot-beg
+                  (= (:status r) :part)
+                  (= (:sub-status r) :snapshot-item)) (if-let [err (client-snapshot-item npr-client-loop client
+                                                                                stream-request
+                                                                                snapshot-beg r)]
+                                                        (do (aput npr-client-loop out err)
+                                                            (aclose npr-client-loop out))
+                                                        (recur stream-request snapshot-beg
+                                                               (atake npr-client-loop from-server-ch)
+                                                               num-snapshots (inc num-items)))
+             (and snapshot-beg
+                  (= (:status r) :part)
+                  (= (:sub-status r) :snapshot-end)) (if-let [err (client-snapshot-end npr-client-loop client
+                                                                                stream-request
+                                                                                snapshot-beg r)]
+                                                       (do (aput npr-client-loop out err)
+                                                           (aclose npr-client-loop out))
+                                                       (recur stream-request nil
+                                                              (atake npr-client-loop from-server-ch)
+                                                              (inc num-snapshots) num-items))
+             (and (nil? snapshot-beg)
+                  (= (:status r) :part)
+                  (= (:sub-status r) :snapshot-beg)) (if-let [err (client-snapshot-beg npr-client-loop client
+                                                                                stream-request r)]
+                                                       (do (aput npr-client-loop out err)
+                                                           (aclose npr-client-loop out))
+                                                       (recur stream-request r
+                                                              (atake npr-client-loop from-server-ch)
+                                                              num-snapshots num-items))
+              :else (do (aput npr-client-loop out {:status :unexpected-msg})
+                        (aclose npr-client-loop out)))))
+
+(defn make-npr-client-session [actx client token to-server-ch from-server-ch]
+  (let [out (achan-buf actx 1)
+        stream-request (npr-client-stream-request-msg actx client token)]
+    (ago npr-client-session actx
+         (aput npr-client-session to-server-ch stream-request)
+         (npr-client-loop npr-client-session client stream-request
+                          (atake npr-client-session from-server-ch) out
+                          from-server-ch))
+    out))


Delete the clj code

Delete the clj code

--- storm-core/test/clj/org/apache/storm/scheduler/resource_aware_scheduler_test.clj
+++ storm-core/test/clj/org/apache/storm/scheduler/resource_aware_scheduler_test.clj
@@ -1,738 +0,0 @@
-;; Licensed to the Apache Software Foundation (ASF) under one
-;; or more contributor license agreements.  See the NOTICE file
-;; distributed with this work for additional information
-;; regarding copyright ownership.  The ASF licenses this file
-;; to you under the Apache License, Version 2.0 (the
-;; "License"); you may not use this file except in compliance
-;; with the License.  You may obtain a copy of the License at
-;;
-;; http://www.apache.org/licenses/LICENSE-2.0
-;;
-;; Unless required by applicable law or agreed to in writing, software
-;; distributed under the License is distributed on an "AS IS" BASIS,
-;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-;; See the License for the specific language governing permissions and
-;; limitations under the License.
-(ns org.apache.storm.scheduler.resource-aware-scheduler-test
-  (:use [clojure test])
-  (:use [org.apache.storm util config testing])
-  (:use [org.apache.storm.internal thrift])
-  (:require [org.apache.storm.util :refer [map-val]])
-  (:require [org.apache.storm.daemon [nimbus :as nimbus]])
-  (:import [org.apache.storm.generated StormTopology]
-           [org.apache.storm Config]
-           [org.apache.storm.testing TestWordSpout TestWordCounter]
-           [org.apache.storm.topology TopologyBuilder]
-           [org.apache.storm.utils Utils])
-  (:import [org.apache.storm.scheduler Cluster SupervisorDetails WorkerSlot ExecutorDetails
-            SchedulerAssignmentImpl Topologies TopologyDetails])
-  (:import [org.apache.storm.scheduler.resource RAS_Node RAS_Nodes ResourceAwareScheduler])
-  (:import [org.apache.storm Config StormSubmitter])
-  (:import [org.apache.storm LocalDRPC LocalCluster])
-  (:import [java.util HashMap]))
-
-(defn gen-supervisors [count ports]
-  (into {} (for [id (range count)
-                :let [supervisor (SupervisorDetails. (str "id" id)
-                                       (str "host" id)
-                                       (list ) (map int (range ports))
-                                   {Config/SUPERVISOR_MEMORY_CAPACITY_MB 2000.0
-                                    Config/SUPERVISOR_CPU_CAPACITY 400.0})]]
-            {(.getId supervisor) supervisor})))
-
-(defn to-top-map [topologies]
-  (into {} (for [top topologies] {(.getId top) top})))
-
-(defn ed [id] (ExecutorDetails. (int id) (int id)))
-
-(defn mk-ed-map [arg]
-  (into {}
-    (for [[name start end] arg]
-      (into {}
-        (for [at (range start end)]
-          {(ed at) name})))))
-(def DEFAULT_PRIORITY_STRATEGY "org.apache.storm.scheduler.resource.strategies.priority.DefaultSchedulingPriorityStrategy")
-(def DEFAULT_EVICTION_STRATEGY "org.apache.storm.scheduler.resource.strategies.eviction.DefaultEvictionStrategy")
-(def DEFAULT_SCHEDULING_STRATEGY "org.apache.storm.scheduler.resource.strategies.scheduling.DefaultResourceAwareStrategy")
-
-;; get the super->mem HashMap by counting the eds' mem usage of all topos on each super
-;TODO: when translating this function, you should replace the map-val with a proper for loop HERE
-(defn get-super->mem-usage [^Cluster cluster ^Topologies topologies]
-  (let [assignments (.values (.getAssignments cluster))
-        supers (.values (.getSupervisors cluster))
-        super->mem-usage (HashMap.)
-        _ (doseq [super supers]
-             (.put super->mem-usage super 0))]  ;; initialize the mem-usage as 0 for all supers
-    (doseq [assignment assignments]
-      (let [ed->super (into {}
-                            (for [[ed slot] (.getExecutorToSlot assignment)]
-                              {ed (.getSupervisorById cluster (.getNodeId slot))}))
-            super->eds (clojurify-structure (Utils/reverseMap ed->super))
-            topology (.getById topologies (.getTopologyId assignment))
-            super->mem-pertopo (map-val (fn [eds]
-                                          (reduce + (map #(.getTotalMemReqTask topology %) eds)))
-                                        super->eds)]  ;; sum up the one topo's eds' mem usage on a super
-            (doseq [[super mem] super->mem-pertopo]
-              (.put super->mem-usage
-                    super (+ mem (.get super->mem-usage super)))))) ;; add all topo's mem usage for each super
-    super->mem-usage))
-
-;; get the super->cpu HashMap by counting the eds' cpu usage of all topos on each super
-;TODO: when translating this function, you should replace the map-val with a proper for loop HERE
-(defn get-super->cpu-usage [^Cluster cluster ^Topologies topologies]
-  (let [assignments (.values (.getAssignments cluster))
-        supers (.values (.getSupervisors cluster))
-        super->cpu-usage (HashMap.)
-        _ (doseq [super supers]
-             (.put super->cpu-usage super 0))] ;; initialize the cpu-usage as 0 for all supers
-    (doseq [assignment assignments]
-      (let [ed->super (into {}
-                            (for [[ed slot] (.getExecutorToSlot assignment)]
-                              {ed (.getSupervisorById cluster (.getNodeId slot))}))
-            super->eds (clojurify-structure (Utils/reverseMap ed->super))
-            topology (.getById topologies (.getTopologyId assignment))
-            super->cpu-pertopo (map-val (fn [eds]
-                                          (reduce + (map #(.getTotalCpuReqTask topology %) eds)))
-                                        super->eds)] ;; sum up the one topo's eds' cpu usage on a super
-            (doseq [[super cpu] super->cpu-pertopo]
-              (.put super->cpu-usage
-                    super (+ cpu (.get super->cpu-usage super))))))  ;; add all topo's cpu usage for each super
-    super->cpu-usage))
-
-; testing resource/Node class
-(deftest test-node
-  (let [supers (gen-supervisors 5 4)
-        cluster (Cluster. (nimbus/standalone-nimbus) supers {} {})
-        topologies (Topologies. (to-top-map []))
-        node-map (RAS_Nodes/getAllNodesFrom cluster topologies)
-        topology1 (TopologyDetails. "topology1" {} nil 0)
-        topology2 (TopologyDetails. "topology2" {} nil 0)]
-    (is (= 5 (.size node-map)))
-    (let [node (.get node-map "id0")]
-      (is (= "id0" (.getId node)))
-      (is (= true (.isAlive node)))
-      (is (= 0 (.size (.getRunningTopologies node))))
-      (is (= true (.isTotallyFree node)))
-      (is (= 4 (.totalSlotsFree node)))
-      (is (= 0 (.totalSlotsUsed node)))
-      (is (= 4 (.totalSlots node)))
-      (.assign node (.next (.iterator (.getFreeSlots node))) topology1 (list (ExecutorDetails. 1 1)))
-      (is (= 1 (.size (.getRunningTopologies node))))
-      (is (= false (.isTotallyFree node)))
-      (is (= 3 (.totalSlotsFree node)))
-      (is (= 1 (.totalSlotsUsed node)))
-      (is (= 4 (.totalSlots node)))
-      (.assign node (.next (.iterator (.getFreeSlots node))) topology1 (list (ExecutorDetails. 2 2)))
-      (is (= 1 (.size (.getRunningTopologies node))))
-      (is (= false (.isTotallyFree node)))
-      (is (= 2 (.totalSlotsFree node)))
-      (is (= 2 (.totalSlotsUsed node)))
-      (is (= 4 (.totalSlots node)))
-      (.assign node (.next (.iterator (.getFreeSlots node))) topology2 (list (ExecutorDetails. 1 1)))
-      (is (= 2 (.size (.getRunningTopologies node))))
-      (is (= false (.isTotallyFree node)))
-      (is (= 1 (.totalSlotsFree node)))
-      (is (= 3 (.totalSlotsUsed node)))
-      (is (= 4 (.totalSlots node)))
-      (.assign node (.next (.iterator (.getFreeSlots node))) topology2 (list (ExecutorDetails. 2 2)))
-      (is (= 2 (.size (.getRunningTopologies node))))
-      (is (= false (.isTotallyFree node)))
-      (is (= 0 (.totalSlotsFree node)))
-      (is (= 4 (.totalSlotsUsed node)))
-      (is (= 4 (.totalSlots node)))
-      (.freeAllSlots node)
-      (is (= 0 (.size (.getRunningTopologies node))))
-      (is (= true (.isTotallyFree node)))
-      (is (= 4 (.totalSlotsFree node)))
-      (is (= 0 (.totalSlotsUsed node)))
-      (is (= 4 (.totalSlots node)))
-    )))
-
-(deftest test-sanity-resource-aware-scheduler
-  (let [builder (TopologyBuilder.)
-        _ (.setSpout builder "wordSpout" (TestWordSpout.) 1)
-        _ (.shuffleGrouping (.setBolt builder "wordCountBolt" (TestWordCounter.) 1) "wordSpout")
-        supers (gen-supervisors 1 2)
-        storm-topology (.createTopology builder)
-        topology1 (TopologyDetails. "topology1"
-                    {TOPOLOGY-NAME "topology-name-1"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology
-                    1
-                    (mk-ed-map [["wordSpout" 0 1]
-                                ["wordCountBolt" 1 2]]))
-        cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                  {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                   "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-        topologies (Topologies. (to-top-map [topology1]))
-        node-map (RAS_Nodes/getAllNodesFrom cluster topologies)
-        scheduler (ResourceAwareScheduler.)]
-    (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                         RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-    (.schedule scheduler topologies cluster)
-    (let [assignment (.getAssignmentById cluster "topology1")
-          assigned-slots (.getSlots assignment)
-          executors (.getExecutors assignment)]
-      (is (= 1 (.size assigned-slots)))
-      (is (= 1 (.size (into #{} (for [slot assigned-slots] (.getNodeId slot))))))
-      (is (= 2 (.size executors))))
-    (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology1")))))
-
-(deftest test-topology-with-multiple-spouts
-  (let [builder1 (TopologyBuilder.)  ;; a topology with multiple spouts
-        _ (.setSpout builder1 "wordSpout1" (TestWordSpout.) 1)
-        _ (.setSpout builder1 "wordSpout2" (TestWordSpout.) 1)
-        _ (doto
-            (.setBolt builder1 "wordCountBolt1" (TestWordCounter.) 1)
-            (.shuffleGrouping "wordSpout1")
-            (.shuffleGrouping "wordSpout2"))
-        _ (.shuffleGrouping (.setBolt builder1 "wordCountBolt2" (TestWordCounter.) 1) "wordCountBolt1")
-        _ (.shuffleGrouping (.setBolt builder1 "wordCountBolt3" (TestWordCounter.) 1) "wordCountBolt1")
-        _ (.shuffleGrouping (.setBolt builder1 "wordCountBolt4" (TestWordCounter.) 1) "wordCountBolt2")
-        _ (.shuffleGrouping (.setBolt builder1 "wordCountBolt5" (TestWordCounter.) 1) "wordSpout2")
-        storm-topology1 (.createTopology builder1)
-        topology1 (TopologyDetails. "topology1"
-                    {TOPOLOGY-NAME "topology-name-1"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology1
-                    1
-                    (mk-ed-map [["wordSpout1" 0 1]
-                                ["wordSpout2" 1 2]
-                                ["wordCountBolt1" 2 3]
-                                ["wordCountBolt2" 3 4]
-                                ["wordCountBolt3" 4 5]
-                                ["wordCountBolt4" 5 6]
-                                ["wordCountBolt5" 6 7]]))
-        builder2 (TopologyBuilder.)  ;; a topology with two unconnected partitions
-        _ (.setSpout builder2 "wordSpoutX" (TestWordSpout.) 1)
-        _ (.setSpout builder2 "wordSpoutY" (TestWordSpout.) 1)
-        storm-topology2 (.createTopology builder1)
-        topology2 (TopologyDetails. "topology2"
-                    {TOPOLOGY-NAME "topology-name-2"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology2
-                    1
-                    (mk-ed-map [["wordSpoutX" 0 1]
-                                ["wordSpoutY" 1 2]]))
-        supers (gen-supervisors 2 4)
-        cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                  {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                   "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-        topologies (Topologies. (to-top-map [topology1 topology2]))
-        scheduler (ResourceAwareScheduler.)]
-    (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                         RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-    (.schedule scheduler topologies cluster)
-    (let [assignment (.getAssignmentById cluster "topology1")
-          assigned-slots (.getSlots assignment)
-          executors (.getExecutors assignment)]
-      (is (= 1 (.size assigned-slots)))
-      (is (= 1 (.size (into #{} (for [slot assigned-slots] (.getNodeId slot))))))
-      (is (= 7 (.size executors))))
-    (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology1")))
-    (let [assignment (.getAssignmentById cluster "topology2")
-          assigned-slots (.getSlots assignment)
-          executors (.getExecutors assignment)]
-      (is (= 1 (.size assigned-slots)))
-      (is (= 1 (.size (into #{} (for [slot assigned-slots] (.getNodeId slot))))))
-      (is (= 2 (.size executors))))
-    (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology2")))))
-
-(deftest test-topology-set-memory-and-cpu-load
-  (let [builder (TopologyBuilder.)
-        _ (.setSpout builder "wordSpout" (TestWordSpout.) 1)
-        _ (doto
-            (.setBolt builder "wordCountBolt" (TestWordCounter.) 1)
-            (.setMemoryLoad 110.0)
-            (.setCPULoad 20.0)
-            (.shuffleGrouping "wordSpout"))
-        supers (gen-supervisors 2 2)  ;; to test whether two tasks will be assigned to one or two nodes
-        storm-topology (.createTopology builder)
-        topology2 (TopologyDetails. "topology2"
-                    {TOPOLOGY-NAME "topology-name-2"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology
-                    2
-                    (mk-ed-map [["wordSpout" 0 1]
-                                ["wordCountBolt" 1 2]]))
-        cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                  {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                   "org.apache.storm.testing.AlternateRackDNSToSwitchMapping"})
-        topologies (Topologies. (to-top-map [topology2]))
-        scheduler (ResourceAwareScheduler.)]
-    (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                         RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-    (.schedule scheduler topologies cluster)
-    (let [assignment (.getAssignmentById cluster "topology2")
-          assigned-slots (.getSlots assignment)
-          executors (.getExecutors assignment)]
-      ;; 4 slots on 1 machine, all executors assigned
-      (is (= 1 (.size assigned-slots)))
-      (is (= 1 (.size (into #{} (for [slot assigned-slots] (.getNodeId slot))))))
-      (is (= 2 (.size executors))))
-    (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology2")))))
-
-(deftest test-resource-limitation
-  (let [builder (TopologyBuilder.)
-        _ (doto (.setSpout builder "wordSpout" (TestWordSpout.) 2)
-            (.setMemoryLoad 1000.0 200.0)
-            (.setCPULoad 250.0))
-        _ (doto (.setBolt builder "wordCountBolt" (TestWordCounter.) 1)
-            (.shuffleGrouping  "wordSpout")
-            (.setMemoryLoad 500.0 100.0)
-            (.setCPULoad 100.0))
-        supers (gen-supervisors 2 2)  ;; need at least two nodes to hold these executors
-        storm-topology (.createTopology builder)
-        topology1 (TopologyDetails. "topology1"
-                    {TOPOLOGY-NAME "topology-name-1"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology
-                    2 ;; need two workers, each on one node
-                    (mk-ed-map [["wordSpout" 0 2]
-                                ["wordCountBolt" 2 3]]))
-        cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                  {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                   "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-        topologies (Topologies. (to-top-map [topology1]))
-        scheduler (ResourceAwareScheduler.)]
-    (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                         RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-    (.schedule scheduler topologies cluster)
-    (let [assignment (.getAssignmentById cluster "topology1")
-          assigned-slots (.getSlots assignment)
-          node-ids (map #(.getNodeId %) assigned-slots)
-          executors (.getExecutors assignment)
-          epsilon 0.000001
-          assigned-ed-mem (sort (map #(.getTotalMemReqTask topology1 %) executors))
-          assigned-ed-cpu (sort (map #(.getTotalCpuReqTask topology1 %) executors))
-          ed->super (into {}
-                            (for [[ed slot] (.getExecutorToSlot assignment)]
-                              {ed (.getSupervisorById cluster (.getNodeId slot))}))
-          super->eds (clojurify-structure (Utils/reverseMap ed->super))
-          mem-avail->used (into []
-                                 (for [[super eds] super->eds]
-                                   [(.getTotalMemory super) (reduce + (map #(.getTotalMemReqTask topology1 %) eds))]))
-          cpu-avail->used (into []
-                                 (for [[super eds] super->eds]
-                                   [(.getTotalCPU super) (reduce + (map #(.getTotalCpuReqTask topology1 %) eds))]))]
-    ;; 4 slots on 1 machine, all executors assigned
-    (is (= 2 (.size assigned-slots)))  ;; executor0 resides one one worker (on one), executor1 and executor2 on another worker (on the other node)
-    (is (= 2 (.size (into #{} (for [slot assigned-slots] (.getNodeId slot))))))
-    (is (= 3 (.size executors)))
-    ;; make sure resource (mem/cpu) assigned equals to resource specified
-    (is (< (Math/abs (- 600.0 (first assigned-ed-mem))) epsilon))
-    (is (< (Math/abs (- 1200.0 (second assigned-ed-mem))) epsilon))
-    (is (< (Math/abs (- 1200.0 (last assigned-ed-mem))) epsilon))
-    (is (< (Math/abs (- 100.0 (first assigned-ed-cpu))) epsilon))
-    (is (< (Math/abs (- 250.0 (second assigned-ed-cpu))) epsilon))
-    (is (< (Math/abs (- 250.0 (last assigned-ed-cpu))) epsilon))
-    (doseq [[avail used] mem-avail->used] ;; for each node, assigned mem smaller than total
-      (is (>= avail used)))
-    (doseq [[avail used] cpu-avail->used] ;; for each node, assigned cpu smaller than total
-      (is (>= avail used))))
-  (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology1")))))
-
-(deftest test-scheduling-resilience
-  (let [supers (gen-supervisors 2 2)
-         builder1 (TopologyBuilder.)
-         _ (.setSpout builder1 "spout1" (TestWordSpout.) 2)
-         storm-topology1 (.createTopology builder1)
-         topology1 (TopologyDetails. "topology1"
-                     {TOPOLOGY-NAME "topology-name-1"
-                      TOPOLOGY-SUBMITTER-USER "userC"
-                      TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                      TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                      TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                      TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                      TOPOLOGY-PRIORITY 0
-                      TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                     storm-topology1
-                     3 ;; three workers to hold three executors
-                     (mk-ed-map [["spout1" 0 3]]))
-         builder2 (TopologyBuilder.)
-         _ (.setSpout builder2 "spout2" (TestWordSpout.) 2)
-         storm-topology2 (.createTopology builder2)
-         topology2 (TopologyDetails. "topology2"
-                     {TOPOLOGY-NAME "topology-name-2"
-                      TOPOLOGY-SUBMITTER-USER "userC"
-                      TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 1280.0 ;; large enough thus two eds can not be fully assigned to one node
-                      TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                      TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                      TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                      TOPOLOGY-PRIORITY 0
-                      TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                     storm-topology2
-                     2  ;; two workers, each holds one executor and resides on one node
-                     (mk-ed-map [["spout2" 0 2]]))
-        scheduler (ResourceAwareScheduler.)]
-
-    (testing "When a worker fails, RAS does not alter existing assignments on healthy workers"
-      (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            topologies (Topologies. (to-top-map [topology2]))
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies cluster)
-            assignment (.getAssignmentById cluster "topology2")
-            failed-worker (first (vec (.getSlots assignment)))  ;; choose a worker to mock as failed
-            ed->slot (.getExecutorToSlot assignment)
-            failed-eds (.get (clojurify-structure (Utils/reverseMap ed->slot)) failed-worker)
-            _ (doseq [ed failed-eds] (.remove ed->slot ed))  ;; remove executor details assigned to the worker
-            copy-old-mapping (HashMap. ed->slot)
-            healthy-eds (.keySet copy-old-mapping)
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies cluster)
-            new-assignment (.getAssignmentById cluster "topology2")
-            new-ed->slot (.getExecutorToSlot new-assignment)]
-        ;; for each executor that was scheduled on healthy workers, their slots should remain unchanged after a new scheduling
-        (doseq [ed healthy-eds]
-          (is (.equals (.get copy-old-mapping ed) (.get new-ed->slot ed))))
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology2")))))
-
-    (testing "When a supervisor fails, RAS does not alter existing assignments"
-      (let [existing-assignments {"topology1" (SchedulerAssignmentImpl. "topology1"
-                                                                        {(ExecutorDetails. 0 0) (WorkerSlot. "id0" 0)    ;; worker 0 on the failed super
-                                                                         (ExecutorDetails. 1 1) (WorkerSlot. "id0" 1)    ;; worker 1 on the failed super
-                                                                         (ExecutorDetails. 2 2) (WorkerSlot. "id1" 1)})} ;; worker 2 on the health super
-            cluster (Cluster. (nimbus/standalone-nimbus) supers existing-assignments
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            topologies (Topologies. (to-top-map [topology1]))
-            assignment (.getAssignmentById cluster "topology1")
-            ed->slot (.getExecutorToSlot assignment)
-            copy-old-mapping (HashMap. ed->slot)
-            existing-eds (.keySet copy-old-mapping)  ;; all the three eds on three workers
-            new-cluster (Cluster. (nimbus/standalone-nimbus)
-                                  (dissoc supers "id0")        ;; mock the super0 as a failed supervisor
-                                  (.getAssignments cluster)
-                                  {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                                   "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies new-cluster) ;; the actual schedule for this topo will not run since it is fully assigned
-            new-assignment (.getAssignmentById new-cluster "topology1")
-            new-ed->slot (.getExecutorToSlot new-assignment)]
-        (doseq [ed existing-eds]
-          (is (.equals (.get copy-old-mapping ed) (.get new-ed->slot ed))))
-        (is (= "Fully Scheduled" (.get (.getStatusMap new-cluster) "topology1")))))
-
-    (testing "When a supervisor and a worker on it fails, RAS does not alter existing assignments"
-      (let [existing-assignments {"topology1" (SchedulerAssignmentImpl. "topology1"
-                                                                        {(ExecutorDetails. 0 0) (WorkerSlot. "id0" 1)    ;; the worker to orphan
-                                                                         (ExecutorDetails. 1 1) (WorkerSlot. "id0" 2)    ;; the worker to kill
-                                                                         (ExecutorDetails. 2 2) (WorkerSlot. "id1" 1)})} ;; the healthy worker
-            cluster (Cluster. (nimbus/standalone-nimbus) supers existing-assignments
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            topologies (Topologies. (to-top-map [topology1]))
-            assignment (.getAssignmentById cluster "topology1")
-            ed->slot (.getExecutorToSlot assignment)
-            _ (.remove ed->slot (ExecutorDetails. 1 1))  ;; delete one worker of super0 (failed) from topo1 assignment to enable actual schedule for testing
-            copy-old-mapping (HashMap. ed->slot)
-            existing-eds (.keySet copy-old-mapping)  ;; namely the two eds on the orphaned worker and the healthy worker
-            new-cluster (Cluster. (nimbus/standalone-nimbus)
-                                  (dissoc supers "id0")        ;; mock the super0 as a failed supervisor
-                                  (.getAssignments cluster)
-                                  {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                                   "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies new-cluster)
-            new-assignment (.getAssignmentById new-cluster "topology1")
-            new-ed->slot (.getExecutorToSlot new-assignment)]
-        (doseq [ed existing-eds]
-          (is (.equals (.get copy-old-mapping ed) (.get new-ed->slot ed))))
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap new-cluster) "topology1")))))
-
-    (testing "Scheduling a new topology does not disturb other assignments unnecessarily"
-      (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            topologies (Topologies. (to-top-map [topology1]))
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies cluster)
-            assignment (.getAssignmentById cluster "topology1")
-            ed->slot (.getExecutorToSlot assignment)
-            copy-old-mapping (HashMap. ed->slot)
-            new-topologies (Topologies. (to-top-map [topology1 topology2]))  ;; a second topology joins
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler new-topologies cluster)
-            new-assignment (.getAssignmentById cluster "topology1")
-            new-ed->slot (.getExecutorToSlot new-assignment)]
-        (doseq [ed (.keySet copy-old-mapping)]
-          (is (.equals (.get copy-old-mapping ed) (.get new-ed->slot ed))))  ;; the assignment for topo1 should not change
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology1")))
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology2")))))))
-
-;; Automated tests for heterogeneous cluster
-(deftest test-heterogeneous-cluster
-  (let [supers (into {} (for [super [(SupervisorDetails. (str "id" 0) (str "host" 0) (list )
-                                                         (map int (list 1 2 3 4))
-                                                         {Config/SUPERVISOR_MEMORY_CAPACITY_MB 4096.0
-                                                          Config/SUPERVISOR_CPU_CAPACITY 800.0})
-                                     (SupervisorDetails. (str "id" 1) (str "host" 1) (list )
-                                                         (map int (list 1 2 3 4))
-                                                         {Config/SUPERVISOR_MEMORY_CAPACITY_MB 1024.0
-                                                          Config/SUPERVISOR_CPU_CAPACITY 200.0})]]
-                          {(.getId super) super}))
-        builder1 (TopologyBuilder.)  ;; topo1 has one single huge task that can not be handled by the small-super
-        _ (doto (.setSpout builder1 "spout1" (TestWordSpout.) 1)
-            (.setMemoryLoad 2000.0 48.0)
-            (.setCPULoad 300.0))
-        storm-topology1 (.createTopology builder1)
-        topology1 (TopologyDetails. "topology1"
-                    {TOPOLOGY-NAME "topology-name-1"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology1
-                    1
-                    (mk-ed-map [["spout1" 0 1]]))
-        builder2 (TopologyBuilder.)  ;; topo2 has 4 large tasks
-        _ (doto (.setSpout builder2 "spout2" (TestWordSpout.) 4)
-            (.setMemoryLoad 500.0 12.0)
-            (.setCPULoad 100.0))
-        storm-topology2 (.createTopology builder2)
-        topology2 (TopologyDetails. "topology2"
-                    {TOPOLOGY-NAME "topology-name-2"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology2
-                    2
-                    (mk-ed-map [["spout2" 0 4]]))
-        builder3 (TopologyBuilder.) ;; topo3 has 4 medium tasks, launching topo 1-3 together requires the same mem as the cluster's mem capacity (5G)
-        _ (doto (.setSpout builder3 "spout3" (TestWordSpout.) 4)
-            (.setMemoryLoad 200.0 56.0)
-            (.setCPULoad 20.0))
-        storm-topology3 (.createTopology builder3)
-        topology3 (TopologyDetails. "topology3"
-                    {TOPOLOGY-NAME "topology-name-3"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology3
-                    2
-                    (mk-ed-map [["spout3" 0 4]]))
-        builder4 (TopologyBuilder.) ;; topo4 has 12 small tasks, each's mem req does not exactly divide a node's mem capacity
-        _ (doto (.setSpout builder4 "spout4" (TestWordSpout.) 2)
-            (.setMemoryLoad 100.0 0.0)
-            (.setCPULoad 30.0))
-        storm-topology4 (.createTopology builder4)
-        topology4 (TopologyDetails. "topology4"
-                    {TOPOLOGY-NAME "topology-name-4"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology4
-                    2
-                    (mk-ed-map [["spout4" 0 12]]))
-        builder5 (TopologyBuilder.) ;; topo5 has 40 small tasks, it should be able to exactly use up both the cpu and mem in teh cluster
-        _ (doto (.setSpout builder5 "spout5" (TestWordSpout.) 40)
-            (.setMemoryLoad 100.0 28.0)
-            (.setCPULoad 25.0))
-        storm-topology5 (.createTopology builder5)
-        topology5 (TopologyDetails. "topology5"
-                    {TOPOLOGY-NAME "topology-name-5"
-                     TOPOLOGY-SUBMITTER-USER "userC"
-                     TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                     TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                     TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                     TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 8192.0
-                     TOPOLOGY-PRIORITY 0
-                     TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                    storm-topology5
-                    2
-                    (mk-ed-map [["spout5" 0 40]]))
-        epsilon 0.000001
-        topologies (Topologies. (to-top-map [topology1 topology2]))]
-
-    (testing "Launch topo 1-3 together, it should be able to use up either mem or cpu resource due to exact division"
-      (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            topologies (Topologies. (to-top-map [topology1 topology2 topology3]))
-            scheduler (ResourceAwareScheduler.)
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies cluster)
-            super->mem-usage (get-super->mem-usage cluster topologies)
-            super->cpu-usage (get-super->cpu-usage cluster topologies)]
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology1")))
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology2")))
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology3")))
-        (doseq [super (.values supers)]
-          (let [mem-avail (.getTotalMemory super)
-                mem-used (.get super->mem-usage super)
-                cpu-avail (.getTotalCPU super)
-                cpu-used (.get super->cpu-usage super)]
-            (is (or (<= (Math/abs (- mem-avail mem-used)) epsilon)
-                    (<= (Math/abs (- cpu-avail cpu-used)) epsilon)))))))
-
-    (testing "Launch topo 1, 2 and 4, they together request a little more mem than available, so one of the 3 topos will not be scheduled"
-      (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            topologies (Topologies. (to-top-map [topology1 topology2 topology3]))
-            scheduler (ResourceAwareScheduler.)
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies cluster)
-                scheduled-topos (if (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology1")) 1 0)
-                scheduled-topos (+ scheduled-topos (if (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology2")) 1 0))
-                scheduled-topos (+ scheduled-topos (if (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology4")) 1 0))]
-            (is (= scheduled-topos 2)))) ;; only 2 topos will get (fully) scheduled
-
-    (testing "Launch topo5 only, both mem and cpu should be exactly used up"
-      (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-            topologies (Topologies. (to-top-map [topology5]))
-            scheduler (ResourceAwareScheduler.)
-            _ (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                                   RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-            _ (.schedule scheduler topologies cluster)
-            super->mem-usage (get-super->mem-usage cluster topologies)
-            super->cpu-usage (get-super->cpu-usage cluster topologies)]
-        (is (= "Running - Fully Scheduled by DefaultResourceAwareStrategy" (.get (.getStatusMap cluster) "topology5")))
-        (doseq [super (.values supers)]
-          (let [mem-avail (.getTotalMemory super)
-                mem-used (.get super->mem-usage super)
-                cpu-avail (.getTotalCPU ^SupervisorDetails super)
-                cpu-used (.get super->cpu-usage super)]
-            (is (and (<= (Math/abs (- mem-avail mem-used)) epsilon)
-                    (<= (Math/abs (- cpu-avail cpu-used)) epsilon)))))))))
-
-(deftest test-topology-worker-max-heap-size
-  (let [supers (gen-supervisors 2 2)]
-    (testing "test if RAS will spread executors across mulitple workers based on the set limit for a worker used by the topology")
-    (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-          scheduler (ResourceAwareScheduler.)
-          builder1 (TopologyBuilder.)
-          _ (.setSpout builder1 "spout1" (TestWordSpout.) 2)
-          storm-topology1 (.createTopology builder1)
-          topology1 (TopologyDetails. "topology1"
-                      {TOPOLOGY-NAME "topology-name-1"
-                       TOPOLOGY-SUBMITTER-USER "userA"
-                       TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                       TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                       TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                       TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 128.0
-                       TOPOLOGY-PRIORITY 0
-                       TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                      storm-topology1
-                      1
-                      (mk-ed-map [["spout1" 0 4]]))
-          topologies (Topologies. (to-top-map [topology1]))]
-      (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                           RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-      (.schedule scheduler topologies cluster)
-      (is (= (.get (.getStatusMap cluster) "topology1") "Running - Fully Scheduled by DefaultResourceAwareStrategy"))
-      (is (= (.getAssignedNumWorkers cluster topology1) 4)))
-    (testing "test when no more workers are available due to topology worker max heap size limit but there is memory is still available")
-    (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                              {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                               "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-          scheduler (ResourceAwareScheduler.)
-          builder1 (TopologyBuilder.)
-          _ (.setSpout builder1 "spout1" (TestWordSpout.) 2)
-          storm-topology1 (.createTopology builder1)
-          topology1 (TopologyDetails. "topology1"
-                      {TOPOLOGY-NAME "topology-name-1"
-                       TOPOLOGY-SUBMITTER-USER "userC"
-                       TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 128.0
-                       TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                       TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                       TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 128.0
-                       TOPOLOGY-PRIORITY 0
-                       TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-                      storm-topology1
-                      1
-                      (mk-ed-map [["spout1" 0 5]]))
-          topologies (Topologies. (to-top-map [topology1]))]
-      (.prepare scheduler {RESOURCE-AWARE-SCHEDULER-EVICTION-STRATEGY DEFAULT_EVICTION_STRATEGY
-                           RESOURCE-AWARE-SCHEDULER-PRIORITY-STRATEGY DEFAULT_PRIORITY_STRATEGY})
-      (.schedule scheduler topologies cluster)
-      ;;spout1 is going to contain 5 executors that needs scheduling. Each of those executors has a memory requirement of 128.0 MB
-      ;;The cluster contains 4 free WorkerSlots. For this topolology each worker is limited to a max heap size of 128.0
-      ;;Thus, one executor not going to be able to get scheduled thus failing the scheduling of this topology and no executors of this topology will be scheduleded
-      (is (= (.size (.getUnassignedExecutors cluster topology1)) 5))
-      (is (= (.get (.getStatusMap cluster) "topology1")  "Not enough resources to schedule - 0/5 executors scheduled")))
-
-    (let [cluster (Cluster. (nimbus/standalone-nimbus) supers {}
-                             {STORM-NETWORK-TOPOGRAPHY-PLUGIN
-                              "org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping"})
-          cluster (LocalCluster.)
-          builder1 (TopologyBuilder.)
-          _ (.setSpout builder1 "spout1" (TestWordSpout.) 2)
-          storm-topology1 (.createTopology builder1)
-          conf  {TOPOLOGY-NAME "topology-name-1"
-                 TOPOLOGY-SUBMITTER-USER "userC"
-                 TOPOLOGY-COMPONENT-RESOURCES-ONHEAP-MEMORY-MB 129.0
-                 TOPOLOGY-COMPONENT-RESOURCES-OFFHEAP-MEMORY-MB 0.0
-                 TOPOLOGY-COMPONENT-CPU-PCORE-PERCENT 10.0
-                 TOPOLOGY-WORKER-MAX-HEAP-SIZE-MB 128.0
-                 TOPOLOGY-PRIORITY 0
-                 TOPOLOGY-SCHEDULER-STRATEGY DEFAULT_SCHEDULING_STRATEGY}
-          topology1 (TopologyDetails. "topology1"
-                      conf
-                      storm-topology1
-                      1
-                      (mk-ed-map [["spout1" 0 5]]))
-          topologies (Topologies. (to-top-map [topology1]))]
-      (is (thrown? IllegalArgumentException
-            (StormSubmitter/submitTopologyWithProgressBar "test" conf storm-topology1)))
-
-  )))


bump dependency versions

bump dependency versions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aamedina/om-cljs.git/'


change chan to response-chan

change chan to response-chan

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/voter-registration-works.git/'


[EN] Remove seed import on startup.

[EN] Remove seed import on startup.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-authority-works.git/'


tweak

tweak

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jeelabs/jet.git/'


Add function for transforming a seq with a name and a value into a JSON member

error: pathspec 'src/berry/converters/to_member.clj' did not match any file(s) known to git

--- src/berry/converters/to_member.clj
+++ src/berry/converters/to_member.clj
@@ -0,0 +1,26 @@
+(ns berry.converters.to-member
+  (:require [berry.formatting :refer [indent]]))
+
+(declare colon transform-name)
+
+(defn to-member
+  [[name value] options to-json]
+  (let [{prettify? :prettify?} options
+        name (transform-name name options)
+        value (to-json value options to-json)]
+    (str name
+         (colon prettify?)
+         value)))
+
+(defn- colon
+  [prettify?]
+  (if prettify?
+    " : "
+    ":"))
+
+(defn- transform-name
+  [name options]
+  (let [{prettify? :prettify?} options]
+    (if prettify?
+      (indent name options)
+      name)))


s/schedule-message/scheduled-message

s/schedule-message/scheduled-message

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/scheduled-message-works.git/'


fix indentation

fix indentation

--- src/metabase/driver/generic_sql/query_processor.clj
+++ src/metabase/driver/generic_sql/query_processor.clj
@@ -155,7 +155,7 @@
                         ["IS_NULL" _]         ['=    nil]
                         ["BETWEEN" _ min max] ['between [min max]]
                         [_ _ value]           (let [value (if (date-field-id? field-id) `(raw ~(format "CAST('%s' AS DATE)" value)) ; cast YYYY-MM-DD string from UI
-                                                              value)]                                                              ; to SQL date if applicable
+                                                              value)]                                                               ; to SQL date if applicable
                                                 (match subclause
                                                   [">"  _ _] ['>    value]
                                                   ["<"  _ _] ['<    value]


added jstrength quine

added jstrength quine

error: pathspec 'src/main/cljc/clojure_club/x125_gus_quinundrum/jstrength.cljc' did not match any file(s) known to git


define additional Postgres types in driver

--- src/metabase/driver/postgres/sync.clj
+++ src/metabase/driver/postgres/sync.clj
@@ -6,23 +6,63 @@
 (def column->base-type
   "Map of Postgres column types -> Field base types.
    Add more mappings here as you come across them."
-  {:bool :BooleanField
-   :bytea :UnknownField
-   :date :DateField
-   :float8 :FloatField
-   :geometry :UnknownField
-   :inet :TextField             ; This was `GenericIPAddressField` in some places in the Django code but not others ...
-   :int2 :IntegerField
-   :int4 :IntegerField
-   :int8 :BigIntegerField
-   :json :TextField
-   :numeric :DecimalField
-   :serial :IntegerField
-   :text :TextField
-   :time :TimeField
-   :timestamp :DateTimeField
-   :timestamptz :DateTimeField
-   :varchar :TextField})
+  {:bigint        :BigIntegerField
+   :bigserial     :BigIntegerField
+   :bit           :UnknownField
+   :bool          :BooleanField
+   :boolean       :BooleanField
+   :box           :UnknownField
+   :bpchar        :CharField        ; "blank-padded char" is the internal name of "character"
+   :bytea         :UnknownField     ; byte array
+   :cidr          :TextField        ; IPv4/IPv6 network address
+   :circle        :UnknownField
+   :date          :DateField
+   :decimal       :DecimalField
+   :float4        :FloatField
+   :float8        :FloatField
+   :geometry      :UnknownField
+   :inet          :TextField        ; This was `GenericIPAddressField` in some places in the Django code but not others ...
+   :int           :IntegerField
+   :int2          :IntegerField
+   :int4          :IntegerField
+   :int8          :BigIntegerField
+   :interval      :UnknownField     ; time span
+   :json          :TextField
+   :jsonb         :TextField
+   :line          :UnknownField
+   :lseg          :UnknownField
+   :macaddr       :TextField
+   :money         :DecimalField
+   :numeric       :DecimalField
+   :path          :UnknownField
+   :pg_lsn        :IntegerField     ; PG Log Sequence #
+   :point         :UnknownField
+   :real          :FloatField
+   :serial        :IntegerField
+   :serial2       :IntegerField
+   :serial4       :IntegerField
+   :serial8       :BigIntegerField
+   :smallint      :IntegerField
+   :smallserial   :IntegerField
+   :text          :TextField
+   :time          :TimeField
+   :timetz        :TimeField
+   :timestamp     :DateTimeField
+   :timestamptz   :DateTimeField
+   :tsquery       :UnknownField
+   :tsvector      :UnknownField
+   :txid_snapshot :UnknownField
+   :uuid          :TextField
+   :varbit        :UnknownField
+   :varchar       :TextField
+   :xml           :TextField
+   (keyword "bit varying")                :UnknownField
+   (keyword "character varying")          :TextField
+   (keyword "double precision")           :FloatField
+   (keyword "time with time zone")        :TimeField
+   (keyword "time without time zone")     :TimeField
+   (keyword "timestamp with timezone")    :DateTimeField
+   (keyword "timestamp without timezone") :DateTimeField})

 (defmethod sync-tables :postgres [database]
   (binding [generic/*column->base-type* column->base-type]


Really simple interpreter

Really simple interpreter

error: pathspec 'src/aurora/interpreter.cljs' did not match any file(s) known to git

--- src/aurora/interpreter.cljs
+++ src/aurora/interpreter.cljs
@@ -0,0 +1,38 @@
+(ns aurora.interprer)
+
+(declare run-node)
+
+(defn run-value [node inputs actions]
+  (:value node))
+
+(defn run-cljs [node inputs actions]
+  (apply (:fn node) inputs))
+
+(defn run-pipe [node inputs actions]
+  (let [vars #js {}]
+    (doseq [[id value] (map vector (:inputs node) inputs)]
+      (aset vars id value))
+    (doseq [[id node-inputs node] (:nodes node)]
+      (aset vars id (run-node node (map #(aget vars %) node-inputs) actions))
+
+      (prn vars))
+    (aget vars (-> node :nodes last first))))
+
+(defn run-node [node inputs actions]
+  (:type node)
+  (let [output(case (:type node)
+                :value (run-value node inputs actions)
+                :cljs (run-cljs node inputs actions)
+                :pipe (run-pipe node inputs actions))]
+    (prn output)
+    output))
+
+(def example
+  {:type :pipe
+   :inputs ["a" "b" "c"]
+   :nodes [["b-squared" ["b" "b"] {:type :cljs :fn *}]
+           ["four" [] {:type :value :value 4}]
+           ["four-a-c" ["four" "a" "c"] {:type :cljs :fn *}]
+           ["result" ["b-squared" "four-a-c"] {:type :cljs :fn -}]]})
+
+(run-node example [1 4 2] nil)


statechart source-test stub

statechart source-test stub

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/ply.git/'


Add a little scratch file I worked with for a while before discovering it was unnecessary

error: pathspec 'src/foreclojure/scratch.clj' did not match any file(s) known to git

--- src/foreclojure/scratch.clj
+++ src/foreclojure/scratch.clj
@@ -0,0 +1,27 @@
+;;; Wrote this while trying to roll my own version of Last-Modified header
+;;; management. It turned out that Ring already has a middleware for this
+;;; (I was looking in Compojure instead of Ring), so this code isn't
+;;; necessary, but I'm disinclined to throw it out, since it's an interesting
+;;; example of how to work with HTTP dates in Clojure
+
+;; DateFormat isn't thread-safe, so don't globally def one
+(defn rfc-date-formatter []
+  (doto (SimpleDateFormat. "EEE, dd MMM yyyy HH:mm:ss 'GMT'")
+    (.setCalendar (-> "GMT"
+                      (TimeZone/getTimeZone)
+                      (Calendar/getInstance)))))
+
+(defn format-date [date]
+  (.format (rfc-date-formatter) date))
+
+(defn parse-date [date-str]
+  (.parse (rfc-date-formatter) date-str))
+
+(defn wrap-modtime [handler]
+  (fn [request]
+    (when-let [{body :body :as resp} (handler request)]
+      (if (instance? File body)
+        (let [modtime (.lastModified ^File body)]
+          (assoc-in resp [:headers "Last-Modified"]
+                    (format-date (Date. modtime))))
+        resp))))


Add subscription for selected files and validation for next step

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


start saving tutorials

start saving tutorials

error: pathspec 'src/maqueta/tutorials/simple_application.clj' did not match any file(s) known to git

--- src/maqueta/tutorials/simple_application.clj
+++ src/maqueta/tutorials/simple_application.clj
@@ -0,0 +1,17 @@
+(ns maqueta.tutorials.simple-application
+  (:use (maqueta application assets))
+  (:import com.jme3.scene.Geometry
+           com.jme3.scene.shape.Box
+           (com.jme3.math ColorRGBA Vector3f))
+  (:gen-class))
+
+(def geom (let [b (Box. Vector3f/ZERO 1 1 1)
+                geom (Geometry. "Box" b)
+                mat (load-material "Common/MatDefs/Misc/Unshaded.j3md")]
+            (.setColor mat "Color" ColorRGBA/Blue)
+            (.setMaterial geom mat)
+            geom))
+
+(defn -main
+  []
+  (.start (make-app :root-node geom)))


adds details to service detail view

adds details to service detail view


Support annotation indexing

Support annotation indexing

Allow retrieving an annotation record directly by `_id`

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


Use defel

Use defel

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leif47/immutabledb-experimental.git/'


Clojure Collector: remove lein-beanstalk (closes #3784)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/liveintent-berlin/snowplow.git/'


Add test for overloading quantization

Add test for overloading quantization

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jtbeckha/alda.git/'


hotfix reg-deadline-passed

hotfix reg-deadline-passed

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


Add a bit of extra logging on error

Add a bit of extra logging on error


update deps

update deps

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/JetBrains/imperative-nodejs.git/'


fix refer

fix refer

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/kenichirow/recipes.git/'


added about info

added about info

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/talexand/kittens-gallery.git/'


Fix some file-resource tests

Fix some file-resource tests

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/delitescere/yada.git/'


Enabled optimized "if" form test.

Enabled optimized "if" form test.

--- test/sablono/core_test.cljs
+++ test/sablono/core_test.cljs
@@ -97,11 +97,10 @@
   ;;      [:span ^String string] "x")))
   (testing "optimized forms"
     (is (= (html-str [:ul (for [n (range 3)] [:li n])]) "

0

1

2

"))
-    ;; (is (= (html [:div (if true
-    ;;                      [:span "foo"]
-    ;;                      [:span "bar"])])
-    ;;        "
foo
"))
-    )
+    (is (= (html-str [:div (if true
+                             [:span "foo"]
+                             [:span "bar"])])
+           "
foo
")))
   (testing "values are evaluated only once"
     (let [times-called (atom 0)
           foo #(swap! times-called inc)]


added spiral logic

added spiral logic

error: pathspec 'src/main/cljc/clojure_club/spiral_challenge/brockturner.cljc' did not match any file(s) known to git

--- src/main/cljc/clojure_club/spiral_challenge/brockturner.cljc
+++ src/main/cljc/clojure_club/spiral_challenge/brockturner.cljc
@@ -0,0 +1,28 @@
+(ns clojure-club.spiral-challenge.brockturner)
+
+
+(defn seq->spiral [s]
+  (loop [spiral [[]]
+         s s]
+    (let [new-spiral (apply mapv (comp vec reverse vector) spiral)
+          n (max 1 (count (first new-spiral)))
+          final-spiral (conj new-spiral (vec (take n s)))
+          final-seq (drop n s)]
+      (if (seq final-seq)
+        (recur final-spiral final-seq)
+        final-spiral))))
+
+
+(defn padded-num [c n]
+  (let [s (str n)]
+    (str (apply str (repeat (- c (count s)) " "))
+         s)))
+
+(defn pretty-print-spiral [s]
+  (let [len (->> (flatten s)
+                 (map (comp count str))
+                 (apply max))]
+    (run! #(apply println (map (partial padded-num len) %))
+          s)))
+
+;; (pretty-print-spiral (seq->spiral (range 20)))


Add compatibility lib for clojure.test

Add compatibility lib for clojure.test

error: pathspec 'compat.clj' did not match any file(s) known to git

--- compat.clj
+++ compat.clj
@@ -0,0 +1,17 @@
+(ns #^{:doc "Compatibility layer for old clojure.test"}
+  com.stuartsierra.lazytest.compat
+  (:require [com.stuartsierra.lazytest :as lazy]
+            [clojure.test :as old]))
+
+(defmacro are [& args]
+  `(old/are ~@args))
+
+(defmacro is
+  ([form & other] `(assert ~form)))
+
+(defmacro deftest [name & body]
+  `(lazy/deftest ~name []
+     (do ~@body)))
+
+(defmacro testing [string & body]
+  `(do ~@body))


works with sql database

works with sql database

no problems in this file, works like a charm

error: pathspec 'src/adder/dbManagement.clj' did not match any file(s) known to git

--- src/adder/dbManagement.clj
+++ src/adder/dbManagement.clj
@@ -0,0 +1,95 @@
+(ns adder.dbManagement
+  (:require [clojure.java.jdbc :as sql]))
+
+
+(def db {:classname "com.mysql.jdbc.Driver"
+         :subprotocol "mysql"
+         :subname "//localhost:3306/watchlist"
+         :user "root"
+         :password ""})
+
+;(defn list-movies []
+ ; (sql/with-connection db
+  ;  (sql/with-query-results rows
+   ;   ["select * from flick"]
+      ;(println rows)
+    ;  )))
+
+
+
+
+(defn list-one-film-from-series [id sid]
+  (flatten (sql/with-connection db
+    (sql/with-query-results row
+      ["select * from flick where id = ? and series =?" id]
+      (doall row)))))
+
+
+
+;(defn save-film )
+
+;film CRUDS
+;moze samo :name
+
+(defn list-all-movies-from-serie [sid]
+  (flatten (sql/with-connection db
+    (sql/with-query-results row
+      ["select * from flick where series =?" sid]
+      (doall row)))))
+
+(defn list-movies []
+  (flatten (sql/with-connection db
+    (sql/with-query-results rows
+      ["select * from flick"]
+      (doall rows)))))
+
+(defn list-one-film [id]
+  (flatten (sql/with-connection db
+    (sql/with-query-results row
+      ["select * from flick where id = ?" id]
+      (doall row)))))
+
+(defn insert-flick [name Producer location duration series]
+  (sql/with-connection db (sql/insert-values :flick [:name :Producer :location :duration :series] [name Producer location duration series])))
+
+(defn update-flick [id update-map]
+  (sql/with-connection db
+    (sql/update-values :flick ["id=?" id] update-map)))
+
+(defn delete-flick [id]
+  (sql/with-connection db
+    (sql/delete-rows :flick ["id=?" id])))
+
+(defn load-image-path [id]
+  (:location (first (sql/with-connection db
+    (sql/with-query-results row
+      ["select location from flick where id = ?" id]
+      (doall row))))))
+;;END
+
+;;SERIES CRUDS
+(defn list-one-series [id]
+  (flatten (sql/with-connection db
+    (sql/with-query-results row
+      ["select * from series where Series_ID = ?" id]
+      (doall row)))))
+
+;(defn save-film )
+
+
+(defn list-series []
+  (flatten (sql/with-connection db
+    (sql/with-query-results rows
+      ["select * from series"]
+      (doall rows)))))
+
+(defn insert-serie [series_name series_production]
+  (sql/with-connection db (sql/insert-values :series [:series_name :series_production] [series_name series_production])))
+
+(defn update-serie [id update-map]
+  (sql/with-connection db
+    (sql/update-values :series ["Series_ID=?" id] update-map)))
+
+(defn delete-series [id]
+  (sql/with-connection db
+    (sql/delete-rows :series ["Series_ID=?" id])))


add missing deployment utils

add missing deployment utils

error: pathspec 'cimi-resources/src/com/sixsq/slipstream/ssclj/resources/deployment/utils.clj' did not match any file(s) known to git

--- cimi-resources/src/com/sixsq/slipstream/ssclj/resources/deployment/utils.clj
+++ cimi-resources/src/com/sixsq/slipstream/ssclj/resources/deployment/utils.clj
@@ -0,0 +1,47 @@
+(ns com.sixsq.slipstream.ssclj.resources.deployment.utils)
+
+
+(def node-output-params [{:parameter   "abort"
+                          :description "Machine abort flag, set when aborting"},
+                         {:parameter   "url.ssh"
+                          :description "SSH URL to connect to virtual machine"},
+                         {:parameter   "password.ssh"
+                          :description "SSH password if available"},
+                         {:parameter   "keypair.name"
+                          :description "SSH keypair name used"},
+                         {:parameter   "url.service"
+                          :description "Optional service URL for virtual machine"},
+                         {:parameter   "statecustom"
+                          :description "Custom state"},
+                         {:parameter   "complete"
+                          :description "'true' when current state is completed"},
+                         {:parameter   "instanceid"
+                          :description "Cloud instance id"},
+                         {:parameter   "hostname"
+                          :description "Hostname or IP address of the image"}])
+
+(def node-input-params [{:parameter   "credential.id"
+                         :description "Cloud credential ID for managing node deployment"}])
+
+(def global-parameters [{:parameter   "ss:complete"
+                         :description "Global complete flag, set when run completed"},
+                        {:parameter   "ss:state"
+                         :description "Global execution state"
+                         :value       "Executing"},
+                        {:parameter   "ss:abort"
+                         :description "Run abort flag, set when aborting"},
+                        {:parameter   "ss:url.service"
+                         :description "Optional service URL for the deployment"}])
+
+
+(defn add-service-params
+  [{{:keys [type]} :module :as deployment-template}]
+  (if (#{"COMPONENT" "IMAGE"} type)
+    ;;TODO perhaps node params should be add at module creation to simplify mappings for applications in UI,
+    ;;TODO potential problem is if we decide to add a remove node params at creation time on existing modules and depl templ...
+    (-> deployment-template
+        (update-in [:module :content :outputParameters] concat node-output-params)
+        (update-in [:module :content :inputParameters] concat node-input-params)
+        (assoc :outputParameters global-parameters))
+    deployment-template                                     ;;TODO add service params for each node
+    ))


Catch zero jobs in balanced scheduler.

Catch zero jobs in balanced scheduler.

--- src/onyx/scheduling/balanced_job_scheduler.clj
+++ src/onyx/scheduling/balanced_job_scheduler.clj
@@ -23,16 +23,18 @@

 (defmethod cjs/job-offer-n-peers :onyx.job-scheduler/balanced
   [{:keys [jobs peers] :as replica}]
-  (let [j (count jobs)
-        p (count peers)
-        min-peers (int (/ p j))
-        n (rem p j)
-        max-peers (inc min-peers)]
-    (reduce
-     (fn [all [job k]]
-       (assoc all job (if (< k n) max-peers min-peers)))
-     {}
-     (map vector jobs (range)))))
+  (if (seq jobs)
+    (let [j (count jobs)
+          p (count peers)
+          min-peers (int (/ p j))
+          n (rem p j)
+          max-peers (inc min-peers)]
+      (reduce
+       (fn [all [job k]]
+         (assoc all job (if (< k n) max-peers min-peers)))
+       {}
+       (map vector jobs (range))))
+    {}))

 (defmethod cjs/claim-spare-peers :onyx.job-scheduler/balanced
   [replica jobs n]


reorg

reorg

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/transwarp.git/'


notification/send-or-schedule is fire-and-forget

So we no longer need to look at the response,
there isn't one anymore.


add bigst.clj

add bigst.clj

error: pathspec 'clojure/bigst.clj' did not match any file(s) known to git

--- clojure/bigst.clj
+++ clojure/bigst.clj
@@ -0,0 +1,4 @@
+(defn big
+  "Return tree unless string is longer than n"
+  [string n]
+  (<= (count string) n))


added HTTP to url for facebook and twitter share

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/DajanaStiberova/green-recipes.git/'


get rid of global variable

get rid of global variable

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ivankanis/CodinGame.git/'


Added a quotes api example for rest

Added a quotes api example for rest

error: pathspec 'src/main/clj/clojure_club/clj_http/programming_quotes_api.clj' did not match any file(s) known to git

--- src/main/clj/clojure_club/clj_http/programming_quotes_api.clj
+++ src/main/clj/clojure_club/clj_http/programming_quotes_api.clj
@@ -0,0 +1,16 @@
+(ns clojure-club.clj-http.programming-quotes-api
+  (:require [clj-http.client :as client]))
+
+(defn all-quotes []
+  (let [request {:method :get
+                 :as :json-strict
+                 :url "https://programming-quotes-api.herokuapp.com/quotes"}]
+    (:body (client/request request))))
+
+(comment
+  (->> (all-quotes)
+       (filter (fn [{:keys [en]}]
+                 (some-> en
+                         cs/upper-case
+                         (cs/includes? "COMPLEX"))))
+       (map (juxt :en :author))))


Add tests for character encoding

Add tests for character encoding

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/meowcakes/ring.git/'


oops, add uncommit npm check versions ns

error: pathspec 'src/main/shadow/cljs/npm/check_versions.clj' did not match any file(s) known to git

--- src/main/shadow/cljs/npm/check_versions.clj
+++ src/main/shadow/cljs/npm/check_versions.clj
@@ -0,0 +1,70 @@
+(ns shadow.cljs.npm.check-versions
+  (:require [shadow.cljs.devtools.api :as shadow]
+            [shadow.build.data :as data]
+            [shadow.build.npm :as npm]
+            [clojure.string :as str]
+            [shadow.cljs.devtools.server.npm-deps :as npm-deps]
+            [shadow.cljs.util :as util]
+            [shadow.cljs.devtools.api :as api]
+            [shadow.cljs.devtools.server.util :as sutil]
+            [shadow.build :as build]))
+
+(defn check-npm-versions [{::keys [version-checked] :keys [npm] :as state}]
+  (let [pkg-index
+        (->> (data/get-build-sources state)
+             (filter #(= :shadow-js (:type %)))
+             (map :package-name)
+             (remove nil?)
+             (remove #(contains? version-checked %))
+             (into #{})
+             (reduce
+               (fn [m package-name]
+                 (assoc m package-name (npm/find-package npm package-name)))
+               {}))]
+
+    (if-not (seq pkg-index)
+      ;; prevent the extra verbose log entry when no check is done
+      state
+      ;; keeping track of what we checked so its not repeatedly check during watch
+      ;; FIXME: updating npm package while watch is running will not check again
+      (reduce
+        (fn [state package-name]
+          (doseq [[dep wanted-version]
+                  (merge (get-in pkg-index [package-name :package-json "dependencies"])
+                    (get-in pkg-index [package-name :package-json "peerDependencies"]))
+                  ;; not all deps end up being used so we don't need to check the version
+                  :when (get pkg-index dep)
+                  :let [installed-version (get-in pkg-index [dep :package-json "version"])]
+                  :when (and (not (str/includes? wanted-version "http:"))
+                             (not (str/includes? wanted-version "https:"))
+                             (not (str/includes? wanted-version "file:"))
+                             (not (str/includes? wanted-version "github:")))
+                  :when (not (npm-deps/semver-intersects wanted-version installed-version))]
+
+            (format "npm package \"%s\" expected version \"%s@%s\" but \"%s\" is installed."
+              package-name
+              dep
+              wanted-version
+              installed-version))
+
+          (update state ::version-checked util/set-conj package-name))
+        state
+        (keys pkg-index)))))
+
+(defn -main [build-id]
+  (let [build-id
+        (keyword build-id)
+
+        build-config
+        (api/get-build-config build-id)
+
+        opts
+        {}
+
+        build-state
+        (api/with-runtime
+          (-> (sutil/new-build build-config :release opts)
+              (build/configure :release build-config opts)
+              (build/resolve)))]
+
+    (check-npm-versions build-state)))


Initial commit of rule to link identifiers who denote classes that share a label

error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403
fatal: the remote end hung up unexpectedly


Awesome, a lot more solid.

Awesome, a lot more solid.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


Add optional Project.links.team

Add optional Project.links.team

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


[EN] Use try/finally for tests.

[EN] Use try/finally for tests.

Still wondering about why have it come from config.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-authority-works.git/'


Fixed opening multiple mongo connections problem. Might need to convert the connection into an atom

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aneeshpu/pms.git/'


Return all HEAD revisions

Return all HEAD revisions


a couple of tests for YB.core.chat (#200)

error: pathspec 'test/yetibot/core/test/chat.clj' did not match any file(s) known to git

--- test/yetibot/core/test/chat.clj
+++ test/yetibot/core/test/chat.clj
@@ -0,0 +1,34 @@
+(ns yetibot.core.test.chat
+  (:require [midje.sweet :refer [facts fact =>]]
+            [clojure.string :as s]
+            [yetibot.core.chat :as c]))
+
+(facts
+ "about contains-image-url-lines?"
+ (fact
+  "it will return 'false' for strings that do not contain a URL with image
+   like chars"
+  (c/contains-image-url-lines? "image.jpg") => false
+  (c/contains-image-url-lines? "http://image.html") => false
+  (c/contains-image-url-lines? "http://image.jpeeeg") => false
+  (c/contains-image-url-lines? "http://image.pnnng") => false
+  (c/contains-image-url-lines? "http://image.giiif") => false)
+
+ (fact
+  "it will return 'true' for strings that do contain a URL with image
+   like chars"
+  (c/contains-image-url-lines? "http://image.jpg") => true
+  (c/contains-image-url-lines? "https://image.jpg") => true
+  (c/contains-image-url-lines? "https://image.jpeg") => true
+  (c/contains-image-url-lines? "http://image.png") => true
+  (c/contains-image-url-lines? "http://image.gif") => true))
+
+(facts
+ "about should-send-msg-for-each?"
+ (fact
+  "it will return 'true' when you pass it a legit chat data stucture and
+   a formatted message that has \newlines and URLs that contain image like
+   chars"
+  (let [data ["look at my picture"
+              "http://image.jpg"]]
+    (c/should-send-msg-for-each? data (s/join \newline data)) => true)))


More clojure testing, including sad paths

--- jvm-runner/test/codewars/core_test.clj
+++ jvm-runner/test/codewars/core_test.clj
@@ -2,6 +2,7 @@
   (:require [clojure.test :refer :all]
             [codewars.core :refer [-main]]
             [cheshire.core :as json]
+            [codewars.clojure.test]
             [codewars.runner :refer [run]]))

 (deftest sanity-check
@@ -10,12 +11,12 @@
       (with-redefs [run identity]
         (is (= 1 (-main)))))))

-(deftest handle-nonsense-language
+(deftest nonsense-language
   (testing "An illegal argument exception will be emitted by main if an invalid language is passed"
     (with-in-str "{\"language\": \"blorg\"}"
       (is (thrown? IllegalArgumentException (-main))))))

-(deftest handle-clojure
+(deftest basic-clojure
   (testing "-main can handle a very basic clojure solution and fixture"
     (with-in-str
       (json/generate-string
@@ -25,10 +26,41 @@
       (is (= {:type :summary, :fail 0, :error 0, :pass 0, :test 0}
              (-main))))))

-(deftest handle-java
+(deftest basic-java
   (testing "-main can handle a very basic java solution and fixture"
     (with-in-str (json/generate-string
                   {:language "java"
                    :solution "class Foo {}"
                    :fixture "class Bar {}"})
       (is (= org.junit.runner.Result (class (-main)))))))
+
+(deftest simple-clojure
+  (testing "-main can handle a simple clojure solution and fixture"
+    (with-in-str
+      (json/generate-string
+       {:language "clojure"
+        :solution "(ns foo1)
+                   (defn wizard [] :ok)"
+        :fixture "(ns bar1
+                    (:require [foo1]
+                      [clojure.test :refer :all]))
+                  (deftest ok (is (= :ok (foo1/wizard))))"})
+      (is (= {:type :summary, :fail 0, :error 0, :pass 1, :test 1}
+             (-main))))))
+
+(deftest clojure-sadpath
+  (testing "-main can handle an erroneous test fixture"
+    (with-in-str
+      (json/generate-string
+       {:language "clojure"
+        :solution "(ns dio)
+                   (defn holy-diver [] :ride-the-tiger)"
+        :fixture "(ns race.for.the.morning
+                    (:require [dio]
+                      [clojure.test :refer :all]))
+                  (deftest oh-we-will-pray-its-all-right
+                      (is (= :gotta-get-away (dio/holy-diver))))"})
+      (is (= {:type :summary, :fail 1, :error 0, :pass 0, :test 1}
+             (with-redefs
+               [codewars.clojure.test/fail (constantly nil)]
+               (-main)))))))


change all default-value  props to value

change all default-value  props to value

this caused problems with the form appearing to have values when it should not have had values

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'