upgrade dependencies

upgrade dependencies

--- project.clj
+++ project.clj
@@ -17,13 +17,13 @@

                  [prismatic/schema "1.1.3"]

-                 [clj-time "0.12.0"]
+                 [clj-time "0.12.2"]

                  [ring-basic-authentication "1.0.5"]
                  [clj-http "3.3.0"]
                  [cheshire "5.6.3"]]

-  :plugins [[lein-cloverage "1.0.6"]]
+  :plugins [[lein-cloverage "1.0.9"]]

   :profiles {:dev {:dependencies [[ring/ring-core "1.5.0"]
                                   [ring/ring-devel "1.5.0"]
@@ -36,7 +36,7 @@
                                   [org.apache.logging.log4j/log4j-core "2.7"]
                                   [org.apache.logging.log4j/log4j-slf4j-impl "2.7"]
                                   [criterium "0.4.4"]
-                                  [com.newrelic.agent.java/newrelic-api "3.32.0"]]}}
+                                  [com.newrelic.agent.java/newrelic-api "3.33.0"]]}}

   :test-selectors {:default (complement :performance)
                    :performance :performance


version bump - 0.2.1

version bump - 0.2.1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject axiom "0.2.0"
+(defproject axiom "0.2.1"
   :description "A web application platform"
   :url "https://github.com/brosenan/axiom"
   :license {:name "Eclipse Public License"


Bump versions

Bump versions

--- project.clj
+++ project.clj
@@ -7,7 +7,7 @@
   :min-lein-version "2.5.3"

   :dependencies [[org.clojure/clojure "1.8.0"]
-                 [org.clojure/clojurescript "1.9.216"]
+                 [org.clojure/clojurescript "1.9.225"]
                  [org.clojure/core.async "0.2.385" :exclusions [org.clojure/tools.reader]]
                  [org.clojure/test.check "0.9.0"]
                  [org.omcljs/om "1.0.0-alpha41"]
@@ -18,7 +18,7 @@
                  [devcards "0.2.1-7" :scope "devcards" :exclusions [org.clojure/clojurescript]]
                  [inflections "0.12.2"]]

-  :plugins [[lein-figwheel "0.5.4-7"]
+  :plugins [[lein-figwheel "0.5.5"]
             [lein-cljsbuild "1.1.3" :exclusions [[org.clojure/clojure]]]
             [lein-codox "0.9.5"]
             [lein-ancient "0.6.10"]


Prepare for next development iteration (0.4.0-SNAPSHOT)

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject cljam "0.3.1"
+(defproject cljam "0.4.0-SNAPSHOT"
   :description "A DNA Sequence Alignment/Map (SAM) library for Clojure"
   :url "https://github.com/chrovis/cljam"
   :license {:name "Apache License, Version 2.0"


next iteration

next iteration

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
- (defproject com.ladderlife/om-css "0.3.1"
+ (defproject com.ladderlife/om-css "0.4.0-SNAPSHOT"
   :description "Om Next + CSS"
   :url "http://github.com/ladderlife/om-css"
   :license {:name "Eclipse Public License"


lein-release plugin: preparing 0.1.2 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject re-view-material "0.1.2-SNAPSHOT"
+(defproject re-view-material "0.1.2"
   :description "Material design components in re-view"
   :url "https://www.github.com/re-view/re-view-material"
   :license {:name "MIT License"


udated description

udated description

--- project.clj
+++ project.clj
@@ -1,5 +1,5 @@
 (defproject complex "0.1.9"
-  :description "Cross platform library for complex numbers. geometry and transforms"
+  :description "Cross platform library for extended complex numbers, geometry and transforms"
   :url "http://wbabic.github.io/complex"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}


Version 0.34.0-SNAPSHOT

Version 0.34.0-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject ch.sbs/catalog "0.33.0"
+(defproject ch.sbs/catalog "0.34.0-SNAPSHOT"

   :description "A webapp to generate catalogs of the new items in the library"
   :url "https://github.com/sbsdev/catalog"


Update dependency.

Update dependency.

--- project.clj
+++ project.clj
@@ -26,12 +26,12 @@
     [liberator "0.14.0"] ; WebMachine (REST API server) port to Clojure https://github.com/clojure-liberator/liberator
     [com.apa512/rethinkdb "0.11.0"] ; RethinkDB client for Clojure https://github.com/apa512/clj-rethinkdb
     [prismatic/schema "1.0.4"] ; Data validation https://github.com/Prismatic/schema
-    [environ "1.0.1"] ; Get environment settings from different sources https://github.com/weavejester/environ
-    [com.taoensso/timbre "4.2.0-alpha4"] ; Logging https://github.com/ptaoussanis/timbre
-    [raven-clj "1.3.1"] ; Clojure interface to Sentry error reporting https://github.com/sethtrain/raven-clj
+    [environ "1.0.1"] ; Environment settings from different sources https://github.com/weavejester/environ
+    [com.taoensso/timbre "4.2.0"] ; Logging https://github.com/ptaoussanis/timbre
+    [raven-clj "1.3.1"] ; Interface to Sentry error reporting https://github.com/sethtrain/raven-clj
     [clj-http "2.0.0"] ; HTTP client https://github.com/dakrone/clj-http
-    [org.clojure/tools.cli "0.3.3"] ; command-line parsing https://github.com/clojure/tools.cli
-    [clj-jwt "0.1.1"] ; Clojure library for JSON Web Token (JWT) https://github.com/liquidz/clj-jwt
+    [org.clojure/tools.cli "0.3.3"] ; Command-line parsing https://github.com/clojure/tools.cli
+    [clj-jwt "0.1.1"] ; Library for JSON Web Token (JWT) https://github.com/liquidz/clj-jwt
  ]

   ;; Production plugins
@@ -57,7 +57,7 @@
       ]
       :plugins [
         [lein-midje "3.2"] ; Example-based testing https://github.com/marick/lein-midje
-        [jonase/eastwood "0.2.3"] ; Clojure linter https://github.com/jonase/eastwood
+        [jonase/eastwood "0.2.3"] ; Linter https://github.com/jonase/eastwood
         [lein-kibit "0.1.2"] ; Static code search for non-idiomatic code https://github.com/jonase/kibit
         [io.aviso/pretty "0.1.20"] ; Pretty print exceptions https://github.com/AvisoNovate/pretty
       ]


Version 5.3.16

Version 5.3.16

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(def ps-version "5.3.16-SNAPSHOT")
+(def ps-version "5.3.16")
 (def jruby-1_7-version "1.7.27-1")
 (def jruby-9k-version "9.1.16.0-1")


adding cljsjs/react-bootstrap

adding cljsjs/react-bootstrap

--- project.clj
+++ project.clj
@@ -28,6 +28,7 @@
                  [venantius/accountant "0.1.7"]
                  [com.cemerick/piggieback "0.2.2-SNAPSHOT"]
                  [org.clojure/tools.nrepl "0.2.12"]
+                 [cljsjs/react-bootstrap "0.25.1-0"]

                  [org.clojure/core.logic "0.8.10"]
                  [org.clojure/core.match "0.3.0-alpha4"]]


updated advenjure version

updated advenjure version

--- project.clj
+++ project.clj
@@ -6,7 +6,7 @@
   :plugins [[lein-cljsbuild "1.1.4"]]
   :dependencies [[org.clojure/clojure "1.8.0"]
                  [org.clojure/clojurescript "1.9.229"]
-                 [advenjure "0.6.0"]]
+                 [advenjure "0.6.2"]]
   :cljsbuild
     {:builds
      {:main {:source-paths ["src"]


bumped vn

bumped vn

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject onyx-app/lein-template "0.8.2.2-SNAPSHOT"
+(defproject onyx-app/lein-template "0.8.2.3-SNAPSHOT"
   :description "Onyx Leiningen application template"
   :url "https://github.com/onyx-platform/onyx-template"
   :license {:name "Eclipse Public License"


(maint) Correct ezbake version

(maint) Correct ezbake version

The wrong version of ezbake got carried up in the last merge-up. This
commit corrects it to 1.8.1.

--- project.clj
+++ project.clj
@@ -212,7 +212,7 @@
                                                [puppetlabs/puppetserver ~ps-version :exclusions [puppetlabs/jruby-deps]]
                                                [puppetlabs/trapperkeeper-webserver-jetty9 nil]
                                                [org.clojure/tools.nrepl nil]]
-                      :plugins [[puppetlabs/lein-ezbake "1.1.13"]]
+                      :plugins [[puppetlabs/lein-ezbake "1.8.1"]]
                       :name "puppetserver"}
              :uberjar {:aot [puppetlabs.trapperkeeper.main]
                        :dependencies [[puppetlabs/trapperkeeper-webserver-jetty9 nil]]}


Compile neko with JDK6

Compile neko with JDK6

--- project.clj
+++ project.clj
@@ -6,6 +6,7 @@
   :dependencies [[org.clojure-android/clojure "1.5.1-jb"]]
   :source-paths ["src" "src/clojure"]
   :java-source-paths ["src/java" "gen"]
+  :javac-options ["-target" "1.6" "-source" "1.6" "-Xlint:-options"]

   :android {:library true
             :target-sdk :ics})


Version 0.4.23

Version 0.4.23

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject yetibot.core "0.4.23-SNAPSHOT"
+(defproject yetibot.core "0.4.23"
   :description "Core yetibot utilities, extracted for shared use among yetibot
                 and its various plugins"
   :url "https://github.com/yetibot/yetibot.core"


Formatting tweaks.

Formatting tweaks.

--- project.clj
+++ project.clj
@@ -37,7 +37,9 @@
     [ring/ring-core "1.6.3"]
     [ring/ring-codec "1.1.0"]
     [ring/ring-defaults "0.3.1"]]
-  :jvm-opts ["-XX:-OmitStackTraceInFastThrow" "-Xms2g" "-Xmx2g"]
+  :jvm-opts ["-XX:-OmitStackTraceInFastThrow"
+             "-Xms2g"
+             "-Xmx2g"]
   :main cmr.opendap.core
   :aot [cmr.opendap.core]
   :profiles {


0.2.5 release

0.2.5 release

--- project.clj
+++ project.clj
@@ -1,7 +1,7 @@
-(defproject org.eamonn.funcgo/funcgo-lein-plugin "0.2.4"
+(defproject org.eamonn.funcgo/funcgo-lein-plugin "0.2.5"
   :description "Leiningen plugin to compile Functional Go to Clojure"
   :url "http://funcgo.org"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[org.eamonn.funcgo/funcgo-compiler "0.2.4"]]
+  :dependencies [[org.eamonn.funcgo/funcgo-compiler "0.2.5"]]
   :eval-in-leiningen true)


upgraded to latest cljs build

upgraded to latest cljs build

to 1.1.4

--- project.clj
+++ project.clj
@@ -46,7 +46,7 @@
   :jvm-opts ["-Xmx4g"]

   :plugins  [
-             [lein-cljsbuild "1.1.3"]
+             [lein-cljsbuild "1.1.4"]
              [lein-httpd "1.0.0"]
              [lein-ring "0.9.7"]
              [lein-figwheel "0.5.0-6"]


Add nrepl port

Add nrepl port

--- project.clj
+++ project.clj
@@ -18,7 +18,7 @@
   :test-paths ["test/cljc"]
   :source-paths ["src"]
   :jvm-opts ["-XX:-OmitStackTraceInFastThrow"]
-  :repl-options {:init-ns user}
+  :repl-options {:init-ns user :port 4002}

   :cljsbuild {:test-commands {"test" ["lein" "doo" "chrome" "test" "once"]}
               :builds


Add cljx to hooks

Add cljx to hooks

--- project.clj
+++ project.clj
@@ -16,7 +16,7 @@
   :source-paths ["src/cljx"]
   :test-paths ["target/test-classes"]
   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [org.clojure/clojurescript "0.0-2311"]]
+                 [org.clojure/clojurescript "0.0-2322"]]

   :cljx {:builds [{:source-paths ["src/cljx"]
                    :output-path "target/classes"
@@ -33,6 +33,8 @@
                   {:source-paths ["test/cljx"]
                    :output-path "target/test-classes"
                    :rules :cljs}]}
+
+  :hooks [cljx.hooks]

   :cljsbuild {:test-commands {"node" ["node" :node-runner "target/testable.js"]}
               :builds [{:source-paths ["target/classes" "target/test-classes"]


load integration-ns on repl start

load integration-ns on repl start

--- project.clj
+++ project.clj
@@ -27,7 +27,8 @@
                    :plugins [[lein-sub "0.3.0"]
                              [lein-pprint "1.1.2"]]
                    :leiningen/reply  {:dependencies [[org.slf4j/jcl-over-slf4j "1.8.0-alpha2"
-                                                      :exclusions [commons-logging]]]}}
+                                                      :exclusions [commons-logging]]]}
+                   :repl-options {:init-ns dda.pallet.dda-backup-crate.app.instantiate-aws}}
              :test {:test-paths ["test/src"]
                     :resource-paths ["test/resources"]
                     :dependencies [[com.palletops/pallet "0.8.12" :classifier "tests"]]}


Updated deps to latest releases.

Updated deps to latest releases.

--- project.clj
+++ project.clj
@@ -24,15 +24,15 @@
     [io.aviso/pretty]
     [org.clojure/tools.reader]]
   :dependencies [
-    [cheshire "5.8.0"]
+    [cheshire "5.8.1"]
     [clojure-opennlp "0.5.0"]
     [clojusc/system-manager "0.3.0-SNAPSHOT"]
-    [clojusc/twig "0.3.3"]
+    [clojusc/twig "0.4.0"]
     [hexagram30/common "0.1.0-SNAPSHOT"]
     [hexagram30/db-plugin "0.1.0-SNAPSHOT"]
     [hexagram30/dice "0.1.0-SNAPSHOT"]
     [hexagram30/httpd "0.1.0-SNAPSHOT"]
-    [io.aviso/pretty "0.1.34"]
+    [io.aviso/pretty "0.1.35"]
     [org.clojure/clojure "1.9.0"]
     [org.clojure/tools.reader "1.3.0"]]
   :profiles {
@@ -40,7 +40,7 @@
       :aot :all}
     :dev {
       :dependencies [
-        [clojusc/trifl "0.3.0"]
+        [clojusc/trifl "0.4.0"]
         [org.clojure/tools.namespace "0.2.11"]]
       :plugins [
         [lein-shell "0.5.0"]
@@ -55,10 +55,10 @@
       :source-paths ^:replace ["src"]
       :test-paths ^:replace []
       :plugins [
-        [jonase/eastwood "0.2.9"]
+        [jonase/eastwood "0.3.1"]
         [lein-ancient "0.6.15"]
         [lein-kibit "0.1.6"]
-        [lein-nvd "0.5.4"]]}
+        [lein-nvd "0.5.5"]]}
     :test {
       :plugins [
         [lein-ltest "0.3.0"]]


Added foundations for docs and static files.

--- project.clj
+++ project.clj
@@ -126,6 +126,18 @@
       ]
     "ltest" ["with-profile" "+test,+system" "ltest"]
     "junit" ["with-profile" "+test,+system" "test2junit"]
+    ;; Documentation
+    "codox" ["with-profile" "+docs" "codox"]
+    "marginalia" ["with-profile" "+docs"
+      "marg" "--dir" "resources/public/docs/marginalia"
+             "--file" "index.html"
+             "--name" "OPeNDAP/CMR Integration"]
+    "generate-html" ["with-profile" "+docs"
+      "run" "-m" "cmr.opendap.site.static"]
+    "generate-static" ["do"
+      ["codox"]
+      ["marginalia"]
+      ["generate-html"]]
     "version" ["do"
       ["version"]
       ["shell" "echo" "-n" "CMR-OPeNDAP: "]
@@ -136,17 +148,10 @@
     "build" ["do"
       ["ltest" ":unit"]
       ["junit" ":unit"]
+      ["generate-static"]
       ["ubercompile"]
       ["uberjar"]]
-    ;; Documentation
-    "codox" ["with-profile" "+docs" "codox"]
-    "marginalia" ["with-profile" "+docs"
-      "marg" "--dir" "resources/public/docs/marginalia"
-             "--file" "index.html"
-             "--name" "OPeNDAP/CMR Integration"]
-    "docs" ["do"
-      ["codox"]
-      ["marginalia"]]
+
     ;; Application
     "start-cmr-opendap"
       ["trampoline" "run"]})


Version 0.2.16-SNAPSHOT

Version 0.2.16-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject wb-es "0.2.15"
+(defproject wb-es "0.2.16-SNAPSHOT"
   :description "FIXME: write description"
   :url "http://example.com/FIXME"
   :min-lein-version "2.7.0"


bump to 0.16 - no backward compatible ! '

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject etcd-clojure "0.1.5"
+(defproject etcd-clojure "0.1.6"
   :description "etcd client library in clojure"
   :url "https://github.com/aterreno/etcd-clojure"
   :lein-release {:deploy-via :clojars}


bump version

bump version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject salava "2.8.0"
+(defproject salava "2.8.1"
   :description "Salava application server"
   :url "http://salava.org"
   :license {:name "Apache 2.0"


Wip multipeer test.

Wip multipeer test.

--- test/onyx/coordinator/multi_peer_test.clj
+++ test/onyx/coordinator/multi_peer_test.clj
@@ -2,16 +2,15 @@
   (:require [midje.sweet :refer :all]
             [clojure.core.async :refer [chan tap alts!! >!! <!!]]
             [com.stuartsierra.component :as component]
-            [datomic.api :as d]
             [onyx.coordinator.async :as async]
             [onyx.extensions :as extensions]
-            [onyx.coordinator.log.datomic :as datomic]
+            [onyx.coordinator.impl :as impl]
             [onyx.coordinator.sim-test-utils :refer [with-system]]))

 (facts
  "plan one job with two peers"
  (with-system
-   (fn [coordinator sync log]
+   (fn [coordinator sync]
      (let [peer-node-a (extensions/create sync :peer)
            peer-node-b (extensions/create sync :peer)

@@ -51,18 +50,24 @@
        (tap (:ack-mult coordinator) ack-ch-spy)
        (tap (:offer-mult coordinator) offer-ch-spy)

-       (extensions/write-place sync peer-node-a {:pulse pulse-node-a
-                                                 :shutdown shutdown-node-a
-                                                 :payload payload-node-a-1})
-       (extensions/on-change sync payload-node-a-1 #(>!! sync-spy-a %))
-
-       (extensions/write-place sync peer-node-b {:pulse pulse-node-b
-                                                 :shutdown shutdown-node-b
-                                                 :payload payload-node-b-1})
-       (extensions/on-change sync payload-node-b-1 #(>!! sync-spy-b %))
-
-       (>!! (:born-peer-ch-head coordinator) peer-node-a)
-       (>!! (:born-peer-ch-head coordinator) peer-node-b)
+       (extensions/write-place sync (:node peer-node-a)
+                               {:id (:uuid peer-node-a)
+                                :peer-node (:node peer-node-a)
+                                :pulse-node (:node pulse-node-a)
+                                :shutdown-node (:node shutdown-node-a)
+                                :payload-node (:node payload-node-a-1)})
+       (extensions/on-change sync (:node payload-node-a-1) #(>!! sync-spy-a %))
+
+       (extensions/write-place sync (:node peer-node-b)
+                               {:id (:uuid peer-node-b)
+                                :peer-node (:node peer-node-b)
+                                :pulse-node (:node pulse-node-b)
+                                :shutdown-node (:node shutdown-node-b)
+                                :payload-node (:node payload-node-b-1)})
+       (extensions/on-change sync (:node payload-node-b-1) #(>!! sync-spy-b %))
+
+       (>!! (:born-peer-ch-head coordinator) (:node peer-node-a))
+       (>!! (:born-peer-ch-head coordinator) (:node peer-node-b))

        (<!! offer-ch-spy)
        (<!! offer-ch-spy)
@@ -74,17 +79,17 @@
        (<!! sync-spy-b)

        (facts "Both payloads are received"
-              (let [payload-a (extensions/read-place sync payload-node-a-1)
-                    payload-b (extensions/read-place sync payload-node-b-1)]
+              (let [payload-a (extensions/read-place sync (:node payload-node-a-1))
+                    payload-b (extensions/read-place sync (:node payload-node-b-1))]
                 (fact payload-a => (comp not nil?))
                 (fact payload-b => (comp not nil?))
                 (fact (not= payload-a payload-b) => true)

-                (extensions/on-change sync (:status (:nodes payload-a)) #(>!! status-spy %))
-                (extensions/on-change sync (:status (:nodes payload-b)) #(>!! status-spy %))
-
-                (extensions/touch-place sync (:ack (:nodes payload-a)))
-                (extensions/touch-place sync (:ack (:nodes payload-b)))
+                (extensions/on-change sync (:node/status (:nodes payload-a)) #(>!! status-spy %))
+                (extensions/on-change sync (:node/status (:nodes payload-b)) #(>!! status-spy %))
+
+                (extensions/touch-place sync (:node/ack (:nodes payload-a)))
+                (extensions/touch-place sync (:node/ack (:nodes payload-b)))

                 (<!! ack-ch-spy)
                 (<!! ack-ch-spy)
@@ -92,47 +97,50 @@
                 (<!! status-spy)
                 (<!! status-spy)

-                (extensions/write-place sync peer-node-a {:pulse pulse-node-a
-                                                          :shutdown shutdown-node-a
-                                                          :payload payload-node-a-2})
-                (extensions/on-change sync payload-node-a-2 #(>!! sync-spy-a %))
-
-                (extensions/write-place sync peer-node-b {:pulse pulse-node-b
-                                                          :shutdown shutdown-node-b
-                                                          :payload payload-node-b-2})
-                (extensions/on-change sync payload-node-b-2 #(>!! sync-spy-b %))
-
-                (extensions/touch-place sync (:completion (:nodes payload-a)))
-                (extensions/touch-place sync (:completion (:nodes payload-b)))
+                (extensions/write-place sync (:node peer-node-a)
+                                        {:id (:uuid peer-node-a)
+                                         :peer-node (:node peer-node-a)
+                                         :pulse-node (:node pulse-node-a)
+                                         :shutdown-node (:node shutdown-node-a)
+                                         :payload-node (:node payload-node-a-2)})
+                (extensions/on-change sync (:node payload-node-a-2) #(>!! sync-spy-a %))
+
+                (extensions/write-place sync (:node peer-node-b)
+                                        {:id (:uuid peer-node-b)
+                                         :peer-node (:node peer-node-b)
+                                         :pulse-node (:node pulse-node-b)
+                                         :shutdown-node (:node shutdown-node-b)
+                                         :payload-node (:node payload-node-b-2)})
+                (extensions/on-change sync (:node payload-node-b-2) #(>!! sync-spy-b %))
+
+                (extensions/touch-place sync (:node/completion (:nodes payload-a)))
+                (extensions/touch-place sync (:node/completion (:nodes payload-b)))

                 (<!! offer-ch-spy)
                 (<!! offer-ch-spy)

                 (let [[v ch] (alts!! [sync-spy-a sync-spy-b])
                       nodes (:nodes (extensions/read-place sync (:path v)))]
-                  (extensions/on-change sync (:status nodes) #(>!! status-spy %))
-                  (extensions/touch-place sync (:ack nodes))
+                  (extensions/on-change sync (:node/status nodes) #(>!! status-spy %))
+                  (extensions/touch-place sync (:node/ack nodes))

                   (<!! ack-ch-spy)
                   (<!! status-spy)

-                  (extensions/touch-place sync (:completion nodes))
+                  (extensions/touch-place sync (:node/completion nodes))
                   (<!! offer-ch-spy))

-                (let [db (d/db (:conn log))]
-
-                  (facts "All tasks are complete"
-                         (let [query '[:find (count ?task) :where
-                                       [?task :task/complete? true]]
-                               result (ffirst (d/q query db))]
-                           (fact result => 3)))
-
-                  (facts "All peers are idle"
-                         (let [query '[:find (count ?peer) :where
-                                       [?peer :peer/status :idle]]
-                               result (ffirst (d/q query db))]
-                           (fact result => 2))))))))
-
+                (facts "All tasks are complete"
+                       (let [job-node (first (extensions/bucket sync :job))
+                             task-path (extensions/resolve-node sync :task job-node)]
+                         (doseq [task-node (extensions/children sync task-path)]
+                           (when-not (impl/completed-task? task-node)
+                             (fact (impl/task-complete? sync task-node) => true)))))
+
+                (facts "All peers are idle"
+                       (doseq [state-path (extensions/bucket sync :peer-state)]
+                         (let [state (extensions/dereference sync state-path)]
+                           (fact (:state (:content state)) => :idle))))))))
    {:revoke-delay 50000}))

 (facts


Fixup! Added Crate type mappings

Fixup! Added Crate type mappings

--- src/metabase/driver/crate.clj
+++ src/metabase/driver/crate.clj
@@ -20,7 +20,6 @@
     :timestamp :DateTimeField
     :geo_point :UnknownField
     :geo_shape :UnknownField
-    :
     } column-type))

 (defrecord CrateDriver []


improved comment

improved comment

--- test/corpus_utils/text_test.clj
+++ test/corpus_utils/text_test.clj
@@ -17,4 +17,5 @@
              "「実際、どれくらいの休みが取れるのでしょうか」「女性にとって働きやすい職場ですか」。"])))))

 (comment
-  (bench (lines->paragraph-sentences ["フェイスブック（ＦＢ）やツイッターなどソーシャルメディアを使った採用活動が、多くの企業に広がっている。ＦＢでの会社説明会やＯＢ・ＯＧ訪問受け付け、ソーシャルスキルをはかって面接代わりにする動きも出てきた。" "企業側のソーシャル活用法も多様になっている。" nil "「実際、どれくらいの休みが取れるのでしょうか」「女性にとって働きやすい職場ですか」。"])))
+  (require '[criterium.core :refer [bench quick-bench]])
+  (quick-bench (lines->paragraph-sentences ["フェイスブック（ＦＢ）やツイッターなどソーシャルメディアを使った採用活動が、多くの企業に広がっている。ＦＢでの会社説明会やＯＢ・ＯＧ訪問受け付け、ソーシャルスキルをはかって面接代わりにする動きも出てきた。" "企業側のソーシャル活用法も多様になっている。" nil "「実際、どれくらいの休みが取れるのでしょうか」「女性にとって働きやすい職場ですか」。"])))


Remove logging as per @annapawlicka

Remove logging as per @annapawlicka

--- src-cljs/kixi/hecuba/tabs/hierarchy/sensors.cljs
+++ src-cljs/kixi/hecuba/tabs/hierarchy/sensors.cljs
@@ -227,9 +227,6 @@
                     measurements-sum   (reduce + values)
                     measurements-count (count series)
                     measurements-mean  (if (not= 0 measurements-count) (/ measurements-sum measurements-count) "NA")]
-                (log "Key: " key)
-                (log "Series: " (pr-str series))
-                ;; (log "Values: " values)
                 [:div.col-md-3
                  (bs/panel
                   key


Remove pointless system-test ns

Remove pointless system-test ns

All it contained was a useless duplicate of event-loop-test

--- test/com/frereth/common/system_test.clj
+++ test/com/frereth/common/system_test.clj
@@ -1,13 +0,0 @@
-(ns com.frereth.common.system-test
-  (:require [clojure.test :refer (are deftest is testing)]
-            [com.frereth.common.system :as sys]
-            [com.stuartsierra.component :as component]))
-
-(deftest start-stop
-  (testing "Can start/stop basic event loop"
-    (throw (ex-info "Duplicate"
-                    {:better-version 'com.frereth.common.event-loop-test}))
-    (let [initial (sys/build-event-loop nil)
-          started (component/start initial)]
-      (is started "start should either return truthy or throw")
-      (component/stop started))))


read relationships file only once, less batches for rollover-test (#1096)

> Related #https://github.com/threatgrid/iroh/issues/4920

This PR optimizes a little bit `ctia.task.migration.store-test` ns test by reading only once the relationships file samples. It also reduces the number of random batch size to test rollover-test. Not the win of year, but still useful :-)

_reviewers: hide white space changes._

build time observed [here](https://github.com/threatgrid/ctia/pull/1079/checks?check_run_id=2098372414):
[ctia.task.migration.store-test {:elapsed-ns 235972437954}]
[ctia.task.migration.store-test/rollover-test {:elapsed-ns 6.3143038789E10}]
[ctia.task.migration.store-test/sliced-queries-test {:elapsed-ns 1.1595586681E10}]

This PR build (at time of writing):
[ctia.task.migration.store-test {:elapsed-ns 227022970930}]
[ctia.task.migration.store-test/rollover-test {:elapsed-ns 4.3493366775E10}]
[ctia.task.migration.store-test/sliced-queries-test {:elapsed-ns 1.20827999E10}]

--- test/ctia/task/migration/store_test.clj
+++ test/ctia/task/migration/store_test.clj
@@ -250,6 +250,12 @@
 (def fixtures-nb 100)
 (def examples (fixt/bundle fixtures-nb false))

+(def sample-relationships-1000
+  "1000 real realtionships extracted from INT with ES doc meta"
+  (delay
+    (with-open [rdr (io/reader "./test/data/indices/sample-relationships-1000.json")]
+      (doall (line-seq rdr)))))
+
 (deftest rollover-test
   (es-helpers/for-each-es-version
    "rollover should refresh write index and trigger rollover when index size is strictly bigger than max-docs"
@@ -262,69 +268,68 @@
      (fn []
        (helpers/fixture-ctia-with-app
         (fn [app]
-          (with-open [rdr (io/reader "./test/data/indices/sample-relationships-1000.json")]
-            (let [services (app->MigrationStoreServices app)
-                  storename (es-helpers/get-indexname app :relationship)
-                  write-alias (str storename "-write")
-                  max-docs 40
-                  batch-size 4
-                  storemap {:conn conn
-                            :indexname storename
-                            :mapping "relationship"
-                            :props {:aliased true
-                                    :write-index write-alias
-                                    :rollover {:max_docs max-docs}}
-                            :type "relationship"
-                            :settings {}
-                            :config {}}
-                  docs-all (->> (line-seq rdr)
-                                 (map (partial es-helpers/prepare-bulk-ops app))
-                                 (map #(assoc % :_index write-alias)))
-                  batch-sizes (repeatedly 300 #(inc (rand-int batch-size)))
-                  test-fn (fn [{:keys [source-docs
-                                       migrated-count
-                                       current-index-size]
-                                :as state}
-                               nb]
-                            (let [rollover? (<= max-docs (+ current-index-size nb))
-                                  cat-before (es-helpers/get-cat-indices conn)
-                                  indices-before (set (keys cat-before))
-                                  _ (es-helpers/load-bulk conn
-                                                          (take nb source-docs)
-                                                          "false")
-                                  res (when rollover?
-                                        (sut/rollover storemap
-                                                      batch-size
-                                                      (+ nb migrated-count)
-                                                      services))
-                                  cat-after (es-helpers/get-cat-indices conn)
-                                  indices-after (set (keys cat-after))
-                                  total-after (reduce + (vals cat-after))]
-                              (when rollover?
-                                (is (true? (:rolled_over res)))
-                                (is (< (count indices-before)
-                                       (count indices-after)))
-                                (is (= (+ nb migrated-count)
-                                       total-after)))
-                              (when-not rollover?
-                                (is (= indices-before indices-after)))
-
-                              (cond-> (update state :migrated-count + nb)
-                                true (assoc :source-docs (drop nb source-docs))
-                                rollover? (assoc :current-index-size 0)
-                                (not rollover?) (update :current-index-size + nb))))]
-              (reduce test-fn
-                      {:source-docs docs-all
-                       :migrated-count 0
-                       :current-index-size 0}
-                      batch-sizes)
-
-              (is (every? #(<= % (+ max-docs batch-size))
-                          (->> (es-helpers/get-cat-indices conn)
-                               (keep (fn [[k v]]
-                                       (when (str/starts-with? (name k) storename)
-                                         v)))))
-                  "All the indices should be smaller than max-docs + batch-size")))))))))
+          (let [services (app->MigrationStoreServices app)
+                storename (es-helpers/get-indexname app :relationship)
+                write-alias (str storename "-write")
+                max-docs 40
+                max-batch-size 10
+                storemap {:conn conn
+                          :indexname storename
+                          :mapping "relationship"
+                          :props {:aliased true
+                                  :write-index write-alias
+                                  :rollover {:max_docs max-docs}}
+                          :type "relationship"
+                          :settings {}
+                          :config {}}
+                docs-all (->> @sample-relationships-1000
+                              (map (partial es-helpers/prepare-bulk-ops app))
+                              (map #(assoc % :_index write-alias)))
+                batch-sizes (repeatedly 100 #(inc (rand-int max-batch-size)))
+                test-fn (fn [{:keys [source-docs
+                                     migrated-count
+                                     current-index-size]
+                              :as state}
+                             nb]
+                          (let [rollover? (<= max-docs (+ current-index-size nb))
+                                cat-before (es-helpers/get-cat-indices conn)
+                                indices-before (set (keys cat-before))
+                                _ (es-helpers/load-bulk conn
+                                                        (take nb source-docs)
+                                                        "false")
+                                res (when rollover?
+                                      (sut/rollover storemap
+                                                    max-batch-size
+                                                    (+ nb migrated-count)
+                                                    services))
+                                cat-after (es-helpers/get-cat-indices conn)
+                                indices-after (set (keys cat-after))
+                                total-after (reduce + (vals cat-after))]
+                            (when rollover?
+                              (is (true? (:rolled_over res)))
+                              (is (< (count indices-before)
+                                     (count indices-after)))
+                              (is (= (+ nb migrated-count)
+                                     total-after)))
+                            (when-not rollover?
+                              (is (= indices-before indices-after)))
+
+                            (cond-> (update state :migrated-count + nb)
+                              true (assoc :source-docs (drop nb source-docs))
+                              rollover? (assoc :current-index-size 0)
+                              (not rollover?) (update :current-index-size + nb))))]
+            (reduce test-fn
+                    {:source-docs docs-all
+                     :migrated-count 0
+                     :current-index-size 0}
+                    batch-sizes)
+
+            (is (every? #(<= % (+ max-docs max-batch-size))
+                        (->> (es-helpers/get-cat-indices conn)
+                             (keep (fn [[k v]]
+                                     (when (str/starts-with? (name k) storename)
+                                       v)))))
+                "All the indices should be smaller than max-docs + max-batch-size"))))))))

 (deftest sliced-queries-test
   (es-helpers/for-each-es-version
@@ -343,7 +348,9 @@
                          :type "relationship"
                          :settings {}
                          :config {}}
-               _ (es-helpers/load-file-bulk app conn "./test/data/indices/sample-relationships-1000.json")
+               _ (->>  @sample-relationships-1000
+                       (map (partial es-helpers/prepare-bulk-ops app))
+                       (es-helpers/load-bulk conn))
                expected-queries [missing-modified-query
                                  {:bool
                                   {:filter
@@ -835,9 +842,7 @@
       "ctia.auth.type" "allow-all"]
      (helpers/fixture-ctia-with-app
        (fn [app]
-         (let [{:keys [get-in-config]} (helpers/get-service-map app :ConfigService)
-               services (app->MigrationStoreServices app)
-
+         (let [services (app->MigrationStoreServices app)
                _ (POST-bulk app examples true)
                _ (ductile.index/refresh! conn) ;; ensure indices refresh
                [sighting1 sighting2] (:parsed-body (GET app


Fix tests again

Fix tests again

--- test/expound/problems_test.cljc
+++ test/expound/problems_test.cljc
@@ -235,12 +235,12 @@
              (select-keys [:expound/in :val :reason])))))

 ;; 1.9.562 doesn't implement map-entry?
-(when-not (= *clojurescript-version* "1.9.562")
+(when-not #?(:clj false :cljs (= *clojurescript-version* "1.9.562"))
   (defn nth-value [form i]
     (let [seq (remove map-entry? (tree-seq coll? seq form))]
       (nth seq (mod i (count seq))))))

-(when-not (= *clojurescript-version* "1.9.562")
+(when-not #?(:clj false :cljs (= *clojurescript-version* "1.9.562"))
   ;; TODO - move to paths
   (deftest paths-to-value-test
     (checking


Fix root cause of previous commits' problems

They all stemmed from incomplete refactoring, changing the namespaces of
various keywords.

This managed to get my step-1 client-test working [again?]

--- test/frereth_cp/client_test.clj
+++ test/frereth_cp/client_test.clj
@@ -37,7 +37,7 @@
                                   ::shared/long-pair long-pair
                                   ::K/server-name server-name}
                 ::clnt/child-spawner child-spawner
-                ::clnt/server-extension server-extension
+                ::state/server-extension server-extension
                 ::state/server-security {::K/server-name server-name
                                          ::shared-specs/public-long public-long
                                          ::state/public-short public-short}})))
@@ -51,7 +51,7 @@
           client-agent (raw-client nil {::shared-specs/public-long pk-long
                                         ::shared-specs/public-short pk-shrt})
           client @client-agent
-          {:keys [::state/chan<-server ::clnt/chan->server]} client]
+          {:keys [::state/chan<-server ::state/chan->server]} client]
       (when-not chan<-server
         (throw (ex-info "Missing from-server channel"
                         client)))
@@ -77,7 +77,6 @@
                                                      #(is false (str "put! " %)))))]
             ;; TODO: Need to make sure both cookie-waiter and fut resolve
             ;; Q: Should they be promises?
-            (is false "Get this working, for real")
             (let [d' (strm/try-take! chan->server ::nada 200 ::response-timed-out)]
               (dfrd/on-realized d'
                                 #(is (= % basic-check))


Added better unit tests around the calendar namespace for dates and added some simple tests for parsing a calendar event and turning it into a clojure representation.

--- test/gcal2org/calendar_test.clj
+++ test/gcal2org/calendar_test.clj
@@ -1,5 +1,8 @@
 (ns gcal2org.calendar-test
   (:import com.google.api.services.calendar.model.EventDateTime
+           com.google.api.services.calendar.model.Event
+           com.google.api.services.calendar.model.Event$Creator
+           com.google.api.services.calendar.model.Events
            com.google.api.client.util.DateTime)
   (:require [clojure.test :refer :all]
             [gcal2org.calendar :refer :all]
@@ -7,20 +10,61 @@

 (deftest parse-event-date-time-with-date-time
   (testing "Take a google api EventDateTime with a date and a time and
-  turn it into a joda-time object."
+  turn it into a joda-time object. The result should be in UTC."
     (let [dt (t/date-time 2015 2 13 16 30 0 0)
           evdt (.. (EventDateTime.)
-                   (setDateTime (DateTime. (.toDate dt))))
+                   (setDateTime (DateTime. "2015-02-13T16:30:01-06:00")))
           parsed-evdt (parse-event-date-time evdt)]
-      (is (= (t/day dt) (t/day parsed-evdt)))
-      (is (= (t/hour dt) (t/hour parsed-evdt))))))
+      (is (= 13 (t/day parsed-evdt)))
+      (is (= 22 (t/hour parsed-evdt))))))

 (deftest parse-event-date-time-with-date-only
   (testing "Take a google api EventDateTime with only a date and turn
-  it into a joda-time object."
+  it into a joda-time object. The parsed date is in UTC but that
+  should be the final representation."
     (let [dt (t/date-time 2015 2 13 16 30 0 0)
           evdt (.. (EventDateTime.)
-                   (setDate (DateTime. (.toDate dt))))
+                   (setDate (DateTime. "2015-02-13")))
           parsed-evdt (parse-event-date-time evdt)]
-      (is (= (t/day dt) (t/day parsed-evdt)))
-      (is (= (t/hour dt) (t/hour parsed-evdt))))))
+      (is (= 13))
+      (is (= 0 (t/hour parsed-evdt))))))
+
+(def full-day-event (.. (Event.)
+                        (setCreated (DateTime. "2012-01-14T19:57:10.000Z"))
+                        (setCreator (.. (Event$Creator.)
+                                        (setDisplayName "John Doe")
+                                        (setEmail "example@example.com")
+                                        (setSelf true)))
+                        (setEtag "\"2653142060000000\"")
+                        (setHtmlLink "https://www.google.com/calendar/event?eid=randomeid")
+                        (setICalUID "fake@google.com")
+                        (setId "fake_20150218")
+                        (setKind "calendar#event")
+                        (setOriginalStartTime (.. (EventDateTime.)
+                                                  (setDateTime
+                                                   (DateTime. "2015-02-18"))))
+                        (setStart (.. (EventDateTime.)
+                                      (setDateTime
+                                       (DateTime. "2015-02-18"))))
+                        (setEnd (.. (EventDateTime.)
+                                    (setDateTime
+                                     (DateTime. "2015-02-19"))))
+                        (setRecurringEventId "fakerecurringid")
+                        (setSummary "Birthday")))
+
+(deftest event-to-map-full-day
+  (testing "Take a full day event and parse it into a clojure
+  representation."
+    (let [parsed-evt (event-to-map full-day-event)]
+      (is (= "Birthday" (:summary parsed-evt)))
+      (is (= "2015-02-18T00:00:00.000Z" (.toString (:start parsed-evt))))
+      (is (= "2015-02-19T00:00:00.000Z" (.toString (:end parsed-evt)))))))
+
+(deftest parse-calendar-events-single
+  (testing "Take a calendar event list and turn parse it into a
+  clojure list."
+    (let [events (.. (Events.)
+                     (setItems (java.util.Collections/singletonList full-day-event)))
+          parsed-events (parse-calendar-events events)]
+      (is (= 1 (count parsed-events)))
+      (is (= "Birthday" (:summary (first parsed-events)))))))


Fix brittle test dependent on query param order

Key order in a hash-map is indeterminate

--- test/http/async/client/test.clj
+++ test/http/async/client/test.clj
@@ -803,9 +803,11 @@

 (deftest response-url
   (let [resp (GET *client* "http://localhost:8123/query" :query {:a "1?&" :b "+ ="})]
-    (are [exp real] (= exp real)
-         "http://localhost:8123/query?a=1?&&b=+ =" (raw-url resp)
-         "http://localhost:8123/query?a=1%3F%26&b=%2B%20%3D" (url resp))))
+    (are [exp real] (exp real)
+      #{"http://localhost:8123/query?a=1?&&b=+ =" "http://localhost:8123/query?b=+ =&a=1?&"}
+      (raw-url resp)
+      #{"http://localhost:8123/query?a=1%3F%26&b=%2B%20%3D" "http://localhost:8123/query?b=%2B%20%3D&a=1%3F%26"}
+      (url resp))))

 ;;(deftest profile-get-stream
 ;;  (let [gets (repeat (GET *client* "http://localhost:8123/stream"))


Remove spike.

Remove spike.

--- test/onyx/hornetq/spike.clj
+++ test/onyx/hornetq/spike.clj
@@ -1,100 +0,0 @@
-(ns onyx.hornetq.vm-test
-  (:require [midje.sweet :refer :all]
-            [onyx.peer.pipeline-extensions :as p-ext]
-            [onyx.api]))
-
-(def n-messages 2600)
-
-(def batch-size 1320)
-
-(def echo 100)
-
-(defn my-inc [{:keys [n] :as segment}]
-  (assoc segment :n (inc n)))
-
-(def catalog
-  [{:onyx/name :in
-    :onyx/ident :mem/read-segments
-    :onyx/type :input
-    :onyx/medium :memory
-    :onyx/consumption :concurrent
-    :onyx/bootstrap? true
-    :onyx/batch-size batch-size}
-
-   {:onyx/name :inc
-    :onyx/fn :onyx.hornetq.vm-test/my-inc
-    :onyx/type :transformer
-    :onyx/consumption :concurrent
-    :onyx/batch-size batch-size}
-
-   {:onyx/name :out
-    :onyx/ident :mem/write-segments
-    :onyx/type :output
-    :onyx/medium :memory
-    :onyx/consumption :concurrent
-    :onyx/batch-size batch-size}])
-
-(def workflow {:in {:inc :out}})
-
-(def input (map (fn [x] {:n x}) (range n-messages)))
-
-(def output (atom []))
-
-(defmethod p-ext/apply-fn [:input :memory]
-  [event] {:onyx.core/results input})
-
-(defmethod p-ext/apply-fn [:output :memory]
-  [{:keys [onyx.core/decompressed]}]
-  {:onyx.core/results decompressed})
-
-(defmethod p-ext/compress-batch [:output :memory]
-  [{:keys [onyx.core/results]}]
-  {:onyx.core/compressed results})
-
-(defmethod p-ext/write-batch [:output :memory]
-  [{:keys [onyx.core/compressed]}]
-  (doseq [segment compressed]
-    (swap! output conj segment))
-  {})
-
-(defmethod p-ext/seal-resource [:output :memory]
-  [_]
-  (swap! output conj :done)
-  {})
-
-(def id (str (java.util.UUID/randomUUID)))
-
-(def coord-opts {:hornetq/mode :vm
-                 :hornetq/server? true
-                 :zookeeper/address "127.0.0.1:2181"
-                 :onyx/id id
-                 :onyx.coordinator/revoke-delay 5000})
-
-(def conn (onyx.api/connect (str "onyx:memory//localhost/" id) coord-opts))
-
-(def peer-opts {:hornetq/mode :vm
-                :zookeeper/address "127.0.0.1:2181"
-                :onyx/id id})
-
-(def v-peers (onyx.api/start-peers conn 1 peer-opts))
-
-(onyx.api/submit-job conn {:catalog catalog :workflow workflow})
-
-
-
-#_(try
-  ;; (dorun (map deref (map :runner v-peers)))
-  (finally
-   (doseq [v-peer v-peers]
-     (try
-       ((:shutdown-fn v-peer))
-       (catch Exception e (prn e))))
-   (try
-     (onyx.api/shutdown conn)
-     (catch Exception e (prn e)))))
-
-#_(let [expected (set (map (fn [x] {:n (inc x)}) (range n-messages)))]
-  (fact (set (butlast @output)) => expected)
-  (fact (last @output) => :done))
-
-(count @output)


Further coordinator cleanup.

Further coordinator cleanup.

--- src/onyx/peer/coordinator.clj
+++ src/onyx/peer/coordinator.clj
@@ -82,11 +82,10 @@
   state)

 (defn next-replica
-  [{:keys [peer-config log job-id peer-id messenger curr-replica] :as state}
+  [{:keys [log job-id peer-id messenger curr-replica tenancy-id] :as state}
    barrier-period-ns
    new-replica]
-  (let [{:keys [onyx/tenancy-id]} peer-config
-        curr-version (get-in curr-replica [:allocation-version job-id])
+  (let [curr-version (get-in curr-replica [:allocation-version job-id])
         new-version (get-in new-replica [:allocation-version job-id])
         reallocated? (not= curr-version new-version)]
     (cond reallocated?
@@ -110,9 +109,8 @@
           (assoc state :curr-replica new-replica))))

 (defn complete-job
-  [{:keys [peer-config log job-id messenger checkpoint] :as state}]
-  (let [{:keys [onyx/tenancy-id]} peer-config
-        replica-version (m/replica-version messenger)
+  [{:keys [tenancy-id log job-id messenger checkpoint] :as state}]
+  (let [replica-version (m/replica-version messenger)
         epoch (m/epoch messenger)]
     (let [coordinates {:tenancy-id tenancy-id :job-id job-id :replica-version replica-version :epoch epoch}
           next-write-version (write-coordinate (:write-version checkpoint) log tenancy-id job-id coordinates)]
@@ -147,12 +145,11 @@
        (merge-statuses)))

 (defn periodic-barrier
-  [{:keys [peer-config workflow-depth log curr-replica job-id messenger barrier checkpoint] :as state}]
+  [{:keys [tenancy-id workflow-depth log curr-replica job-id messenger barrier checkpoint] :as state}]
   (if (:offering? barrier)
     ;; No op because hasn't finished emitting last barrier, wait again
     state
-    (let [{:keys [onyx/tenancy-id]} peer-config
-          job-sealed? (boolean (get-in curr-replica [:completed-job-coordinates job-id]))
+    (let [job-sealed? (boolean (get-in curr-replica [:completed-job-coordinates job-id]))
           checkpointed-epoch (:min-epoch (merged-statuses messenger))
           write-coordinate? (> checkpointed-epoch 0)
           coordinates {:tenancy-id tenancy-id
@@ -177,13 +174,11 @@
                                          :checkpoint? checkpoint?}})
           (assoc :messenger messenger)))))

-(defn shutdown [{:keys [peer-config log workflow-depth job-id messenger] :as state}]
+(defn shutdown [{:keys [messenger] :as state}]
   (assoc state :messenger (component/stop messenger)))

-(defn initialise-state [{:keys [log job-id peer-config] :as state}]
-  (let [{:keys [onyx/tenancy-id]} peer-config
-        write-version (assume-checkpoint-coordinate log tenancy-id job-id)]
-    (assert write-version)
+(defn initialise-state [{:keys [log job-id tenancy-id] :as state}]
+  (let [write-version (assume-checkpoint-coordinate log tenancy-id job-id)]
     (-> state
         (assoc-in [:checkpoint :write-version] write-version)
         (assoc :last-heartbeat-time (System/nanoTime)))))
@@ -198,7 +193,7 @@
            (< (:min-epoch status) epoch))))

 (defn coordinator-iteration
-  [{:keys [messenger last-heartbeat-time  allocation-ch shutdown-ch peer-config barrier job] :as state}
+  [{:keys [messenger last-heartbeat-time allocation-ch shutdown-ch barrier job] :as state}
    coordinator-max-sleep-ns
    barrier-period-ns
    heartbeat-ns]
@@ -216,7 +211,8 @@
           (and sealing? (not (checkpointing? (:checkpoint state) status)))
           (complete-job state)

-          (or completed? sealing?
+          (or completed?
+              sealing?
               (not= (m/replica-version messenger) (:replica-version status))
               (not= (m/epoch messenger) (:min-epoch status)))
           (do
@@ -310,7 +306,8 @@
              :shutdown-ch shutdown-ch
              :messenger messenger
              :coordinator-thread (start-coordinator!
-                                   {:workflow-depth workflow-depth
+                                   {:tenancy-id (:onyx/tenancy-id peer-config)
+                                    :workflow-depth workflow-depth
                                     :resume-point resume-point
                                     :log log
                                     :peer-config peer-config


✅ Failing test for changing ID to a conflicting ID

Why:
- The two features interact in bad ways. Another design should avoid the
  issue and also simplify the code, so this test might not be needed,
  but let's commit it for some background if nothing else.

--- test/territory_bro/api_test.clj
+++ test/territory_bro/api_test.clj
@@ -815,7 +815,6 @@
                  (->> (vals (get-in state [::region/regions cong-id]))
                       (sort-by :region/name)))))))

-    ;; TODO: also test changing the ID to a conflicting stream ID - there is a high risk of feature interaction
     (testing "changing the ID will delete the old territory and create a new one"
       (let [new-territory-id (UUID/randomUUID)]
         (jdbc/with-db-transaction [conn db-spec]
@@ -832,6 +831,40 @@
                   :territory/meta {:foo "bar"}
                   :territory/location testdata/wkt-multi-polygon}
                  (get-in state [::territory/territories cong-id new-territory-id]))
-              "new ID"))))))
+              "new ID"))))
+
+    ;; TODO
+    #_(testing "changing the ID to a conflicting ID"
+        ;; combination of the previous two tests, to ensure that the features to not conflict
+        (let [conflicting-stream-id (create-congregation-without-user! "foo")]
+          (jdbc/with-db-transaction [conn db-spec]
+            (jdbc/execute! conn ["update subregion set id = ? where id = ?"
+                                 conflicting-stream-id region-id]))
+          (sync-gis-changes!)
+          (let [state (projections/cached-state)
+                replacement-id (-> (set (keys (get-in state [::region/regions cong-id])))
+                                   (disj region-id) ; produced by earlier tests
+                                   (first))]
+            (prn 'conflicting-stream-id conflicting-stream-id)
+            (prn 'region-id region-id)
+            (prn 'replacement-id replacement-id)
+            #_(is (= "" (set (keys (get-in state [::region/regions cong-id])))))
+            #_(is (some? replacement-id))
+            #_(is (not= conflicting-stream-id replacement-id))
+            #_(is (= [{:region/id replacement-id
+                       :region/name "Conflicting ID"
+                       :region/location testdata/wkt-multi-polygon}
+                      {:region/id region-id
+                       :region/name "Somewhere"
+                       :region/location testdata/wkt-multi-polygon}]
+                     (->> (vals (get-in state [::region/regions cong-id]))
+                          (sort-by :region/name))))
+
+            (is (nil? (get-in state [::region/regions cong-id region-id]))
+                "old ID")
+            (is (nil? (get-in state [::region/regions cong-id conflicting-stream-id]))
+                "conflicting ID")
+            (is (some? (get-in state [::region/regions cong-id replacement-id]))
+                "replacement ID"))))))

 ;; TODO: delete territory and then restore it to same congregation


Removed :age from expected output in 5-4

The instructions state that age is only useful for routing, and it should be removed afterwards, so it makes more sense to remove it from both. Could also rework the instructions to clarify requirements regarding children's age.

--- test/workshop/jobs/test_5_4.clj
+++ test/workshop/jobs/test_5_4.clj
@@ -35,8 +35,8 @@
    {:username "Lucas"}])

 (def expected-child-output
-  [{:username "Ron" :age 16}
-   {:username "Kara" :age 14}])
+  [{:username "Ron"}
+   {:username "Kara"}])

 (deftest test-level-5-challenge-4
   (try


Fix minor doc/debug issues

Fix minor doc/debug issues

--- src/singularity/handlers.cljs
+++ src/singularity/handlers.cljs
@@ -18,20 +18,23 @@

 (defn- move! [s1 s2]
   "Move function accepts 2 coords, moves from s1 to s2"
-  (print "move" s1 s2)
   (db/assoc-in [:board s2 :piece] (db/get-in [:board s1 :piece]))
   (db/assoc-in [:board s1 :piece] nil))

 (defn space
+  "Event handler for when user clicks a space. This can have one of two
+  outcomes. If the click indicates a valid move for the selected piece,
+  clicking will move the selected piece to the new location. If the
+  movement is invalid or a piece is not selected, this will select the
+  clicked piece."
   [x y]
-  "Event handler for when user clicks a space"
   (let [coords [x y]
         piece (db/get-in [:board coords :piece])
         selected (db/get :selected-space)]
     (if (or (nil? selected)
             (= selected coords)
             (not (valid-move? selected coords)))
-      (toggle-select! coords)
-      (do
+      (toggle-select! coords) ; not a valid move, use selection
+      (do ; this is a valid move, use movement
         (move! selected coords)
         (toggle-select! nil)))))


Backend now adds the original poster's name to replies

--- src/statuses/backend/core.clj
+++ src/statuses/backend/core.clj
@@ -67,9 +67,10 @@
            (assoc :timeline (cons id (:timeline db)))
            (assoc :next-id (inc id)))))
   ([db author text reply-to]
-     (let [id (:next-id db)]
+     (let [id (:next-id db)
+           other (:author (get-update db reply-to))]
        (-> db
-           (add-update author text)
+           (add-update author (str "@" other " " text))
            (add-conversation id reply-to)))))

 (defn get-conversation


Updated some dependencies

Updated some dependencies

--- web-app/project.clj
+++ web-app/project.clj
@@ -7,10 +7,11 @@

   :dependencies [[org.clojure/clojure       "1.7.0"]
                  [http-kit "2.1.8"]
-                 [org.clojure/clojurescript "1.7.189" :exclusions [org.apache.ant/ant]]
-                 [org.omcljs/om             "0.8.8"] ; ClojureScript interface to Facebook's React
-                 [cljs-http                 "0.1.30"] ; A ClojureScript HTTP library
-                 [cljsjs/moment             "2.9.0-0"]] ; Moment.js
+                 [org.clojure/clojurescript "1.7.170" :exclusions [org.apache.ant/ant]]
+                 [org.omcljs/om             "0.9.0"]
+                 [org.clojure/core.async    "0.2.374"]
+                 [cljs-http                 "0.1.39" :exclusions [org.clojure/core.async]]
+                 [cljsjs/moment             "2.9.0-0"]]

   :plugins      [[lein-cljsbuild            "1.1.2"] ; Leiningen plugin to make ClojureScript development easy
                  ]


Added a test confirming #54.

Added a test confirming #54.

Node max-sessions are being returned as `[]`.

--- test/shale/test/handler.clj
+++ test/shale/test/handler.clj
@@ -78,4 +78,18 @@
         (is (= (count (set (map #(get % "url") parsed)))
                (count (set node-list)))
             (str "There should be the same number of uniquely configured node "
-                 "URLs as nodes."))))))
+                 "URLs as nodes.")))))
+  (testing "nodes have reasonable default properties"
+    (let [resp (app (mock/request :get "/nodes"))]
+      (is-200 resp)
+      (let [parsed (is-json resp)
+            is-correct (fn [node]
+                         (let [{max-sessions "max_sessions"
+                                tags "tags"}
+                               node]
+                           (is (= tags [])
+                               "Tags should be an empty list or vector.")
+                           (is (or (nil? max-sessions) (number? max-sessions))
+                               "Max sessions should be a number or nil.")))]
+        (doall
+          (map is-correct parsed))))))


Missed a clj-json reference.

Missed a clj-json reference.

--- test/shale/test/handler.clj
+++ test/shale/test/handler.clj
@@ -1,6 +1,6 @@
 (ns shale.test.handler
   (:require [clojure.test :refer :all]
-            [clj-json [core :as json]]
+            [cheshire [core :as json]]
             [carica.core :refer [override-config]]
             [shale.configurer :as configurer]
             [ring.mock.request :as mock]


unused

unused

--- test/sormilla/core_test.clj
+++ test/sormilla/core_test.clj
@@ -1,4 +0,0 @@
-(ns sormilla.core-test
-  (:require [midje.sweet :refer :all]
-            [sormilla.core :refer :all]))
-


Renamed Home to Frames

Renamed Home to Frames

--- doclet/src/clojure/play_clj_doclet/html.clj
+++ doclet/src/clojure/play_clj_doclet/html.clj
@@ -74,7 +74,7 @@
               [:a {:href (str "index.html" (if (not-empty home-link-hash)
                                              (str "#" home-link-hash)
                                              ""))
-                   :target "_top"} "Home"]])
+                   :target "_top"} "Frames"]])
            content
            [:script {:src "highlight.js"}]
            [:script {:src "main.js"}]]])))


Fix stroke and color change bug.

Fix stroke and color change bug.

--- src/uxbox/data/workspace.cljs
+++ src/uxbox/data/workspace.cljs
@@ -229,7 +229,7 @@
     (-apply-update [_ state]
       (update-in state [:shapes-by-id sid]
                  merge
-                 {:stroke-type type}
+                 (when type {:stroke-type type})
                  (when width {:stroke-width width})
                  (when color {:stroke color})
                  (when opacity {:stroke-opacity opacity})))))


Log the series data to the console in the event of a render failure.

--- metlog-vault/src-client/metlog_client/metlog.cljs
+++ metlog-vault/src-client/metlog_client/metlog.cljs
@@ -68,7 +68,8 @@
                            (:begin-t series-range)
                            (:end-t series-range))
               (catch :default e
-                (log/error "Uncaught exception rendering plot for " series " (" e ")"))))))
+                (log/error "Uncaught exception rendering plot for " series " (" e ")")
+                (log/info "series-data" series-data))))))

       :render
       (fn [ this]


Tidying up examples.

Tidying up examples.

--- examples/sweet-examples/basic/test/basic/core_test.clj
+++ examples/sweet-examples/basic/test/basic/core_test.clj
@@ -4,7 +4,7 @@
   (:use midje.sweet)
 )

-(defn note-expected [] (println "^^^^ The previous failure was expected ^^^^"))
+(defn note-expected-failure [] (println "^^^^ The previous failure was expected ^^^^"))

                        ;;;

@@ -20,9 +20,11 @@
 ;; has an alias, facts, for those of you who are sticklers about
 ;; grammar:

-(facts
+(facts "arithmetic"
  (+ 1 1) => 2
  (+ 1 0) => 1)
+
+;; Notice also that you can add "doc strings" to facts. Right now, they're just ignored.

 ;;
 ;; At the moment, midje uses the clojure.test reporting mechanism, so you can wrap
@@ -40,11 +42,11 @@
 ;;     expected: 3
 ;;       actual: 4

-(fact ( #(+ 1 %) 3) => 3)                                          (note-expected)
+(fact ( #(+ 1 %) 3) => 3)                                          (note-expected-failure)

 ;; You can also use functions on the right-hand side. In that case,
 ;; the actual result is passed as the function's single argument.
-(fact ( #(+ 1 %) 3) => odd?)                                       (note-expected)
+(fact ( #(+ 1 %) 3) => odd?)                                       (note-expected-failure)
 ;; The failing test will look slighly different:
 ;;     FAIL at (core_test.clj:47)
 ;;     Actual result did not pass expected function.
@@ -54,7 +56,7 @@
 ;; If you're testing something that produces a function, use
 ;; (exactly):

-(fact (first [even? odd?]) => (exactly odd?))                      (note-expected)
+(fact (first [even? odd?]) => (exactly odd?))                      (note-expected-failure)

 ;;     FAIL at (core_test.clj:57)
 ;;     Actual result did not pass expected function.
@@ -68,7 +70,7 @@

 (fact
   [3 1 2] => (in-any-order [1 2 3])                         ;; succeeds
-  [3 3 1 2] => (in-any-order [1 2 3]))                       (note-expected)
+  [3 3 1 2] => (in-any-order [1 2 3]))                       (note-expected-failure)
 ;;     FAIL at (core_test.clj:69)
 ;;     Actual result did not pass expected function.
 ;;     expected function: (in-any-order [1 2 3])
@@ -95,7 +97,7 @@
  (alive-in-next-generation? ...cell...) => truthy
    (provided
     (alive? ...cell...) => false
-    (neighbor-count ...cell...) => 3))                                         (note-expected)
+    (neighbor-count ...cell...) => 3))                                         (note-expected-failure)

 ;; Notes:
 ;; ...cell... : I use this shorthand to represent some


105 draft solution

105 draft solution

--- stuf/src/sandbox/4clojure.clj
+++ stuf/src/sandbox/4clojure.clj
@@ -685,3 +685,10 @@
 ;; wow solution
 ;; #(clojure.pprint/cl-format nil "~@R" %)

+;;105
+(defn f[v]
+  (->>
+   (partition-by keyword? v)
+   (partition 2)
+   (map (fn [[[f] s]] (vector f (vec s))))
+   (into {})))


CMR-2397: Fix provider and collection deletion to correctly generate elastic delete by queries using the appropriate elastic field

--- indexer-app/src/cmr/indexer/services/index_service.clj
+++ indexer-app/src/cmr/indexer/services/index_service.clj
@@ -29,7 +29,8 @@
             [clojure.edn :as edn]
             [clj-time.core :as t]
             [clj-time.format :as f]
-            [cmr.indexer.data.concept-parser :as cp]))
+            [cmr.indexer.data.concept-parser :as cp]
+            [cmr.common-app.services.search.query-to-elastic :as q2e]))

 (defn filter-expired-concepts
   "Remove concepts that have an expired delete-time."
@@ -209,7 +210,8 @@
                 context
                 (idx-set/get-granule-index-name-for-collection context concept-id)
                 (concept-mapping-types :granule)
-                {:term {:collection-concept-id concept-id}}))))))))
+                {:term {(q2e/query-field->elastic-field :collection-concept-id :granule)
+                        concept-id}}))))))))

 (defn force-delete-collection-revision
   "Removes a collection revision from the all revisions index"
@@ -238,20 +240,20 @@
       context
       (get-in index-names [:collection :collections])
       (concept-mapping-types :collection)
-      {:term {:provider-id provider-id}})
+      {:term {(q2e/query-field->elastic-field :provider-id :collection) provider-id}})
     ;; delete all revisions of collections
     (es/delete-by-query
       context
       (get-in index-names [:collection :all-collection-revisions])
       (concept-mapping-types :collection)
-      {:term {:provider-id provider-id}})
+      {:term {(q2e/query-field->elastic-field :provider-id :collection) provider-id}})
     ;; delete the granules
     (doseq [index-name (idx-set/get-granule-index-names-for-provider context provider-id)]
       (es/delete-by-query
         context
         index-name
         (concept-mapping-types :granule)
-        {:term {:provider-id provider-id}}))))
+        {:term {(q2e/query-field->elastic-field :provider-id :granule) provider-id}}))))

 (defn reset
   "Delegates reset elastic indices operation to index-set app as well as resetting caches"


Optimized Reagent is row selected check

Optimized Reagent is row selected check

--- frameworks/keyed/reagent/src/demo/main.cljs
+++ frameworks/keyed/reagent/src/demo/main.cljs
@@ -18,18 +18,22 @@
                      (.log js/console (str last " took " (- stop @start-time)))))
                  0)))

-(defn row [data selected? on-click on-delete]
-  [:tr
-   {:class (if selected? "danger")}
-   [:td.col-md-1 (:id data)]
-   [:td.col-md-4
-    [:a {:on-click (fn [e] (on-click (:id data)))}
-     (:label data)]]
-   [:td.col-md-1
-    [:a {:on-click (fn [e] (on-delete (:id data)))}
-     [:span.glyphicon.glyphicon-remove
-      {:aria-hidden "true"}]]]
-   [:td.col-md-6]])
+(defn is-selected? [selected id]
+  (= id @selected))
+
+(defn row [data selected on-click on-delete]
+  (let [selected? @(r/track is-selected? selected (:id data))]
+    [:tr
+     {:class (if selected? "danger")}
+     [:td.col-md-1 (:id data)]
+     [:td.col-md-4
+      [:a {:on-click (fn [e] (on-click (:id data)))}
+       (:label data)]]
+     [:td.col-md-1
+      [:a {:on-click (fn [e] (on-delete (:id data)))}
+       [:span.glyphicon.glyphicon-remove
+        {:aria-hidden "true"}]]]
+     [:td.col-md-6]]))

 (defn main []
   (let [id-atom (atom 0)
@@ -123,14 +127,13 @@
                 "Swap rows"]]]]]]
           [:table.table.table-hover.table-striped.test-data
            [:tbody
-            (let [s @selected]
-              (for [d @data]
-                ^{:key (:id d)}
-                [row
-                 d
-                 (identical? (:id d) s)
-                 select
-                 delete]))]]
+            (for [d @data]
+              ^{:key (:id d)}
+              [row
+               d
+               selected
+               select
+               delete])]]
           [:span.preloadicon.glyphicon.glyphicon-remove
            {:aria-hidden "true"}]])})))


(MAINT) Throw IllegalStateException over Exception

This commit changes the exception thrown when the ruby-load-path is
missing from the required JRuby configuration from a plain Exception to
an IllegalStateException.

--- src/clj/puppetlabs/services/jruby/jruby_puppet_core.clj
+++ src/clj/puppetlabs/services/jruby/jruby_puppet_core.clj
@@ -206,7 +206,7 @@
   (let [{:keys [ruby-load-path gem-home
                 http-client-ssl-protocols http-client-cipher-suites]} config]
     (when-not ruby-load-path
-      (throw (Exception.
+      (throw (IllegalStateException.
                "JRuby service missing config value 'ruby-load-path'")))
     (let [scripting-container  (create-scripting-container ruby-load-path gem-home)
           env-registry         (puppet-env/environment-registry)


remove incorrect no billing projects logic from share button

--- src/cljs/main/broadfcui/page/workspace/summary/tab.cljs
+++ src/cljs/main/broadfcui/page/workspace/summary/tab.cljs
@@ -86,7 +86,6 @@
          [comps/SidebarButton
           {:style :light :margin :top :color :button-primary
            :text "Share..." :icon :share
-           :disabled? (when (empty? billing-projects) (comps/no-billing-projects-message))
            :onClick #(modal/push-modal
                       [AclEditor {:workspace-id workspace-id
                                   :user-access-level user-access-level


Break deletes into batches.

Break deletes into batches.

--- src/cavm/h2.clj
+++ src/cavm/h2.clj
@@ -44,6 +44,9 @@
 ; Add 30 for gzip header
 ;( def score-size (+ 30 (* float-size bin-size)))

+; row count for batch operations (e.g. insert/delete)
+(def ^:private batch-size 1000)
+
 ;
 ; Utility functions
 ;
@@ -257,7 +260,32 @@
 ;
 ;

+(defn do-command-while-updates [cmd]
+  (while
+    (> (first (jdbcd/do-commands cmd)) 0)))
+
+(defn delete-rows-by-field-cmd [table field]
+  (format "DELETE FROM `%s` WHERE `field_id` = %d LIMIT %d"
+                table field batch-size))
+
+(defn- clear-fields [exp]
+  (jdbcd/with-query-results
+    field
+    ["SELECT `id` FROM `field` WHERE `dataset_id` = ?" exp]
+    (doseq [{id :id} field]
+      (doseq [table ["code" "feature" "field_gene" "field_position" "field_score"]]
+        (do-command-while-updates
+          (delete-rows-by-field-cmd table id)))))
+  (do-command-while-updates
+    (format "DELETE FROM `field` WHERE `dataset_id` = %d LIMIT %d"
+            exp batch-size)))
+
+; Deletes an experiment. We break this up into a series
+; of commits so other threads are not blocked, and we
+; don't time-out the db thread pool.
+; XXX Might want to add a "deleting" status to the dataset table?
 (defn- clear-by-exp [exp]
+  (clear-fields exp)
   (jdbcd/delete-rows :field ["`dataset_id` = ?" exp]))

 ; Update meta entity record.
@@ -502,8 +530,6 @@
 (defn- sequence-stmt ^cavm.statement.PStatement [db-seq]
   (sql-stmt-result (jdbcd/find-connection)
                          (format "SELECT NEXT VALUE FOR %s AS i" db-seq)))
-
-(def ^:private batch-size 1000)

 (defn- run-delays [m]
   (into {} (for [[k v] m] [k (force v)])))


Add the company link only if the user has read access: it happens if the company is public or if the user is part of the org.

--- src/open_company/representations/stakeholder_update.clj
+++ src/open_company/representations/stakeholder_update.clj
@@ -36,25 +36,27 @@

 (defn- stakeholder-update-links
   "Add the HATEAOS links to the stakeholder update"
-  [update company-url authorized]
-  (let [su-links [(self-link company-url (:slug update))
-                  (common/link-map "company" common/GET company-url common/company-media-type)]
-        links (if authorized
-                (conj su-links (common/delete-link (stakeholder-update-url company-url (:slug update))))
-                su-links)]
-    (assoc update :links links)))
+  [update company-url read-access write-access]
+  (let [su-links [(self-link company-url (:slug update))]
+        with-read (if read-access
+                   (conj su-links (common/link-map "company" common/GET company-url common/company-media-type))
+                   su-links)
+        with-write (if write-access
+                     (conj with-read (common/delete-link (stakeholder-update-url company-url (:slug update))))
+                     with-read)]
+    (assoc update :links with-write)))

 (defn- stakeholder-update-for-rendering
   "Get a representation of the stakeholder update for the REST API"
-  [company-url update authorized]
+  [company-url update read-access write-access]
   (-> update
-    (stakeholder-update-links company-url authorized)
+    (stakeholder-update-links company-url read-access write-access)
     (common/clean clean-properties)))

 (defn render-stakeholder-update
   "Create a JSON representation of a stakeholder updates for the REST API"
-  [company-url update authorized]
-  (json/generate-string (stakeholder-update-for-rendering company-url update authorized) {:pretty true}))
+  [company-url update read-access write-access]
+  (json/generate-string (stakeholder-update-for-rendering company-url update read-access write-access) {:pretty true}))

 (defn render-stakeholder-update-list
   "Create a JSON representation of a group of stakeholder updates for the REST API"


Show link preview image if thumbnailUrl is not empty

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

--- src/status_im/ui/screens/chat/message/link_preview.cljs
+++ src/status_im/ui/screens/chat/message/link_preview.cljs
@@ -86,9 +86,10 @@
                          (re-frame/dispatch
                           [:browser.ui/message-link-pressed link]))}
            [react/view (styles/link-preview-wrapper outgoing timeline)
-            [react/image {:source              {:uri thumbnailUrl}
-                          :style               (styles/link-preview-image outgoing (select-keys preview-data [:height :width]))
-                          :accessibility-label :member-photo}]
+            (when-not (string/blank? thumbnailUrl)
+              [react/image {:source              {:uri thumbnailUrl}
+                            :style               (styles/link-preview-image outgoing (select-keys preview-data [:height :width]))
+                            :accessibility-label :member-photo}])
             (when-not (is-gif? thumbnailUrl)
               [:<>
                [quo/text {:size  :small


Add some basic requires and no-locking tests

--- test/dependable/core_test.clj
+++ test/dependable/core_test.clj
@@ -11,36 +11,36 @@
           v)))))

 (let  [package-a30
-      {:name "a"
-       :version 30
-       :location "a_loc30"
-       :conflicts {"c" nil}
-       }
-      package-a20
-      {:name "a"
-       :version 20
-       :location "a_loc20"}
-      package-c10
-      {:name "c"
-       :version 10
-       :location "c_loc10"}
-      package-d22
+       {:name "a"
+        :version 30
+        :location "a_loc30"
+        :conflicts {"c" nil}
+        }
+       package-a20
+       {:name "a"
+        :version 20
+        :location "a_loc20"}
+       package-c10
+       {:name "c"
+        :version 10
+        :location "c_loc10"}
+       package-d22
        {:name "d"
         :version 22
         :location "d_loc22"}
-      package-e18
+       package-e18
        {:name "e"
         :version 18
         :location "e_loc18"
         :conflicts {"d" nil}}
-      repo-info
-      {"a"
-       [package-a30
-        package-a20]
-       "c"
-       [package-c10]
-       "d"
-       [package-d22]}
+       repo-info
+       {"a"
+        [package-a30
+         package-a20]
+        "c"
+        [package-c10]
+        "d"
+        [package-d22]}
        query (map-query repo-info)]
   (deftest retrieval
            (testing "Asking for a present package succeeds."
@@ -48,10 +48,10 @@
                              [{:name "a"}]
                              query)
                            [:successful package-a30])))
-                    (is (= (resolve-dependencies
-                             [{:name "c"}]
-                             query)
-                           [:successful package-c10]))
+           (is (= (resolve-dependencies
+                    [{:name "c"}]
+                    query)
+                  [:successful package-c10]))
            (testing "Asking for a nonexistent package fails."
                     (is (= (resolve-dependencies
                              [{:name "b"}]
@@ -77,7 +77,7 @@
                              [{:name "a"
                                :version-spec #(and (>= %1 15) (<= %1 25))}]
                              query)
-                             [:successful package-a20]))
+                           [:successful package-a20]))
                     (is (= (resolve-dependencies
                              [{:name "a"
                                :version-spec #(>= %1 25)}]
@@ -91,7 +91,7 @@
                              query)
                            [:successful package-a30])))
            (testing (str "Asking to install a package that I have given as "
-                    "already installed.")
+                         "already installed.")
                     (is (= (resolve-dependencies [{:name "c"}]
                                                  query
                                                  :already-installed {"c" 18})
@@ -111,7 +111,7 @@
                              [{:name "a"
                                :version-spec #(>= % 25)}]
                              query
-                              :already-installed {"a" 15})
+                             :already-installed {"a" 15})
                            [:unsatisfiable "a"])))
            (testing (str "Asking to install a package that is already "
                          "installed, and the installed version suits.")
@@ -121,39 +121,39 @@
                              query
                              :already-installed {"a" 30})
                            [:successful]))))
-  (deftest conflicts
-           (testing (str "Find a package which conflicts with another "
-                         "package also to be installed.")
-                    (is (= (resolve-dependencies
-                             [{:name "d"}
-                              {:name "e"}]
-                             query)
-                           [:unsatisfiable "e"])))
-           (testing (str "Find a package which conflicts with a package "
-                         "marked a priori as conflicting.")
-                    (is (= (resolve-dependencies
-                             [{:name "a"}
-                              {:name "d"}]
-                             query
-                             :conflicts {"d" nil})
-                           [:unsatisfiable "d"])))
-           (testing (str "Find a package which conflicts with a package "
-                         "marked a priori as conflicting with something "
-                         "already installed.")
-                    (is (= (resolve-dependencies
-                             [{:name "d"}]
-                             query
-                             :already-installed {"a" 11}
-                             :conflicts {"d" nil})
-                           [:unsatisfiable "d"])))
-
-           (testing (str "Find a package which conflicts with another "
-                         "package but not at its current version")
-                    (is (= (resolve-dependencies
-                             [{:name "d"}]
-                             query
-                             :conflicts {"d" #(< % 22)})
-                           [:successful package-d22])))))
+(deftest conflicts
+         (testing (str "Find a package which conflicts with another "
+                       "package also to be installed.")
+                  (is (= (resolve-dependencies
+                           [{:name "d"}
+                            {:name "e"}]
+                           query)
+                         [:unsatisfiable "e"])))
+         (testing (str "Find a package which conflicts with a package "
+                       "marked a priori as conflicting.")
+                  (is (= (resolve-dependencies
+                           [{:name "a"}
+                            {:name "d"}]
+                           query
+                           :conflicts {"d" nil})
+                         [:unsatisfiable "d"])))
+         (testing (str "Find a package which conflicts with a package "
+                       "marked a priori as conflicting with something "
+                       "already installed.")
+                  (is (= (resolve-dependencies
+                           [{:name "d"}]
+                           query
+                           :already-installed {"a" 11}
+                           :conflicts {"d" nil})
+                         [:unsatisfiable "d"])))
+
+         (testing (str "Find a package which conflicts with another "
+                       "package but not at its current version")
+                  (is (= (resolve-dependencies
+                           [{:name "d"}]
+                           query
+                           :conflicts {"d" #(< % 22)})
+                         [:successful package-d22])))))

 (deftest requires
          (let [package-a
@@ -208,24 +208,24 @@
                               {:name "b"}]
                              query)
                            [:unsatisfiable "b" "c"]))))
-           (let [package-a
-                 {:name "a"
-                  :version 10
-                  :location "a_loc10"}
-                 package-b
-                 {:name "b"
-                  :version 10
-                  :location "b_loc10"
-                  :requires [{:name "c"}]}
-                 package-c
-                 {:name "c"
-                  :version 10
-                  :local "c_loc10"}
-                 repo-info
-                 {"a" [package-a]
-                  "b" [package-b]
-                  "c" [package-c]}
-                 query (map-query repo-info)]
+         (let [package-a
+               {:name "a"
+                :version 10
+                :location "a_loc10"}
+               package-b
+               {:name "b"
+                :version 10
+                :location "b_loc10"
+                :requires [{:name "c"}]}
+               package-c
+               {:name "c"
+                :version 10
+                :local "c_loc10"}
+               repo-info
+               {"a" [package-a]
+                "b" [package-b]
+                "c" [package-c]}
+               query (map-query repo-info)]
            (testing (str "A package having dependencies rejected a priori "
                          "also gets rejected")
                     (is (= (resolve-dependencies
@@ -235,16 +235,128 @@
                              :conflicts {"c" nil})
                            [:unsatisfiable "b" "c"])))))

-
-;; *maybe*. I'll think about it.
-;; Also get other tests from notebook.
-#_(deftest no-locking
-           (testing (str "Find two packages, even when the preferred version "
-                         "of one package conflicts with the other")
+(deftest no-locking
+         (testing (str "Find two packages, even when the preferred version "
+                       "of one package conflicts with the other")
+                  (let [package-a30
+                        {:name "a"
+                         :version 30
+                         :location "a_loc30"
+                         :conflicts {"c" nil}
+                         }
+                        package-a20
+                        {:name "a"
+                         :version 20
+                         :location "a_loc20"}
+                        package-c10
+                        {:name "c"
+                         :version 10
+                         :location "c_loc10"}
+                        repo-info
+                        {"a" [package-a30 package-a20]
+                         "c" [package-c10]}
+                        query (map-query repo-info)]
                     (is (= (resolve-dependencies
                              [{:name "a"}
                               {:name "c"}]
                              query)
                            [:successful package-a20 package-c10]))))

-
+         (testing (str "Diamond problem")
+                  (let [package-a
+                        {:name "a"
+                         :version 1
+                         :location "a_loc1"
+                         :requires [{:name "b"}
+                                    {:name "c"}]}
+                        package-b
+                        {:name "b"
+                         :version 1
+                         :location "b_loc1"
+                         :requires [{:name "d"
+                                     :version-spec #(>= % 2)}]}
+                        package-c
+                        {:name "c"
+                         :version 1
+                         :location "c_loc1"
+                         :requires [{:name "d"
+                                     :version-spec #(< % 4)}]}
+                        package-d3
+                        {:name "d"
+                         :version 3
+                         :location "d_loc3"}
+                        package-d4
+                        {:name "d"
+                         :version 4
+                         :location "d_loc4"}
+                        repo-info
+                        {"a" [package-a]
+                         "b" [package-b]
+                         "c" [package-c]
+                         "d" [package-d4 package-d3]}
+                        query
+                        (map-query repo-info)]
+                    (is (= (resolve-dependencies
+                             [{:name "a"}]
+                             query)
+                           [:successful
+                            package-a
+                            package-b
+                            package-c
+                            package-d3]))))
+         (let [package-a
+               {:name "a"
+                :version 1
+                :location "a_loc1"
+                :requires [{:name "b"}
+                           {:name "c"}]}
+               package-b
+               {:name "b"
+                :version 1
+                :location "b_loc1"
+                :requires [{:name "d"
+                            :version-spec #(>= % 2)}
+                           {:name "e"
+                            :version-spec #(= % 5)}]}
+               package-c
+               {:name "c"
+                :version 1
+                :location "c_loc1"
+                :requires [{:name "e"
+                            :version-spec #(>= % 1)}
+                           {:name "d"
+                            :version-spec #(< % 4)}]}
+               package-d3
+               {:name "d"
+                :version 3
+                :location "d_loc3"}
+               package-d4
+               {:name "d"
+                :version 4
+                :location "d_loc4"}
+               package-e6
+               {:name "e"
+                :version 6
+                :location "e_loc6"}
+               package-e5
+               {:name "e"
+                :version 6
+                :location "e_loc5"}
+               repo-info
+               {"a" [package-a]
+                "b" [package-b]
+                "c" [package-c]
+                "d" [package-d4 package-d3]
+                "e" [package-e6 package-e5]}
+               query
+               (map-query repo-info)]
+           (testing (str "Inter-Locking Diamond problem")
+                    (is (= (resolve-dependencies
+                             [{:name "a"}]
+                             query)
+                           [:successful
+                            package-a
+                            package-b
+                            package-c
+                            package-d3
+                            package-e5])))))


improved job preparation

improved job preparation

--- test/distillery/core_test.clj
+++ test/distillery/core_test.clj
@@ -31,21 +31,32 @@
         "Makroökonomie online lernen - VWL Tutorium (360)"
         "Parabeln_Quadratische Funktion_en Übersicht (Scheitelpunkt,Stauchung,Streckung,etc.) (720)"]))

+(def videos [
+             ["12-01-1" "12.01.1 Datenstrukturen, Array, Queue, Stack"]
+             ["Bernoulli" "Binomialverteilung_Formel von Bernoulli, Stochastik, Nachhilfe online, Hilfe in Mathe (720)"]
+             ["Hypothesentest" "Einseitiger(rechtsseitiger) Hypothesentest_mit Ablesen aus der Tabelle, Stochastik, Nachhilfe online (720)"]
+             ["Parabeln" "Parabeln_Quadratische Funktion_en Übersicht (Scheitelpunkt,Stauchung,Streckung,etc.) (720)"]
+             ["Gauss" "Gauß-Algorithmus_Lineares Gleichungssystem lösen (einfach_schnell erklärt), Nachhilfe online (720)"]
+             ["Lambda" "Der Lambda-Kalkül (720)"]
+             ["IS-Kurve" "IS-Kurve im Vier-Quadrantenschema Die Herleitung (720)"]
+             ["Makrooekonomie" "Makroökonomie online lernen - VWL Tutorium (360)"]
+             ;["Bankgeheimnis" "Bernd Senf 3. Bankgeheimnis Geldschöpfung - Monetative als Lösung (720)"]
+             ])
+
 (def job-descr
   {:job-name "Testlauf"
    :job-description "Ein Testprojekt für Testzwecke mit Testvideos und Testkategorien. Wird zum Testen verwendet."
    :output-dir (str root "Output")
-   :cloud-precision :low ; :low, :medium, :high
-   :videos [{:id "12-01-1"
-             :name "12.01.1 Datenstrukturen, Array, Queue, Stack"
-             :video-file (str root "Media\\Video\\12.01.1 Datenstrukturen, Array, Queue, Stack.mp4")
-             :audio-file (str root "Media\\Audio\\de-DE\\12.01.1 Datenstrukturen, Array, Queue, Stack.wav")
-             :results-file (str root "Media\\Audio\\de-DE\\transcript\\12.01.1 Datenstrukturen, Array, Queue, Stack.srr")}
-            {:id "Lambda"
-             :name "Der Lambda-Kalkül (720)"
-             :video-file (str root "Media\\Video\\Der Lambda-Kalkül (720).mp4")
-             :audio-file (str root "Media\\Audio\\de-DE\\Der Lambda-Kalkül (720).wav")
-             :results-file (str root "Media\\Audio\\de-DE\\transcript\\Der Lambda-Kalkül (720).srr")}]
+   :cloud-precision :medium ; :low, :medium, :high
+   :videos (->> videos
+                (map (fn
+                       [[id name]]
+                       {:id id
+                        :name name
+                        :video-file (str root "Media\\Video\\" name ".mp4")
+                        :audio-file (str root "Media\\Audio\\de-DE\\" name ".wav")
+                        :results-file (str root "Media\\Audio\\de-DE\\transcript\\" name ".srr")}))
+                (vec))
    :categories []})

 (deftest test-playground


fixed test in reproject.

fixed test in reproject.

--- test/forma/reproject_test.clj
+++ test/forma/reproject_test.clj
@@ -1,12 +1,16 @@
 (ns forma.reproject-test
   (:use [forma.reproject] :reload)
-  (:use midje.sweet))
+  (:use midje.sweet
+        [forma.matrix.utils :only (rowcol->idx)]))

-(let [rain-indexer (wgs84-indexer "1000" 0.5 + + -90 0)]
-  (fact
-   "This is the only one I have so far... but we need to verify at
+(let [step 0.5
+      [width] (dimensions-for-step step)
+      rain-indexer (wgs84-indexer "1000" step + + -90 0)]
+  (facts
+    "This is the only one I have so far... but we need to verify at
 least one of these indices."
-   (rain-indexer 8 6 12 12) => 172569))
+    (rain-indexer 8 6 12 12) => [239 489]
+    (rowcol->idx width 239 489) => 172569))

 (fact (dimensions-for-step 0.5) => [720 360])
 (fact (fit-to-grid 0.5 + + -90 0 -42.1 0) => [95 0])


Checks for namespaced kws.

Checks for namespaced kws.

--- test/onyx/validation_test.clj
+++ test/onyx/validation_test.clj
@@ -27,12 +27,10 @@
         illegal-input-catalog
         [{:onyx/name :in-bootstrapped
           :onyx/type :input
-          :onyx/bootstrap? true
           :onyx/batch-size 2}]
         illegal-output-catalog
         [{:onyx/name :in-bootstrapped
           :onyx/type :output
-          :onyx/bootstrap? true
           :onyx/batch-size 2}]

         illegal-function-catalog
@@ -90,6 +88,75 @@
         [{:lifecycle/task :in
           :lifecycle/calls :non-namespaced-calls}]

+        bad-fn-ns-form
+        [{:onyx/name :in
+          :onyx/plugin :a/b
+          :onyx/medium :some-medium
+          :onyx/type :input
+          :onyx/bootstrap? true
+          :onyx/batch-size 2}
+         {:onyx/name :intermediate
+          :onyx/fn :fn-path
+          :onyx/type :function
+          :onyx/batch-size 2}
+         {:onyx/name :out
+          :onyx/plugin :a/b
+          :onyx/medium :some-medium
+          :onyx/type :output
+          :onyx/batch-size 2}]
+
+        bad-input-plugin
+        [{:onyx/name :in
+          :onyx/plugin :ab
+          :onyx/medium :some-medium
+          :onyx/type :input
+          :onyx/bootstrap? true
+          :onyx/batch-size 2}
+         {:onyx/name :intermediate
+          :onyx/fn :a/fn-path
+          :onyx/type :function
+          :onyx/batch-size 2}
+         {:onyx/name :out
+          :onyx/plugin :a/b
+          :onyx/medium :some-medium
+          :onyx/type :output
+          :onyx/batch-size 2}]
+
+        bad-output-plugin
+        [{:onyx/name :in
+          :onyx/plugin :a/b
+          :onyx/medium :some-medium
+          :onyx/type :input
+          :onyx/bootstrap? true
+          :onyx/batch-size 2}
+         {:onyx/name :intermediate
+          :onyx/fn :a/fn-path
+          :onyx/type :function
+          :onyx/batch-size 2}
+         {:onyx/name :out
+          :onyx/plugin :b
+          :onyx/medium :some-medium
+          :onyx/type :output
+          :onyx/batch-size 2}]
+
+        java-input-plugin
+        [{:onyx/name :in
+          :onyx/plugin :ab
+          :onyx/medium :some-medium
+          :onyx/language :java
+          :onyx/type :input
+          :onyx/bootstrap? true
+          :onyx/batch-size 2}
+         {:onyx/name :intermediate
+          :onyx/fn :a/fn-path
+          :onyx/type :function
+          :onyx/batch-size 2}
+         {:onyx/name :out
+          :onyx/plugin :a/b
+          :onyx/medium :some-medium
+          :onyx/type :output
+          :onyx/batch-size 2}]
+
         correct-catalog
         [{:onyx/name :in
           :onyx/plugin :a/b
@@ -125,6 +192,15 @@
                                                                :task-scheduler :onyx.task-scheduler/balanced})))

       (is (thrown? Exception (onyx.api/submit-job peer-config {:catalog incomplete-catalog :workflow workflow
+                                                               :task-scheduler :onyx.task-scheduler/balanced})))
+
+      (is (thrown? Exception (onyx.api/submit-job peer-config {:catalog bad-fn-ns-form :workflow workflow
+                                                               :task-scheduler :onyx.task-scheduler/balanced})))
+
+      (is (thrown? Exception (onyx.api/submit-job peer-config {:catalog bad-input-plugin :workflow workflow
+                                                               :task-scheduler :onyx.task-scheduler/balanced})))
+
+      (is (thrown? Exception (onyx.api/submit-job peer-config {:catalog bad-output-plugin :workflow workflow
                                                                :task-scheduler :onyx.task-scheduler/balanced}))))

     (testing "bad-jobs-2"
@@ -154,7 +230,7 @@
                                                                :lifecycles invalid-lifecycles
                                                                :task-scheduler :onyx.task-scheduler/balanced}))))

-    (onyx.api/shutdown-env env)))
+    (onyx.api/shutdown-env env)))

 (deftest map-set-workflow


(PDB-3302) Add clarifying comment to soft_write_fail test

--- test/puppetlabs/puppetdb/integration/soft_fail/soft_write_fail.clj
+++ test/puppetlabs/puppetdb/integration/soft_fail/soft_write_fail.clj
@@ -17,6 +17,9 @@
             (int/run-puppet ps pdb "Notify <<| |>>"))))

     (testing "Agent run should succeed for manifest which exports resources"
+      ;; This puppet run will work, but since puppetdb isn't actually running we
+      ;; it's fruitless to wait for the commands to be processed. Instead specify a short
+      ;; timeout and see that it gets triggered.
       (is (thrown+? [:kind ::int/command-processing-timeout]
             (int/run-puppet ps pdb "@@notify { 'exported notify': }"
                             {:timeout 500}))))))


Add new bug for sets of ratios

Add new bug for sets of ratios


coming in terms eventual

coming in terms eventual

--- src/nn/core.clj
+++ src/nn/core.clj
@@ -8,7 +8,6 @@
             [clojure.core.async :refer [chan <! >! put! close! go-loop go]]
             [org.httpkit.server :as http-kit]
             [ring.middleware.reload :as reload]
-            [ompostgres.db :as db]
             [hiccup.page :as html]
             [hiccup.element :as element]
             [ring.util.response :as resp]))
@@ -16,16 +15,18 @@
 (defn main-page []
   (html/html5
    [:head
-    [:title "depth in field"]]
-   [:body
-    [:video {:autoplay "autoplay" :src "/nnogg.ogg"}]]))
+    [:title "depth in field"]
+    [:style "html {height: 100%; width: 100%}"]
+    ]
+   [:body {:style "display: flex; justify-content: center; align-items: center; height: 100%; background: black; flex-flow: column;"}
+    [:video {:autoplay "autoplay" :src "/nnphone.mp4"}]
+    [:span {:style "color: white"} "coming in terms eventual"]]))

 (defroutes nroutes
   (GET "/" [] (resp/response (main-page)))
   (route/resources "/" {:root "public"}))

 (def app (-> nroutes wrap-edn-params reload/wrap-reload))
-

 (defn -main
   ([port]


Minor edits to swap! doc string

Minor edits to swap! doc string

--- modules/cache/src/main/clojure/immutant/cache.clj
+++ modules/cache/src/main/clojure/immutant/cache.clj
@@ -247,18 +247,20 @@
    options))

 (defn swap!
-  "Atomically swaps the value associated with the key in the cache
-  with the result of applying f, passing the current value as the
-  first param along with any args.
-
-  Asynchronously-replicated caches and transactional caches without
-  locking configured can result in a race condition where multiple
-  callers might apply f to the same value successfully.
-
-  If you don't need a transactional cache, create it with :tx false
-  before passing it to this function. Otherwise, set :locking to
-  either :optimistic (low contention expected) or :pessimistic (high
-  contention expected)"
+  "Atomically swaps the value associated to the key in the cache with
+  the result of applying f, passing the current value as the first
+  param along with any args. Function f should have no side effects,
+  as it may be called multiple times.
+
+  Using swap! with either asynchronously-replicated caches or
+  transactional caches without locking configured can result in a race
+  condition where multiple callers might apply f to the same value
+  successfully.
+
+  Therefore, if you don't need a transactional cache, create it
+  with :tx false. For transactional caches (the default), set :locking
+  to either :optimistic when low write contention is expected
+  or :pessimistic when write contention will be high."
   [^InfinispanCache cache key f & args]
   (loop [val (get cache key)]
     (let [new (apply f val args)]