Skip to content

Commit

Permalink
Rebroadcast test (#185)
Browse files Browse the repository at this point in the history
* Clean up wallbrew config

* Cleanup makefile

* Bump vulnerable dep

* Fix file extension

* [Format] Auto-formatting

---------

Co-authored-by: nnichols <[email protected]>
  • Loading branch information
nnichols and nnichols authored Oct 13, 2024
1 parent 2c5e1a6 commit 5afeba2
Show file tree
Hide file tree
Showing 26 changed files with 119 additions and 29 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .sealog/config.edn → .wallbrew/sealog/config.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{:changelog-filename "CHANGELOG.md"
:changelog-entry-directory ".sealog/changes/"
:changelog-entry-directory ".wallbrew/sealog/changes/"
:version-scheme :semver3
:pretty-print-edn? true}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

.PHONE: version/major version/minor version/patch changelog/render
MAKE = make

# These are the locations of the directories we'll use
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
[org.clojure/clojure "1.12.0"]
[org.clojure/clojurescript "1.11.132" :scope "provided"]]
:plugins [[com.github.clj-kondo/lein-clj-kondo "2024.09.27"]
[com.wallbrew/bouncer "1.0.0"]
[com.wallbrew/lein-sealog "1.7.0"]
[com.wallbrew/bouncer "1.1.1"]
[com.wallbrew/lein-sealog "1.8.0"]
[lein-cljsbuild/lein-cljsbuild "1.1.8"]
[mvxcvi/cljstyle "0.16.630"]]
:profiles {:uberjar {:aot :all}
Expand Down
2 changes: 1 addition & 1 deletion src/common_beer_data/hops/bittering.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

(def magnum-us
"Excellent bittering profile and a nice, hoppy, floral aroma and subtle characters of citrus.
Genetically indistinguishable from the German variety"
(hops/build-hop :magnum-us
{cbf/beta 0.06
Expand Down
2 changes: 1 addition & 1 deletion src/common_beer_data/hops/both.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

(def el-dorado
"Flavors of tropical fruit, pineapple, mango.
Aromas of pear, watermelon, stone fruit and candy."
(hops/build-hop :el-dorado
{cbf/beta 0.08
Expand Down
9 changes: 4 additions & 5 deletions test/common_beer_data/core_test.cljc
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
(ns common-beer-data.core-test
(:require [clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.core :as data]
[common-beer-format.fermentables :as fermentables]
[common-beer-format.hops :as hops]
[common-beer-format.styles :as styles]
[common-beer-format.yeasts :as yeasts]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing]])))
[common-beer-format.yeasts :as yeasts]))


(defn note-ends-with-period?
"Check if the notes attribute ends with a period.
If not, print a message and return false."
[data]
(let [notes (get data :notes)
(let [notes (get data :notes)
ends-with-period? (str/ends-with? notes ".")]
(if ends-with-period?
true
Expand Down
3 changes: 1 addition & 2 deletions test/common_beer_data/fermentables/adjuncts_test.cljc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(ns common-beer-data.fermentables.adjuncts-test
(:require #? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing]])
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.fermentables.adjuncts :as adjuncts]
[common-beer-format.fermentables :as fermentables]))
Expand Down
3 changes: 1 addition & 2 deletions test/common_beer_data/fermentables/dry_extracts_test.cljc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(ns common-beer-data.fermentables.dry-extracts-test
(:require #? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing]])
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.fermentables.dry-extracts :as dry-extracts]
[common-beer-format.fermentables :as fermentables]))
Expand Down
3 changes: 1 addition & 2 deletions test/common_beer_data/fermentables/extracts_test.cljc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(ns common-beer-data.fermentables.extracts-test
(:require #? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing]])
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.fermentables.extracts :as extracts]
[common-beer-format.fermentables :as fermentables]))
Expand Down
3 changes: 1 addition & 2 deletions test/common_beer_data/fermentables/grains_test.cljc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(ns common-beer-data.fermentables.grains-test
(:require #? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing]])
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.fermentables.grains :as grains]
[common-beer-format.fermentables :as fermentables]))
Expand Down
3 changes: 1 addition & 2 deletions test/common_beer_data/fermentables/sugars_test.cljc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(ns common-beer-data.fermentables.sugars-test
(:require #? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing]])
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.fermentables.sugars :as sugars]
[common-beer-format.fermentables :as fermentables]))
Expand Down
36 changes: 36 additions & 0 deletions test/common_beer_data/hops/aroma_test.cljc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
(ns common-beer-data.hops.aroma-test
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.hops.aroma :as aroma]
[common-beer-format.hops :as hops]))


(deftest validity-test
(testing "Ensure static hop definitions are valid"
(is (spoon.spec/test-valid? ::hops/hop aroma/ahtanum))
(is (spoon.spec/test-valid? ::hops/hop aroma/amarillo))
(is (spoon.spec/test-valid? ::hops/hop aroma/cascade))
(is (spoon.spec/test-valid? ::hops/hop aroma/centennial))
(is (spoon.spec/test-valid? ::hops/hop aroma/crystal))
(is (spoon.spec/test-valid? ::hops/hop aroma/delta))
(is (spoon.spec/test-valid? ::hops/hop aroma/east-kent-golding))
(is (spoon.spec/test-valid? ::hops/hop aroma/fuggle-us))
(is (spoon.spec/test-valid? ::hops/hop aroma/glacier))
(is (spoon.spec/test-valid? ::hops/hop aroma/golding-us))
(is (spoon.spec/test-valid? ::hops/hop aroma/hallertau-us))
(is (spoon.spec/test-valid? ::hops/hop aroma/liberty))
(is (spoon.spec/test-valid? ::hops/hop aroma/mosaic))
(is (spoon.spec/test-valid? ::hops/hop aroma/mt-hood))
(is (spoon.spec/test-valid? ::hops/hop aroma/palisade))
(is (spoon.spec/test-valid? ::hops/hop aroma/saaz-us))
(is (spoon.spec/test-valid? ::hops/hop aroma/santiam))
(is (spoon.spec/test-valid? ::hops/hop aroma/simcoe))
(is (spoon.spec/test-valid? ::hops/hop aroma/spalt))
(is (spoon.spec/test-valid? ::hops/hop aroma/sterling))
(is (spoon.spec/test-valid? ::hops/hop aroma/strisselspalt))
(is (spoon.spec/test-valid? ::hops/hop aroma/ultra))
(is (spoon.spec/test-valid? ::hops/hop aroma/vanguard))
(is (spoon.spec/test-valid? ::hops/hop aroma/willamette)))
(testing "Ensure hop group is valid"
(is (every? #(spoon.spec/test-valid? ::hops/hop %) (vals aroma/aroma)))
(is (every? keyword? (keys aroma/aroma)))))
30 changes: 30 additions & 0 deletions test/common_beer_data/hops/bittering_test.cljc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
(ns common-beer-data.hops.bittering-test
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.hops.bittering :as bittering]
[common-beer-format.hops :as hops]))


(deftest validity-test
(testing "Ensure static hop definitions are valid"
(is (spoon.spec/test-valid? ::hops/hop bittering/summit))
(is (spoon.spec/test-valid? ::hops/hop bittering/chelan))
(is (spoon.spec/test-valid? ::hops/hop bittering/cluster))
(is (spoon.spec/test-valid? ::hops/hop bittering/eroica))
(is (spoon.spec/test-valid? ::hops/hop bittering/tillicum))
(is (spoon.spec/test-valid? ::hops/hop bittering/brewers-gold-us))
(is (spoon.spec/test-valid? ::hops/hop bittering/nugget))
(is (spoon.spec/test-valid? ::hops/hop bittering/bravo))
(is (spoon.spec/test-valid? ::hops/hop bittering/magnum-us))
(is (spoon.spec/test-valid? ::hops/hop bittering/apollo))
(is (spoon.spec/test-valid? ::hops/hop bittering/ctz))
(is (spoon.spec/test-valid? ::hops/hop bittering/super-galena))
(is (spoon.spec/test-valid? ::hops/hop bittering/warrior))
(is (spoon.spec/test-valid? ::hops/hop bittering/chinook))
(is (spoon.spec/test-valid? ::hops/hop bittering/millennium))
(is (spoon.spec/test-valid? ::hops/hop bittering/newport))
(is (spoon.spec/test-valid? ::hops/hop bittering/galena))
(is (spoon.spec/test-valid? ::hops/hop bittering/bullion)))
(testing "Ensure hop group is valid"
(is (every? #(spoon.spec/test-valid? ::hops/hop %) (vals bittering/bittering)))
(is (every? keyword? (keys bittering/bittering)))))
24 changes: 24 additions & 0 deletions test/common_beer_data/hops/both_test.cljc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(ns common-beer-data.hops.both-test
(:require [clojure.test :refer [deftest is testing]]
[com.wallbrew.spoon.spec :as spoon.spec]
[common-beer-data.hops.both :as both]
[common-beer-format.hops :as hops]))


(deftest validity-test
(testing "Ensure static hop definitions are valid"
(is (spoon.spec/test-valid? ::hops/hop both/el-dorado))
(is (spoon.spec/test-valid? ::hops/hop both/celeia))
(is (spoon.spec/test-valid? ::hops/hop both/perle-us))
(is (spoon.spec/test-valid? ::hops/hop both/northdown))
(is (spoon.spec/test-valid? ::hops/hop both/horizon))
(is (spoon.spec/test-valid? ::hops/hop both/columbus))
(is (spoon.spec/test-valid? ::hops/hop both/northern-brewer))
(is (spoon.spec/test-valid? ::hops/hop both/challenger))
(is (spoon.spec/test-valid? ::hops/hop both/citra))
(is (spoon.spec/test-valid? ::hops/hop both/tettnanger))
(is (spoon.spec/test-valid? ::hops/hop both/galaxy))
(is (spoon.spec/test-valid? ::hops/hop both/topaz)))
(testing "Ensure hop group is valid"
(is (every? #(spoon.spec/test-valid? ::hops/hop %) (vals both/both)))
(is (every? keyword? (keys both/both)))))
8 changes: 7 additions & 1 deletion test/common_beer_data/runner.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
[common-beer-data.fermentables.extracts-test]
[common-beer-data.fermentables.grains-test]
[common-beer-data.fermentables.sugars-test]
[common-beer-data.hops.aroma-test]
[common-beer-data.hops.bittering-test]
[common-beer-data.hops.both-test]
[doo.runner :refer-macros [doo-tests]]))


Expand All @@ -15,4 +18,7 @@
'common-beer-data.fermentables.dry-extracts-test
'common-beer-data.fermentables.extracts-test
'common-beer-data.fermentables.grains-test
'common-beer-data.fermentables.sugars-test)
'common-beer-data.fermentables.sugars-test
'common-beer-data.hops.aroma-test
'common-beer-data.hops.bittering-test
'common-beer-data.hops.both-test)

0 comments on commit 5afeba2

Please sign in to comment.