Skip to content

Commit

Permalink
version 1-alpha5 -- minor changes: cleaning up unnecessary printing, …
Browse files Browse the repository at this point in the history
…sleeping, etc.
  • Loading branch information
daslu committed Aug 21, 2023
1 parent 74d5ac6 commit 9fb1685
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).

## [1-alpha5] - 2023-08-21
- minor changes: cleaning up unnecessary printing, sleeping, etc.

## [1-alpha4] - 2023-08-20
- basic change detection (#4)
- special value representations are defined in an ordered fashion
Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[org.corfield.build :as bb]))

(def lib 'org.scicloj/note-to-test)
(def version "1-alpha4")
(def version "1-alpha5")
#_ ; alternatively, use MAJOR.MINOR.COMMITS:
(def version (format "1.0.%s" (b/git-count-revs nil)))

Expand Down
7 changes: 2 additions & 5 deletions src/scicloj/note_to_test/v1/impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@
(defn define-value-representations!
[representations]
(reset! *value-representations representations)
:ok)
[:ok])

(defn represent-value [v]
(-> (->> @*value-representations
(map (fn [{:keys [predicate representation]}]
(Thread/sleep 100)
(println {:v v
:check (predicate v)})
(if (predicate v)
(when (predicate v)
{:note-to-test/representeation (representation v)})))
(filter #(contains? % :note-to-test/representeation))
first)
Expand Down
2 changes: 1 addition & 1 deletion test/dum/dummy_generated_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
(->> (into {}))))}
{:predicate (partial = 5)
:representation (constantly :five)}]))
:ok))
[:ok]))

(is (= (note-to-test/represent-value
(+ 2 3))
Expand Down

0 comments on commit 9fb1685

Please sign in to comment.