diff --git a/lib/ProductOpener/Packaging.pm b/lib/ProductOpener/Packaging.pm index 7a3b6494f2e7d..b540f221afcce 100644 --- a/lib/ProductOpener/Packaging.pm +++ b/lib/ProductOpener/Packaging.pm @@ -685,6 +685,14 @@ sub set_packaging_misc_tags ($product_ref) { remove_tag($product_ref, "misc", "en:packagings-empty"); remove_tag($product_ref, "misc", "en:packagings-not-empty"); remove_tag($product_ref, "misc", "en:packagings-not-empty-but-not-complete"); + remove_tag($product_ref, "misc", "en:packagings-with-weights"); + remove_tag($product_ref, "misc", "en:packagings-complete-with-weights"); + remove_tag($product_ref, "misc", "en:packagings-not-complete-with-weights"); + remove_tag($product_ref, "misc", "en:packagings-with-some-weights"); + + # Number of packaging components + my $number_of_packaging_components + = (defined $product_ref->{packagings} ? scalar @{$product_ref->{packagings}} : 0); if ($product_ref->{packagings_complete}) { add_tag($product_ref, "misc", "en:packagings-complete"); @@ -693,7 +701,7 @@ sub set_packaging_misc_tags ($product_ref) { else { add_tag($product_ref, "misc", "en:packagings-not-complete"); - if (scalar @{$product_ref->{packagings}} == 0) { + if ($number_of_packaging_components == 0) { add_tag($product_ref, "misc", "en:packagings-empty"); } else { @@ -702,6 +710,28 @@ sub set_packaging_misc_tags ($product_ref) { } } + # Check if we have weights for all components + if ($number_of_packaging_components > 0) { + my $components_with_weights = 0; + foreach my $packaging_ref (@{$product_ref->{packagings}}) { + if ((defined $packaging_ref->{weight_specified}) or (defined $packaging_ref->{weight_measured})) { + $components_with_weights++; + } + } + if ($components_with_weights == $number_of_packaging_components) { + add_tag($product_ref, "misc", "en:packagings-with-weights"); + if ($product_ref->{packagings_complete}) { + add_tag($product_ref, "misc", "en:packagings-complete-with-weights"); + } + else { + add_tag($product_ref, "misc", "en:packagings-not-complete-with-weights"); + } + } + elsif ($components_with_weights > 0) { + add_tag($product_ref, "misc", "en:packagings-with-some-weights"); + } + } + return; } diff --git a/tests/integration/api_v3_product_write.t b/tests/integration/api_v3_product_write.t index 331fa759b80c0..9871558f36b88 100644 --- a/tests/integration/api_v3_product_write.t +++ b/tests/integration/api_v3_product_write.t @@ -138,7 +138,7 @@ my $tests_ref = [ method => 'PATCH', path => '/api/v3/product/1234567890008', body => '{ - "fields": "updated", + "fields": "updated,misc_tags", "tags_lc": "en", "product": { "packagings_add": [ @@ -389,6 +389,7 @@ my $tests_ref = [ path => '/api/v3/product/1234567890013', body => '{ "tags_lc": "en", + "fields": "updated,misc_tags", "product": { "packagings": [ { diff --git a/tests/integration/expected_test_results/api_v3_product_write/patch-packagings-quantity-and-weight.json b/tests/integration/expected_test_results/api_v3_product_write/patch-packagings-quantity-and-weight.json index 12298d91075ef..d1a828b01583c 100644 --- a/tests/integration/expected_test_results/api_v3_product_write/patch-packagings-quantity-and-weight.json +++ b/tests/integration/expected_test_results/api_v3_product_write/patch-packagings-quantity-and-weight.json @@ -2,6 +2,27 @@ "code" : "1234567890008", "errors" : [], "product" : { + "misc_tags" : [ + "en:nutriscore-not-computed", + "en:nutriscore-missing-category", + "en:nutrition-not-enough-data-to-compute-nutrition-score", + "en:nutriscore-missing-nutrition-data", + "en:nutriscore-missing-nutrition-data-energy", + "en:nutriscore-missing-nutrition-data-fat", + "en:nutriscore-missing-nutrition-data-saturated-fat", + "en:nutriscore-missing-nutrition-data-sugars", + "en:nutriscore-missing-nutrition-data-sodium", + "en:nutriscore-missing-nutrition-data-proteins", + "en:nutrition-no-fiber", + "en:packagings-not-complete", + "en:packagings-not-empty-but-not-complete", + "en:packagings-not-empty", + "en:packagings-with-weights", + "en:packagings-not-complete-with-weights", + "en:ecoscore-extended-data-not-computed", + "en:ecoscore-not-computed", + "en:main-countries-new-product" + ], "packagings" : [ { "material" : { diff --git a/tests/integration/expected_test_results/api_v3_product_write/patch-weight-as-number-or-string.json b/tests/integration/expected_test_results/api_v3_product_write/patch-weight-as-number-or-string.json index 06c48655ca011..6a1c4199c37a7 100644 --- a/tests/integration/expected_test_results/api_v3_product_write/patch-weight-as-number-or-string.json +++ b/tests/integration/expected_test_results/api_v3_product_write/patch-weight-as-number-or-string.json @@ -2,6 +2,27 @@ "code" : "1234567890013", "errors" : [], "product" : { + "misc_tags" : [ + "en:nutriscore-not-computed", + "en:nutriscore-missing-category", + "en:nutrition-not-enough-data-to-compute-nutrition-score", + "en:nutriscore-missing-nutrition-data", + "en:nutriscore-missing-nutrition-data-energy", + "en:nutriscore-missing-nutrition-data-fat", + "en:nutriscore-missing-nutrition-data-saturated-fat", + "en:nutriscore-missing-nutrition-data-sugars", + "en:nutriscore-missing-nutrition-data-sodium", + "en:nutriscore-missing-nutrition-data-proteins", + "en:nutrition-no-fiber", + "en:packagings-not-complete", + "en:packagings-not-empty-but-not-complete", + "en:packagings-not-empty", + "en:packagings-with-weights", + "en:packagings-not-complete-with-weights", + "en:ecoscore-extended-data-not-computed", + "en:ecoscore-not-computed", + "en:main-countries-new-product" + ], "packagings" : [ { "number_of_units" : 1, diff --git a/tests/integration/expected_test_results/search_v1/search-no-filter.json b/tests/integration/expected_test_results/search_v1/search-no-filter.json index 49494fc71b584..8c21f9db00838 100644 --- a/tests/integration/expected_test_results/search_v1/search-no-filter.json +++ b/tests/integration/expected_test_results/search_v1/search-no-filter.json @@ -1,6 +1,6 @@ { "count" : 5, - "page" : 1, + "page" : "1", "page_count" : 5, "page_size" : 24, "products" : [ @@ -61,7 +61,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -320,21 +320,21 @@ }, { "ecoscore_material_score" : 76, - "ecoscore_shape_ratio" : 0.2, + "ecoscore_shape_ratio" : "0.2", "material" : "en:steel", "number_of_units" : 1, "shape" : "en:lid" }, { "ecoscore_material_score" : 0, - "ecoscore_shape_ratio" : 0.1, + "ecoscore_shape_ratio" : "0.1", "material" : "en:plastic", "non_recyclable_and_non_biodegradable" : "maybe", "number_of_units" : 1, "shape" : "en:film" } ], - "score" : 66.2, + "score" : "66.2", "value" : -3 }, "production_system" : { @@ -369,23 +369,23 @@ "entry_dates_tags" : "--ignore--", "food_groups_tags" : [], "forest_footprint_data" : { - "footprint_per_kg" : 0.0074375, + "footprint_per_kg" : "0.0074375", "grade" : "a", "ingredients" : [ { "conditions_tags" : [], - "footprint_per_kg" : 0.0074375, + "footprint_per_kg" : "0.0074375", "matching_tag_id" : "en:egg", - "percent" : 9.375, - "percent_estimate" : 9.375, + "percent" : "9.375", + "percent_estimate" : "9.375", "processing_factor" : 1, "tag_id" : "en:egg", "tag_type" : "ingredients", "type" : { - "deforestation_risk" : 0.68, + "deforestation_risk" : "0.68", "name" : "Oeufs Importés", - "soy_feed_factor" : 0.035, - "soy_yield" : 0.3 + "soy_feed_factor" : "0.035", + "soy_yield" : "0.3" } } ] @@ -399,7 +399,7 @@ "ingredients" : [ { "id" : "en:apple", - "percent_estimate" : 62.5, + "percent_estimate" : "62.5", "percent_max" : 100, "percent_min" : 25, "rank" : 1, @@ -409,7 +409,7 @@ }, { "id" : "en:milk", - "percent_estimate" : 18.75, + "percent_estimate" : "18.75", "percent_max" : 50, "percent_min" : 0, "rank" : 2, @@ -419,8 +419,8 @@ }, { "id" : "en:egg", - "percent_estimate" : 9.375, - "percent_max" : 33.3333333333333, + "percent_estimate" : "9.375", + "percent_max" : "33.3333333333333", "percent_min" : 0, "rank" : 3, "text" : "eggs", @@ -430,7 +430,7 @@ { "from_palm_oil" : "yes", "id" : "en:palm-oil", - "percent_estimate" : 9.375, + "percent_estimate" : "9.375", "percent_max" : 25, "percent_min" : 0, "rank" : 4, @@ -710,7 +710,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -1251,7 +1251,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -1533,23 +1533,23 @@ "entry_dates_tags" : "--ignore--", "food_groups_tags" : [], "forest_footprint_data" : { - "footprint_per_kg" : 0.0132222222222222, + "footprint_per_kg" : "0.0132222222222222", "grade" : "a", "ingredients" : [ { "conditions_tags" : [], - "footprint_per_kg" : 0.0132222222222222, + "footprint_per_kg" : "0.0132222222222222", "matching_tag_id" : "en:egg", - "percent" : 16.6666666666667, - "percent_estimate" : 16.6666666666667, + "percent" : "16.6666666666667", + "percent_estimate" : "16.6666666666667", "processing_factor" : 1, "tag_id" : "en:egg", "tag_type" : "ingredients", "type" : { - "deforestation_risk" : 0.68, + "deforestation_risk" : "0.68", "name" : "Oeufs Importés", - "soy_feed_factor" : 0.035, - "soy_yield" : 0.3 + "soy_feed_factor" : "0.035", + "soy_yield" : "0.3" } } ] @@ -1563,9 +1563,9 @@ "ingredients" : [ { "id" : "en:apple", - "percent_estimate" : 66.6666666666667, + "percent_estimate" : "66.6666666666667", "percent_max" : 100, - "percent_min" : 33.3333333333333, + "percent_min" : "33.3333333333333", "rank" : 1, "text" : "apple", "vegan" : "yes", @@ -1573,7 +1573,7 @@ }, { "id" : "en:milk", - "percent_estimate" : 16.6666666666667, + "percent_estimate" : "16.6666666666667", "percent_max" : 50, "percent_min" : 0, "rank" : 2, @@ -1583,8 +1583,8 @@ }, { "id" : "en:egg", - "percent_estimate" : 16.6666666666667, - "percent_max" : 33.3333333333333, + "percent_estimate" : "16.6666666666667", + "percent_max" : "33.3333333333333", "percent_min" : 0, "rank" : 3, "text" : "eggs", @@ -1696,8 +1696,8 @@ "nutrient_levels" : {}, "nutrient_levels_tags" : [], "nutriments" : { - "fruits-vegetables-nuts-estimate-from-ingredients_100g" : 33.3333333333333, - "fruits-vegetables-nuts-estimate-from-ingredients_serving" : 33.3333333333333, + "fruits-vegetables-nuts-estimate-from-ingredients_100g" : "33.3333333333333", + "fruits-vegetables-nuts-estimate-from-ingredients_serving" : "33.3333333333333", "nova-group" : 1, "nova-group_100g" : 1, "nova-group_serving" : 1 @@ -1827,7 +1827,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -2121,15 +2121,15 @@ "ingredients" : [ { "id" : "es:apple", - "percent_estimate" : 66.6666666666667, + "percent_estimate" : "66.6666666666667", "percent_max" : 100, - "percent_min" : 33.3333333333333, + "percent_min" : "33.3333333333333", "rank" : 1, "text" : "apple" }, { "id" : "es:water", - "percent_estimate" : 16.6666666666667, + "percent_estimate" : "16.6666666666667", "percent_max" : 50, "percent_min" : 0, "rank" : 2, @@ -2137,8 +2137,8 @@ }, { "id" : "es:palm-oil", - "percent_estimate" : 16.6666666666667, - "percent_max" : 33.3333333333333, + "percent_estimate" : "16.6666666666667", + "percent_max" : "33.3333333333333", "percent_min" : 0, "rank" : 3, "text" : "palm oil" @@ -2396,7 +2396,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -2660,22 +2660,22 @@ }, "agribalyse" : { "agribalyse_proxy_food_code" : "32135", - "co2_agriculture" : 2.2396004, + "co2_agriculture" : "2.2396004", "co2_consumption" : 0, - "co2_distribution" : 0.019530673, - "co2_packaging" : 0.28159592, - "co2_processing" : 0.77051126, - "co2_total" : 3.564111983, - "co2_transportation" : 0.25287373, + "co2_distribution" : "0.019530673", + "co2_packaging" : "0.28159592", + "co2_processing" : "0.77051126", + "co2_total" : "3.564111983", + "co2_transportation" : "0.25287373", "code" : "32135", "dqr" : "4.03", - "ef_agriculture" : 0.50064279, + "ef_agriculture" : "0.50064279", "ef_consumption" : 0, - "ef_distribution" : 0.0048315303, - "ef_packaging" : 0.023715692, - "ef_processing" : 0.078716079, - "ef_total" : 0.6323498093, - "ef_transportation" : 0.024443718, + "ef_distribution" : "0.0048315303", + "ef_packaging" : "0.023715692", + "ef_processing" : "0.078716079", + "ef_total" : "0.6323498093", + "ef_transportation" : "0.024443718", "is_beverage" : 0, "name_en" : "Breakfast cereals, mix of puffed or extruded cereals, fortified with vitamins and chemical elements", "name_fr" : "Multi-céréales soufflées ou extrudées, enrichies en vitamines et minéraux", diff --git a/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json b/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json index bc1e89e3e5c2e..48f7e51b9509f 100644 --- a/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json +++ b/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json @@ -1,6 +1,6 @@ { "count" : 1, - "page" : 1, + "page" : "1", "page_count" : 1, "page_size" : 24, "products" : [ @@ -74,7 +74,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -338,22 +338,22 @@ }, "agribalyse" : { "agribalyse_proxy_food_code" : "32135", - "co2_agriculture" : 2.2396004, + "co2_agriculture" : "2.2396004", "co2_consumption" : 0, - "co2_distribution" : 0.019530673, - "co2_packaging" : 0.28159592, - "co2_processing" : 0.77051126, - "co2_total" : 3.564111983, - "co2_transportation" : 0.25287373, + "co2_distribution" : "0.019530673", + "co2_packaging" : "0.28159592", + "co2_processing" : "0.77051126", + "co2_total" : "3.564111983", + "co2_transportation" : "0.25287373", "code" : "32135", "dqr" : "4.03", - "ef_agriculture" : 0.50064279, + "ef_agriculture" : "0.50064279", "ef_consumption" : 0, - "ef_distribution" : 0.0048315303, - "ef_packaging" : 0.023715692, - "ef_processing" : 0.078716079, - "ef_total" : 0.6323498093, - "ef_transportation" : 0.024443718, + "ef_distribution" : "0.0048315303", + "ef_packaging" : "0.023715692", + "ef_processing" : "0.078716079", + "ef_total" : "0.6323498093", + "ef_transportation" : "0.024443718", "is_beverage" : 0, "name_en" : "Breakfast cereals, mix of puffed or extruded cereals, fortified with vitamins and chemical elements", "name_fr" : "Multi-céréales soufflées ou extrudées, enrichies en vitamines et minéraux", diff --git a/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json b/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json index 49494fc71b584..8c21f9db00838 100644 --- a/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json +++ b/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json @@ -1,6 +1,6 @@ { "count" : 5, - "page" : 1, + "page" : "1", "page_count" : 5, "page_size" : 24, "products" : [ @@ -61,7 +61,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -320,21 +320,21 @@ }, { "ecoscore_material_score" : 76, - "ecoscore_shape_ratio" : 0.2, + "ecoscore_shape_ratio" : "0.2", "material" : "en:steel", "number_of_units" : 1, "shape" : "en:lid" }, { "ecoscore_material_score" : 0, - "ecoscore_shape_ratio" : 0.1, + "ecoscore_shape_ratio" : "0.1", "material" : "en:plastic", "non_recyclable_and_non_biodegradable" : "maybe", "number_of_units" : 1, "shape" : "en:film" } ], - "score" : 66.2, + "score" : "66.2", "value" : -3 }, "production_system" : { @@ -369,23 +369,23 @@ "entry_dates_tags" : "--ignore--", "food_groups_tags" : [], "forest_footprint_data" : { - "footprint_per_kg" : 0.0074375, + "footprint_per_kg" : "0.0074375", "grade" : "a", "ingredients" : [ { "conditions_tags" : [], - "footprint_per_kg" : 0.0074375, + "footprint_per_kg" : "0.0074375", "matching_tag_id" : "en:egg", - "percent" : 9.375, - "percent_estimate" : 9.375, + "percent" : "9.375", + "percent_estimate" : "9.375", "processing_factor" : 1, "tag_id" : "en:egg", "tag_type" : "ingredients", "type" : { - "deforestation_risk" : 0.68, + "deforestation_risk" : "0.68", "name" : "Oeufs Importés", - "soy_feed_factor" : 0.035, - "soy_yield" : 0.3 + "soy_feed_factor" : "0.035", + "soy_yield" : "0.3" } } ] @@ -399,7 +399,7 @@ "ingredients" : [ { "id" : "en:apple", - "percent_estimate" : 62.5, + "percent_estimate" : "62.5", "percent_max" : 100, "percent_min" : 25, "rank" : 1, @@ -409,7 +409,7 @@ }, { "id" : "en:milk", - "percent_estimate" : 18.75, + "percent_estimate" : "18.75", "percent_max" : 50, "percent_min" : 0, "rank" : 2, @@ -419,8 +419,8 @@ }, { "id" : "en:egg", - "percent_estimate" : 9.375, - "percent_max" : 33.3333333333333, + "percent_estimate" : "9.375", + "percent_max" : "33.3333333333333", "percent_min" : 0, "rank" : 3, "text" : "eggs", @@ -430,7 +430,7 @@ { "from_palm_oil" : "yes", "id" : "en:palm-oil", - "percent_estimate" : 9.375, + "percent_estimate" : "9.375", "percent_max" : 25, "percent_min" : 0, "rank" : 4, @@ -710,7 +710,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -1251,7 +1251,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -1533,23 +1533,23 @@ "entry_dates_tags" : "--ignore--", "food_groups_tags" : [], "forest_footprint_data" : { - "footprint_per_kg" : 0.0132222222222222, + "footprint_per_kg" : "0.0132222222222222", "grade" : "a", "ingredients" : [ { "conditions_tags" : [], - "footprint_per_kg" : 0.0132222222222222, + "footprint_per_kg" : "0.0132222222222222", "matching_tag_id" : "en:egg", - "percent" : 16.6666666666667, - "percent_estimate" : 16.6666666666667, + "percent" : "16.6666666666667", + "percent_estimate" : "16.6666666666667", "processing_factor" : 1, "tag_id" : "en:egg", "tag_type" : "ingredients", "type" : { - "deforestation_risk" : 0.68, + "deforestation_risk" : "0.68", "name" : "Oeufs Importés", - "soy_feed_factor" : 0.035, - "soy_yield" : 0.3 + "soy_feed_factor" : "0.035", + "soy_yield" : "0.3" } } ] @@ -1563,9 +1563,9 @@ "ingredients" : [ { "id" : "en:apple", - "percent_estimate" : 66.6666666666667, + "percent_estimate" : "66.6666666666667", "percent_max" : 100, - "percent_min" : 33.3333333333333, + "percent_min" : "33.3333333333333", "rank" : 1, "text" : "apple", "vegan" : "yes", @@ -1573,7 +1573,7 @@ }, { "id" : "en:milk", - "percent_estimate" : 16.6666666666667, + "percent_estimate" : "16.6666666666667", "percent_max" : 50, "percent_min" : 0, "rank" : 2, @@ -1583,8 +1583,8 @@ }, { "id" : "en:egg", - "percent_estimate" : 16.6666666666667, - "percent_max" : 33.3333333333333, + "percent_estimate" : "16.6666666666667", + "percent_max" : "33.3333333333333", "percent_min" : 0, "rank" : 3, "text" : "eggs", @@ -1696,8 +1696,8 @@ "nutrient_levels" : {}, "nutrient_levels_tags" : [], "nutriments" : { - "fruits-vegetables-nuts-estimate-from-ingredients_100g" : 33.3333333333333, - "fruits-vegetables-nuts-estimate-from-ingredients_serving" : 33.3333333333333, + "fruits-vegetables-nuts-estimate-from-ingredients_100g" : "33.3333333333333", + "fruits-vegetables-nuts-estimate-from-ingredients_serving" : "33.3333333333333", "nova-group" : 1, "nova-group_100g" : 1, "nova-group_serving" : 1 @@ -1827,7 +1827,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -2121,15 +2121,15 @@ "ingredients" : [ { "id" : "es:apple", - "percent_estimate" : 66.6666666666667, + "percent_estimate" : "66.6666666666667", "percent_max" : 100, - "percent_min" : 33.3333333333333, + "percent_min" : "33.3333333333333", "rank" : 1, "text" : "apple" }, { "id" : "es:water", - "percent_estimate" : 16.6666666666667, + "percent_estimate" : "16.6666666666667", "percent_max" : 50, "percent_min" : 0, "rank" : 2, @@ -2137,8 +2137,8 @@ }, { "id" : "es:palm-oil", - "percent_estimate" : 16.6666666666667, - "percent_max" : 33.3333333333333, + "percent_estimate" : "16.6666666666667", + "percent_max" : "33.3333333333333", "percent_min" : 0, "rank" : 3, "text" : "palm oil" @@ -2396,7 +2396,7 @@ "2xxxxxxxxxxx" ], "complete" : 0, - "completeness" : 0.5, + "completeness" : "0.5", "correctors_tags" : [], "created_t" : "--ignore--", "creator" : "tests", @@ -2660,22 +2660,22 @@ }, "agribalyse" : { "agribalyse_proxy_food_code" : "32135", - "co2_agriculture" : 2.2396004, + "co2_agriculture" : "2.2396004", "co2_consumption" : 0, - "co2_distribution" : 0.019530673, - "co2_packaging" : 0.28159592, - "co2_processing" : 0.77051126, - "co2_total" : 3.564111983, - "co2_transportation" : 0.25287373, + "co2_distribution" : "0.019530673", + "co2_packaging" : "0.28159592", + "co2_processing" : "0.77051126", + "co2_total" : "3.564111983", + "co2_transportation" : "0.25287373", "code" : "32135", "dqr" : "4.03", - "ef_agriculture" : 0.50064279, + "ef_agriculture" : "0.50064279", "ef_consumption" : 0, - "ef_distribution" : 0.0048315303, - "ef_packaging" : 0.023715692, - "ef_processing" : 0.078716079, - "ef_total" : 0.6323498093, - "ef_transportation" : 0.024443718, + "ef_distribution" : "0.0048315303", + "ef_packaging" : "0.023715692", + "ef_processing" : "0.078716079", + "ef_total" : "0.6323498093", + "ef_transportation" : "0.024443718", "is_beverage" : 0, "name_en" : "Breakfast cereals, mix of puffed or extruded cereals, fortified with vitamins and chemical elements", "name_fr" : "Multi-céréales soufflées ou extrudées, enrichies en vitamines et minéraux",