gram/conformance/cases/warn-027-invalid-unit-cooklang-separator/analyzed.json

277 lines
5.5 KiB
JSON

{
"meta": {},
"registry": {
"ingredients": {
"flour": {
"id": "flour",
"name": "flour",
"default_unit": "%g"
},
"milk": {
"id": "milk",
"name": "milk",
"default_unit": "% cup"
}
},
"cookware": {}
},
"shopping_list": [
{
"id": "flour",
"name": "flour",
"_usageIds": [
"1"
],
"qty": 200,
"unit": "%g"
},
{
"id": "milk",
"name": "milk",
"_usageIds": [
"2"
],
"qty": 0.5,
"unit": "% cup"
}
],
"cookware": [],
"sections": [
{
"title": "Prep",
"ingredients": [
{
"id": "flour",
"_usageId": "1",
"qty": 200,
"unit": "%g"
},
{
"id": "milk",
"_usageId": "2",
"qty": {
"type": "fraction",
"value": 0.5,
"numerator": 1,
"denominator": 2,
"text": "1/2"
},
"unit": "% cup"
}
],
"cookware": [],
"steps": [
{
"type": "step",
"content": [
"Mix ",
{
"id": "flour",
"_usageId": "1",
"qty": 200,
"unit": "%g"
},
"with ",
{
"id": "milk",
"_usageId": "2",
"qty": {
"type": "fraction",
"value": 0.5,
"numerator": 1,
"denominator": 2,
"text": "1/2"
},
"unit": "% cup"
},
"."
],
"timings": {
"start": 0,
"end": 2,
"activeDuration": 2
}
}
],
"metrics": {
"totalMass": 0,
"massStatus": "incomplete",
"missingMassIngredients": [
"flour",
"milk"
]
}
}
],
"warnings": [
{
"code": "INVALID_UNIT",
"message": "Unit \"%g\" of \"flour\" starts with \"%\", Cooklang's separator: Gram writes a space between the number and the unit (e.g. {200 g} rather than {200%g}).",
"item": "flour",
"loc": {
"start": 13,
"end": 26
},
"data": {
"reason": "cooklangSeparator",
"suggestion": "g"
}
},
{
"code": "INVALID_UNIT",
"message": "Unit \"% cup\" of \"milk\" starts with \"%\", Cooklang's separator: Gram writes a space between the number and the unit (e.g. {200 g} rather than {200%g}).",
"item": "milk",
"loc": {
"start": 32,
"end": 48
},
"data": {
"reason": "cooklangSeparator",
"suggestion": "cup"
}
},
{
"code": "UNKNOWN_MASS",
"message": "Cannot calculate mass for \"flour\" — omitted from nutritional totals."
},
{
"code": "UNKNOWN_MASS",
"message": "Cannot calculate mass for \"milk\" — omitted from nutritional totals."
}
],
"metrics": {
"totalTime": 4,
"totalBreakdown": [
{
"label": "section_active:Prep",
"duration": 2
}
],
"idleTime": 0,
"activeTime": 2,
"activeBreakdown": [
{
"label": "section_active:Prep",
"duration": 2
}
],
"preparationTime": 2,
"prepBreakdown": [
{
"label": "ingredients_overhead",
"duration": 2
}
],
"totalMass": 0,
"massStatus": "incomplete",
"missingMassIngredients": [
"flour",
"milk"
],
"nutrition": {
"total": {
"calories": 0,
"fat": 0,
"carbs": 0,
"protein": 0
},
"isEstimate": false,
"coverage": 0,
"warnings": [
{
"code": "UNKNOWN_MASS",
"message": "Cannot calculate mass for \"flour\" — omitted from nutritional totals."
},
{
"code": "UNKNOWN_MASS",
"message": "Cannot calculate mass for \"milk\" — omitted from nutritional totals."
}
]
}
},
"miseEnPlace": [
{
"section": 0,
"duration": 2,
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 2,
"duration": 2
}
]
}
],
"tasks": {
"tasks": [
{
"id": "s0.prep",
"kind": "prep",
"section": 0,
"duration": {
"nominal": 2
},
"items": [
{
"kind": "gather",
"target": "ingredient",
"count": 2,
"duration": 2
}
],
"after": []
},
{
"id": "s0.0",
"kind": "step",
"section": 0,
"step": 0,
"duration": {
"nominal": 2
},
"after": []
}
],
"sections": [
{
"day": 0
}
]
},
"schedule": {
"miseEnPlace": "perSection",
"rests": "shortest",
"totalTime": 4,
"activeTime": 2,
"preparationTime": 2,
"idleTime": 0,
"blocks": [
{
"kind": "prep",
"task": "s0.prep",
"section": 0,
"start": 0,
"end": 2
},
{
"kind": "step",
"task": "s0.0",
"section": 0,
"step": 0,
"start": 2,
"end": 4
}
],
"days": [
{
"day": 0,
"start": 0,
"end": 4,
"sections": [
0
]
}
]
}
}