You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Seeded reports/cost.md.jinja fails on the seeded Easy Pancakes recipe #851
Text quantities fail.@sea salt{pinch} and @butter{knob} have text quantities, so | float fails.
Missing price data fails. With numeric quantities only (@eggs{2}, @butter{10%g}), the report still fails, because db/butter doesn't exist: Error: Invalid number:. The seeded db/ has prices for only eggs, flour, milk, olive oil and sea salt, so any recipe that uses another ingredient aborts.
Units aren't converted.price_per_unit is per g or ml, but the template multiplies it by the raw value whatever the unit. @sea salt{1%tbsp} is costed as 1 g.
The docs example can't find the recipe. The example in docs/report.md, cook report -t reports/cost.md.jinja "Easy Pancakes:2" -d ./db …, fails with Recipe not found: Easy Pancakes, because the recipe is in Breakfast/.
Expected
The seeded template runs on every seeded recipe. Ingredients without a price or a numeric quantity are skipped or flagged in the output instead of aborting the report. The docs example should also use a path that exists.
The fix probably needs a default on the db() lookup and a check like ingredient.quantity.value is number, or a numeric-style filter. Unit conversion can come later, but the template should at least say what it assumes.
Activity