[Racket] Ferti hydroponic nutrient solver, redux.
Miscellaneous clean-up.
Changed files
db/migrations.rkt
@@ -104,7 +104,6 @@
104
104
#:constraints (primary-key id)
105
105
(unique measurement_date))))
106
106
107
Removed:
108
107
;;;;;;;;
109
108
;; CROPS
110
109
;;;;;;;;
models/fertilizer-product.rkt
@@ -216,13 +216,10 @@
216
216
(test-case "Get product by id"
217
217
(define fp (get-fertilizer-product #:canonical-name canonical-product-name))
218
218
(define fp-by-id (get-fertilizer-product #:id (fertilizer-product-id fp)))
219
Removed:
220
219
(check-equal? fp fp-by-id))
221
220
222
221
(test-case "Handle missing nutrient in product"
223
Removed:
(define nitrogen (get-nutrient #:name "Nitrogen"))
224
222
(define potassium (get-nutrient #:name "Potassium"))
225
Removed:
226
223
(define fp (get-fertilizer-product #:canonical-name canonical-product-name))
227
224
(check-false (get-fertilizer-product-value fp potassium)))
228
225
services/nnls.rkt
@@ -302,7 +302,7 @@
302
302
(create-crop-requirement! "Test requirement 2" (hash n 150 p 30 k 200)))
303
303
(create-crop-rotation! test-date (hash test-crop-requirement 100))
304
304
305
Removed:
;; Fertilizers with different NPK ratios
305
Added:
;; Available fertilizer products
306
306
(create-fertilizer-product! "" "Balanced" (hash n 100 p 100 k 100))
307
307
(create-fertilizer-product! "Nitrogen blend" "High-N" (hash n 200 p 50 k 50))
308
308
(create-fertilizer-product! "Phosphorus blend" "High-P" (hash n 50 p 200 k 50))