Skip to content

Commit

Permalink
[Format] Auto-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nnichols authored and github-actions[bot] committed Mar 3, 2024
1 parent e2f5a92 commit fcc545b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/brewtility/enrich/impl.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
"The key to source data from in `enrich-displayable-*` functions"
:value-key)


(def low-value-key
"The key to source data from in `enrich-displayable-*` functions for the lower end of the range"
:low-value-key)


(def high-value-key
"The key to source data from in `enrich-displayable-*` functions for the higher end of the range"
:high-value-key)
Expand Down Expand Up @@ -394,12 +396,12 @@
precision (or fine-grain-precision precision)
suffix (or fine-grain-suffix suffix)
opts (parse-enrich-displayable-units-opts
measurement-type
{:target-units target-units
:source-units source-units
options/system-of-measure system-of-measure
options/precision precision
options/suffix suffix})
measurement-type
{:target-units target-units
:source-units source-units
options/system-of-measure system-of-measure
options/precision precision
options/suffix suffix})
converted-low-value (units/convert measurement-type low-source-value source-units target-units {options/precision precision})
displayable-high-value (->displayable-units measurement-type high-source-value source-units target-units opts)
displayable-range (str converted-low-value " - " displayable-high-value)]
Expand Down
4 changes: 3 additions & 1 deletion src/brewtility/predicates/equipment.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
In the BeerXML spec, this behavior is implicitly falsey.
Therefore, if the :calc-boil-volume field is not present, this function will explicitly return false."
{:added "1.5"}
([equipment] (calculated-boil-volume? equipment {})) ; Added to match the arity of the other predicate functions
([equipment] (calculated-boil-volume? equipment {}))
; Added to match the arity of the other predicate functions

([equipment _opts]
(if (contains? equipment :calc-boil-volume)
(:calc-boil-volume equipment)
Expand Down
1 change: 1 addition & 0 deletions test/brewtility/enrich/impl_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@
sut/value-key :value
sut/fine-grain-target-units options/pound})))))))


(deftest enrich-displayable-range-test
(testing "Validate displayable range enrichment."
(testing "If neither value is provided, return the original map."
Expand Down

0 comments on commit fcc545b

Please sign in to comment.