Skip to content

Commit

Permalink
Fix double radix calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
RokLenarcic committed Dec 13, 2022
1 parent e48f3ae commit 23451ef
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
27 changes: 27 additions & 0 deletions build.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
(ns build
(:refer-clojure :exclude [test])
(:require [clojure.tools.build.api :as b] ; for b/git-count-revs
[org.corfield.build :as bb]))

(def lib 'org.clojars.roklenarcic/cljc-shuffle)
(def version "1.0.1")

(defn test "Run the tests." [opts]
(bb/run-tests opts))

(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/run-tests)
(bb/clean)
(bb/jar)))

(defn install "Install the JAR locally." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/install)))

(defn deploy "Deploy the JAR to Clojars." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/deploy)))
9 changes: 8 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

:deps {}

:aliases {:dev {:extra-paths ["test"]
:aliases {:build {:deps {io.github.seancorfield/build-clj
{:git/tag "v0.8.5" :git/sha "de693d0"}}
:ns-default build}
:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
io.github.cognitect-labs/test-runner
{:git/tag "v0.5.0" :git/sha "48c3c67"}}}
:dev {:extra-paths ["test"]
:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.773"}
thheller/shadow-cljs {:mvn/version "2.11.20"}}
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"
Expand Down
2 changes: 1 addition & 1 deletion src/cljc_shuffle/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
(< (count coll) (count radix)) (throw (ex-info
"Shuffle idx higher than total number of shuffles"
{:idx idx :coll coll}))
:else (util/permute (util/to-factoradic idx) coll))))
:else (util/permute radix coll))))

0 comments on commit 23451ef

Please sign in to comment.