Skip to content

Commit

Permalink
Reformat some namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
helins committed Mar 26, 2021
1 parent 643c4fd commit aa1b551
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 60 deletions.
8 changes: 2 additions & 6 deletions src/main/dvlopt/dsim.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
:cljs :refer-macros) [?]]
[dvlopt.rktree :as rktree]
[dvlopt.void :as void])
#?(:clj (:import (clojure.lang ExceptionInfo
PersistentQueue))))
#?(:clj (:import clojure.lang.PersistentQueue)))


;;;;;;;;;; API structure (searchable for easy navigation)
Expand All @@ -44,8 +43,6 @@
;; @[fdat] Serialization of whole contexts (events and flows included) via the `dvlopt.fdat` library




;;;;;;;;;; MAYBEDO


Expand Down Expand Up @@ -97,7 +94,6 @@




(defn queue?

"Is `x` a persistent queue?
Expand Down Expand Up @@ -1881,7 +1877,7 @@
- wq-replay
- wq-sreplay
[https://github.com/dvlopt/fdat.cljc](https://github.com/dvlopt/fdat.cljc)"
[https://github.com/helins/fdat.cljc](https://github.com/helins/fdat.cljc)"

[-sampler
finite
Expand Down
9 changes: 1 addition & 8 deletions src/main/dvlopt/dsim/util.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
"Utilities, the user should not be bothered by this."

{:author "Adam Helinski"
:no-doc true}

(:require [dvlopt.void :as void]))


:no-doc true})


;;;;;;;;;; Collections
Expand Down Expand Up @@ -42,7 +38,6 @@




(defn assoc-shortest

;; Associates `leaf` at `path` only if `path` is shorter than the tree.
Expand All @@ -67,7 +62,6 @@




; (defn merge-shortest
;
; ""
Expand Down Expand Up @@ -99,7 +93,6 @@




(defn pop-stack

;; Given a stack in a map, pops and element and dissociates the stack if it is now empty.
Expand Down
41 changes: 1 addition & 40 deletions src/test/dvlopt/dsim/test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
ByteArrayOutputStream))))




;;;;;;;;;; Transit ser/de for testing that ctxs are indeed serializable


Expand All @@ -42,7 +40,6 @@




(defn deserialize

"Deserializes using Transit."
Expand All @@ -57,7 +54,6 @@




(fdat/register dsim/serializable)


Expand All @@ -76,7 +72,6 @@
(meta b))))



;;;;;;;;;; Time utilities


Expand All @@ -100,8 +95,6 @@





;;;;;;;;;; Scaling numerical values


Expand Down Expand Up @@ -185,7 +178,6 @@




(t/deftest minmax-norm


Expand All @@ -200,8 +192,6 @@
100 1))




;;;;;;;;; Generalities about contextes


Expand All @@ -227,8 +217,6 @@
15)))))




;;;;;;;;;; Events, flows, and utilities needed for testing engines


Expand Down Expand Up @@ -364,8 +352,6 @@
n))))




;; <!> Not forgetting to register our functions

(fdat/register [-event-inc
Expand All @@ -379,8 +365,6 @@
stateless-pred?])




;;;;;;;;;; Adding, removing, and modifying events
;;
;;
Expand All @@ -404,7 +388,6 @@




(t/deftest e-assoc


Expand All @@ -425,7 +408,6 @@




(t/deftest e-conj


Expand Down Expand Up @@ -477,7 +459,6 @@




(t/deftest e-into


Expand Down Expand Up @@ -544,7 +525,6 @@




(t/deftest e-isolate


Expand All @@ -569,7 +549,6 @@




(t/deftest e-push


Expand Down Expand Up @@ -631,8 +610,6 @@
"In the event tree to a queue")))




;;;;;;;;;; Basic engines


Expand All @@ -652,12 +629,12 @@
engine-2))))



(def history
(historic (dsim/basic-engine)))




(t/deftest basic-engine

(t/is (= '()
Expand Down Expand Up @@ -687,7 +664,6 @@
"Respecting order of events")))



;;;;;;;;;; Discrete-Event Engines


Expand All @@ -702,7 +678,6 @@




(defn ctx-jump

[n]
Expand All @@ -713,7 +688,6 @@




(defn eager-periodicity

"Adds the same event n times with a time interval of 1."
Expand All @@ -732,7 +706,6 @@




(def history-DE
(historic (dsim/ptime-engine {::dsim/before (fn before [ctx]
(update ctx
Expand All @@ -744,7 +717,6 @@
inc))})))



(t/deftest ptime-engine

(t/is (= '()
Expand Down Expand Up @@ -794,7 +766,6 @@




(t/deftest error-handling

(let [q-failing (dsim/queue event-inc
Expand Down Expand Up @@ -825,7 +796,6 @@




(t/deftest stop

(t/is (= (ctx-jump 1)
Expand All @@ -840,7 +810,6 @@
"Stopping everything"))



;;;;;;;;;; Working queues
;;
;;
Expand Down Expand Up @@ -878,7 +847,6 @@




(t/deftest wq-exec


Expand All @@ -898,7 +866,6 @@




(t/deftest wq-replay


Expand Down Expand Up @@ -937,7 +904,6 @@




(t/deftest wq-sreplay

(t/is (= [:out :in :in :out :out :in :in :out]
Expand All @@ -956,8 +922,6 @@
"An inner loop within an outer one"))




;;;;;;;;;; Flows


Expand All @@ -971,7 +935,6 @@




(t/deftest infinite

(let [n 100
Expand All @@ -993,7 +956,6 @@




(t/deftest sampled-finite

;; Tests `finite` as well.
Expand Down Expand Up @@ -1052,7 +1014,6 @@




(t/deftest sampler

;; Tests `finite` as well.
Expand Down
3 changes: 0 additions & 3 deletions src/test/dvlopt/dsim/test/util.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
[dvlopt.dsim.util :as dsim.util]))




;;;;;;;;;; Handling trees


Expand Down Expand Up @@ -41,7 +39,6 @@




; (t/deftest merge-shortest
;
;
Expand Down
3 changes: 0 additions & 3 deletions transit/src/main/dvlopt/dsim/transit.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#?(:clj (:import clojure.lang.PersistentQueue)))




;;;;;;;;;;


Expand All @@ -39,7 +37,6 @@




(defn writer-options

"Options for writers. Contains `:handlers` but also the `:transform`.
Expand Down

0 comments on commit aa1b551

Please sign in to comment.