From 96d31df70a4914b240c66a73d35f436f63093af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Gigandet?= Date: Fri, 4 Mar 2022 14:33:59 +0100 Subject: [PATCH] feat: Refactor CSV exports, add tests, export Eco-Score fields (#6444) * new misc facet values for Eco-Score missing packaging warning * more ecoscore missing data facets * update tests * refactor on demand csv/xlsx export on website - wip * export off derived fields * export Eco-Score data * prefix off computed fields by off:, add _tags fields * fix filehandle * add tests for CSV exports #6424 * Update labeler.yml * start mongodb * update tests * remove condition on hardcoded domain name * feat: add missing_key_data flag to ecoscore * export more ecoscore fields * fix tests * Update lib/ProductOpener/Export.pm Co-authored-by: Alex Garel * Update t/export.t Co-authored-by: Alex Garel * suggestions from code review * create Test.pm module * create Test.pm module Co-authored-by: Pierre Slamich Co-authored-by: Alex Garel --- .github/labeler.yml | 1 + .github/workflows/pull_request.yml | 5 + cpanfile | 1 + lib/ProductOpener/Config_off.pm | 32 +- lib/ProductOpener/Display.pm | 346 ++---------------- lib/ProductOpener/Ecoscore.pm | 3 + lib/ProductOpener/Export.pm | 166 +++++++-- lib/ProductOpener/Import.pm | 4 +- lib/ProductOpener/Test.pm | 178 +++++++++ .../en-ecoscore-score-at-20-threshold.json | 1 + .../attributes/en-maybe-vegan.json | 1 + .../attributes/en-nutriscore.json | 1 + .../attributes/fr-palm-kernel-fat.json | 1 + .../attributes/fr-palm-oil-free.json | 1 + .../attributes/fr-palm-oil.json | 1 + .../attributes/fr-vegetable-oils.json | 1 + .../ecoscore/empty-product.json | 1 + .../ecoscore/fr-oeufs-de-france.json | 1 + .../ecoscore/fr-viande-porcine-francaise.json | 1 + .../ecoscore/ingredient-palm-oil-rspo.json | 1 + .../ecoscore/ingredient-palm-oil.json | 1 + .../ecoscore/known-category-butters.json | 1 + .../ecoscore/known-category-margarines.json | 1 + .../ecoscore/label-ab-hve-msc-asc.json | 1 + .../ecoscore/label-ab-hve.json | 1 + .../ecoscore/label-msc-asc.json | 1 + .../ecoscore/label-organic.json | 1 + .../ecoscore/lamb-leg.json | 1 + ...ingredients-in-origins-field-multiple.json | 1 + ...igins-of-ingredients-in-origins-field.json | 1 + .../origins-of-ingredients-nested-2.json | 1 + .../origins-of-ingredients-nested.json | 1 + .../origins-of-ingredients-not-specified.json | 1 + ...igins-of-ingredients-partly-specified.json | 1 + ...ins-of-ingredients-specified-multiple.json | 1 + .../origins-of-ingredients-specified.json | 1 + ...origins-of-ingredients-unknown-origin.json | 1 + ...ins-of-ingredients-unspecified-origin.json | 1 + .../packaging-unspecified-no-a-eco-score.json | 1 + .../ecoscore/packaging-unspecified.json | 1 + .../ecoscore/unknown-category.json | 1 + .../export/25000044984.json | 113 ++++++ t/expected_test_results/export/26281742.json | 113 ++++++ t/expected_test_results/export/27096765.json | 113 ++++++ t/expected_test_results/export/29161690.json | 113 ++++++ .../export/3173990027337.json | 113 ++++++ .../export/3250392332105.json | 113 ++++++ .../export/3256220513173.json | 113 ++++++ .../export/3259330020135.json | 113 ++++++ .../export/3270160503070.json | 113 ++++++ .../export/3451790834080.json | 113 ++++++ .../export/3564703999971.json | 113 ++++++ .../export/3661344653573.json | 113 ++++++ .../export/3760178254021.json | 113 ++++++ .../export/3770013801303.json | 113 ++++++ .../export/5050083706622.json | 113 ++++++ .../export/5410803950689.json | 113 ++++++ .../export/5601009974337.json | 113 ++++++ .../export/71464240608.json | 113 ++++++ t/expected_test_results/export/77000001.json | 113 ++++++ .../export/7804659650035.json | 113 ++++++ t/expected_test_results/export/80650904.json | 113 ++++++ .../export/8712423020221.json | 113 ++++++ .../export/8722700472575.json | 113 ++++++ .../export/9002355004345.json | 113 ++++++ .../export_more_fields/25000044984.json | 134 +++++++ .../export_more_fields/26281742.json | 134 +++++++ .../export_more_fields/27096765.json | 134 +++++++ .../export_more_fields/29161690.json | 134 +++++++ .../export_more_fields/3173990027337.json | 134 +++++++ .../export_more_fields/3250392332105.json | 134 +++++++ .../export_more_fields/3256220513173.json | 134 +++++++ .../export_more_fields/3259330020135.json | 134 +++++++ .../export_more_fields/3270160503070.json | 134 +++++++ .../export_more_fields/3451790834080.json | 134 +++++++ .../export_more_fields/3564703999971.json | 134 +++++++ .../export_more_fields/3661344653573.json | 134 +++++++ .../export_more_fields/3760178254021.json | 134 +++++++ .../export_more_fields/3770013801303.json | 134 +++++++ .../export_more_fields/5050083706622.json | 134 +++++++ .../export_more_fields/5410803950689.json | 134 +++++++ .../export_more_fields/5601009974337.json | 134 +++++++ .../export_more_fields/71464240608.json | 134 +++++++ .../export_more_fields/77000001.json | 134 +++++++ .../export_more_fields/7804659650035.json | 134 +++++++ .../export_more_fields/80650904.json | 134 +++++++ .../export_more_fields/8712423020221.json | 134 +++++++ .../export_more_fields/8722700472575.json | 134 +++++++ .../export_more_fields/9002355004345.json | 134 +++++++ .../ingredients/fi-do-not-match-myanmar.json | 8 +- .../ingredients/fr-epices-irradiees.json | 6 +- ...rgherita-pizzas.fr-margherita-pizza-1.json | 4 +- t/export.t | 109 ++++++ t/inputs/export/products.csv | 29 ++ t/update_tests_results.sh | 13 + 95 files changed, 6505 insertions(+), 360 deletions(-) create mode 100644 lib/ProductOpener/Test.pm create mode 100644 t/expected_test_results/export/25000044984.json create mode 100644 t/expected_test_results/export/26281742.json create mode 100644 t/expected_test_results/export/27096765.json create mode 100644 t/expected_test_results/export/29161690.json create mode 100644 t/expected_test_results/export/3173990027337.json create mode 100644 t/expected_test_results/export/3250392332105.json create mode 100644 t/expected_test_results/export/3256220513173.json create mode 100644 t/expected_test_results/export/3259330020135.json create mode 100644 t/expected_test_results/export/3270160503070.json create mode 100644 t/expected_test_results/export/3451790834080.json create mode 100644 t/expected_test_results/export/3564703999971.json create mode 100644 t/expected_test_results/export/3661344653573.json create mode 100644 t/expected_test_results/export/3760178254021.json create mode 100644 t/expected_test_results/export/3770013801303.json create mode 100644 t/expected_test_results/export/5050083706622.json create mode 100644 t/expected_test_results/export/5410803950689.json create mode 100644 t/expected_test_results/export/5601009974337.json create mode 100644 t/expected_test_results/export/71464240608.json create mode 100644 t/expected_test_results/export/77000001.json create mode 100644 t/expected_test_results/export/7804659650035.json create mode 100644 t/expected_test_results/export/80650904.json create mode 100644 t/expected_test_results/export/8712423020221.json create mode 100644 t/expected_test_results/export/8722700472575.json create mode 100644 t/expected_test_results/export/9002355004345.json create mode 100644 t/expected_test_results/export_more_fields/25000044984.json create mode 100644 t/expected_test_results/export_more_fields/26281742.json create mode 100644 t/expected_test_results/export_more_fields/27096765.json create mode 100644 t/expected_test_results/export_more_fields/29161690.json create mode 100644 t/expected_test_results/export_more_fields/3173990027337.json create mode 100644 t/expected_test_results/export_more_fields/3250392332105.json create mode 100644 t/expected_test_results/export_more_fields/3256220513173.json create mode 100644 t/expected_test_results/export_more_fields/3259330020135.json create mode 100644 t/expected_test_results/export_more_fields/3270160503070.json create mode 100644 t/expected_test_results/export_more_fields/3451790834080.json create mode 100644 t/expected_test_results/export_more_fields/3564703999971.json create mode 100644 t/expected_test_results/export_more_fields/3661344653573.json create mode 100644 t/expected_test_results/export_more_fields/3760178254021.json create mode 100644 t/expected_test_results/export_more_fields/3770013801303.json create mode 100644 t/expected_test_results/export_more_fields/5050083706622.json create mode 100644 t/expected_test_results/export_more_fields/5410803950689.json create mode 100644 t/expected_test_results/export_more_fields/5601009974337.json create mode 100644 t/expected_test_results/export_more_fields/71464240608.json create mode 100644 t/expected_test_results/export_more_fields/77000001.json create mode 100644 t/expected_test_results/export_more_fields/7804659650035.json create mode 100644 t/expected_test_results/export_more_fields/80650904.json create mode 100644 t/expected_test_results/export_more_fields/8712423020221.json create mode 100644 t/expected_test_results/export_more_fields/8722700472575.json create mode 100644 t/expected_test_results/export_more_fields/9002355004345.json create mode 100644 t/export.t create mode 100644 t/inputs/export/products.csv create mode 100755 t/update_tests_results.sh diff --git a/.github/labeler.yml b/.github/labeler.yml index be391fef494f9..b56038fa620a7 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -89,6 +89,7 @@ ecoscore: Export: - lib/ProductOpener/Export.pm +- t/expected_test_results/export/**/* Food.pm: - lib/ProductOpener/Food.pm diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 1e853d995a738..cb0d45ff35264 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -42,6 +42,11 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '12.x' + + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.7.0 + with: + mongodb-version: 4.4 - run: npm install diff --git a/cpanfile b/cpanfile index 501b7601ab453..44c71e2943060 100644 --- a/cpanfile +++ b/cpanfile @@ -54,6 +54,7 @@ requires 'Modern::Perl', '>= 1.20200211'; # libmodern-perl-perl has 1.20170117/1 requires 'Data::Dumper::AutoEncode'; # deps: libmodule-build-pluggable-perl, libclass-accessor-lite-perl requires 'XML::Rules'; requires 'Text::CSV', '>= 2.01, < 3.0'; # libtext-csv-perl has 1.95/1.99 vs 2.00. +requires 'Text::CSV_XS'; requires 'Text::Fuzzy'; requires 'Spreadsheet::CSV'; # deps: libspreadsheet-parseexcel-perl requires 'File::chmod::Recursive'; # deps: libfile-chmod-perl diff --git a/lib/ProductOpener/Config_off.pm b/lib/ProductOpener/Config_off.pm index 64bffe03064aa..22a42b18ca6b3 100644 --- a/lib/ProductOpener/Config_off.pm +++ b/lib/ProductOpener/Config_off.pm @@ -646,10 +646,6 @@ $options{categories_exempted_from_nutrient_levels} = [qw( no_nutriments additives_n additives - ingredients_from_palm_oil_n - ingredients_from_palm_oil - ingredients_that_may_be_from_palm_oil_n - ingredients_that_may_be_from_palm_oil nutriscore_score nutriscore_grade nova_group @@ -658,11 +654,14 @@ $options{categories_exempted_from_nutrient_levels} = [qw( food_groups states brand_owner - ecoscore_score_fr - ecoscore_grade_fr + ecoscore_score + ecoscore_grade + ecoscore_data.agribalyse.code + ecoscore_data.adjustments.packaging.value ); - +# List of fields that can be imported on the producers platform +# and that are also exported from the producers platform to the public platform $options{import_export_fields_groups} = [ [ "identification", [ "code", "producer_product_id", @@ -710,6 +709,25 @@ $options{import_export_fields_groups} = [ ], ]; +# Secondary fields that are computed by OFF from primary data +# Those fields are only exported, they are not imported. +$options{off_export_fields_groups} = [ + [ "off", + [ + "nutriscore_grade", + "nutriscore_score", + "ecoscore_grade", + "ecoscore_score", + "ecoscore_data.agribalyse.code", + "ecoscore_data.adjustments.origins_of_ingredients.value", + "ecoscore_data.adjustments.packaging.value", + "ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials", + "ecoscore_data.adjustments.production_system.value", + "ecoscore_data.adjustments.threatened_species.value", + ] + ], +]; + # Used to generate the list of possible product attributes, which is # used to display the possible choices for user preferences $options{attribute_groups} = [ diff --git a/lib/ProductOpener/Display.pm b/lib/ProductOpener/Display.pm index 8fe704a7bb840..707b0ed73830a 100644 --- a/lib/ProductOpener/Display.pm +++ b/lib/ProductOpener/Display.pm @@ -160,6 +160,7 @@ use ProductOpener::Orgs qw(:all); use ProductOpener::Web qw(:all); use ProductOpener::Recipes qw(:all); use ProductOpener::PackagerCodes qw(:all); +use ProductOpener::Export qw(:all); use Cache::Memcached::Fast; use Encode; @@ -5497,7 +5498,7 @@ sub search_and_export_products($$$) { my $sort_by = shift; my $format = "csv"; - if (defined $request_ref->{format}) { + if ((defined $request_ref->{format}) and ($request_ref->{format} eq "xlsx")) { $format = $request_ref->{format}; } @@ -5507,17 +5508,34 @@ sub search_and_export_products($$$) { $log->debug("search_and_export_products - MongoDB query", { format => $format, query => $query_ref }) if $log->is_debug(); - my $count; + my $max_count = $export_limit; - eval { - $log->debug("Counting MongoDB documents for query", { query => $query_ref }) if $log->is_debug(); - $count = execute_query(sub { - return get_products_collection()->count_documents($query_ref); - }); - $log->info("MongoDB count query ok", { error => $@, count => $count }) if $log->is_info(); + # Allow admins to change the export limit + if (($admin) and (defined param("export_limit"))) { + $max_count = param("export_limit"); + } + my $args_ref = { + cc => $cc, # used to localize Eco-Score fields + format => $format, + filehandle => \*STDOUT, + filename => "openfoodfacts_export." . $format, + send_http_headers => 1, + query => $query_ref, + max_count => $max_count, + export_computed_fields => 1, + export_canonicalized_tags_fields => 1, }; + # Extra parameters + foreach my $parameter (qw(fields extra_fields separator)) { + if (defined $request_ref->{$parameter}) { + $args_ref->{$parameter} = $request_ref->{$parameter}; + } + } + + my $count = export_csv($args_ref); + my $html = ''; if ((not defined $count) or ($count < 0)) { @@ -5526,10 +5544,15 @@ sub search_and_export_products($$$) { elsif ($count == 0) { $html .= "

" . lang("no_products") . "

"; } - - if ((not defined $request_ref->{batch}) and ($count > $export_limit)) { + elsif ($count > $max_count) { $html .= "

" . sprintf(lang("error_too_many_products_to_export"), $count, $export_limit) . "

"; } + else { + # export_csv has already output HTTP headers and the export file, we can return + return; + } + + # Display an error message if (defined $request_ref->{current_link_query}) { $request_ref->{current_link_query_display} = $request_ref->{current_link_query}; @@ -5537,306 +5560,9 @@ sub search_and_export_products($$$) { $html .= "→ {current_link_query_display}&action=display\">" . lang("search_edit") . "
"; } - if ((not defined $request_ref->{batch}) and (($count <= 0) or ($count > $export_limit))) { - # $request_ref->{content_html} = $html; - $request_ref->{title} = lang("search_results"); - $request_ref->{content_ref} = \$html; - display_page($request_ref); - return; - } - else { - - # Count is greater than 0 - - my $cursor; - - eval { - $cursor = execute_query(sub { - # disabling sort for CSV export, as we get memory errors - # MongoDB::DatabaseError: Runner error: Overflow sort stage buffered data usage of 33572508 bytes exceeds internal limit of 33554432 bytes - # return get_products_collection()->query($query_ref)->sort($sort_ref); - return get_products_collection()->query($query_ref); - }); - }; - if ($@) { - $log->warn("MongoDB error", { error => $@ }) if $log->is_warn(); - } - else { - $log->info("MongoDB query ok", { error => $@ }) if $log->is_info(); - } - - $cursor->immortal(1); - - $request_ref->{count} = $count; - - # Send the CSV file line by line - - my $workbook; - my $worksheet; - - my $csv; - - my $categories_nutriments_ref = $categories_nutriments_per_country{$cc}; - - # Output header - - my %tags_fields = (packaging => 1, brands => 1, categories => 1, labels => 1, origins => 1, manufacturing_places => 1, emb_codes=>1, cities=>1, allergens => 1, traces => 1, additives => 1, ingredients_from_palm_oil => 1, ingredients_that_may_be_from_palm_oil => 1); - - my @row = (); - - my @fields_to_export = @export_fields; - if (defined $request_ref->{fields}) { - @fields_to_export = @{$request_ref->{fields}}; - } - - foreach my $field (@fields_to_export) { - - # skip additives field and put only additives_tags - if ($field ne 'additives') { - push @row, $field; - } - - if ($field eq 'code') { - push @row, "url"; - } - - if (defined $tags_fields{$field}) { - push @row, $field . '_tags'; - } - - } - - # Do not add images and nutrients if the fields to export are specified - if (not defined $request_ref->{fields}) { - - push @row, "main_category"; - push @row, "image_url"; - push @row, "image_small_url"; - push @row, "image_front_url"; - push @row, "image_front_small_url"; - push @row, "image_ingredients_url"; - push @row, "image_ingredients_small_url"; - push @row, "image_nutrition_url"; - push @row, "image_nutrition_small_url"; - - foreach (@{$nutriments_tables{$nutriment_table}}) { - - my $nid = $_; # Copy instead of alias - - $nid =~/^#/ and next; - - $nid =~ s/!//g; - $nid =~ s/^-//g; - $nid =~ s/-$//g; - - push @row, "${nid}_100g"; - } - } - - if (defined $request_ref->{extra_fields}) { - foreach my $field (@{$request_ref->{extra_fields}}) { - push @row, $field; - } - } - - if ($format eq "xlsx") { - - # Send HTTP headers, unless search_and_export_products() is called from a script - if (not defined $request_ref->{skip_http_headers}) { - require Apache2::RequestRec; - my $r = Apache2::RequestUtil->request(); - $r->headers_out->set("Content-type" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); - $r->headers_out->set("Content-disposition" => "attachment;filename=openfoodfacts_search.xlsx"); - print "Content-Type: text/csv; charset=UTF-8\r\n\r\n"; - } - binmode( STDOUT ); - - $workbook = Excel::Writer::XLSX->new( \*STDOUT ); - $worksheet = $workbook->add_worksheet(); - my $format = $workbook->add_format(); - $format->set_bold(); - $worksheet->write_row( 0, 0, \@row, $format); - - # Set the width of the columns - for (my $i = 0; $i <= $#row; $i++) { - my $width = length($row[$i]); - ($width < 20) and $width = 20; - $worksheet->set_column( $i , $i, $width ); - } - } - else { - # Send HTTP headers, unless search_and_export_products() is called from a script - if (not defined $request_ref->{skip_http_headers}) { - require Apache2::RequestRec; - my $r = Apache2::RequestUtil->request(); - $r->headers_out->set("Content-type" => "text/csv; charset=UTF-8"); - $r->headers_out->set("Content-disposition" => "attachment;filename=openfoodfacts_search.csv"); - print "Content-Type: text/csv; charset=UTF-8\r\n\r\n"; - } - binmode(STDOUT, ":encoding(UTF-8)"); - - my $separator = ","; - if (defined $request_ref->{separator}) { - $separator = $request_ref->{separator}; - } - - $csv = Text::CSV->new ({ - eol => "\n", - sep => $separator, - quote_space => 0, - binary => 1 - }); - - $csv->print (*STDOUT, \@row); - } - - my $uri = format_subdomain($subdomain); - - my $j = 0; # Row number - - while (my $product_ref = $cursor->next) { - - $j++; - - @row = (); - - # Normal fields - - foreach my $field (@export_fields) { - - # skip additives field and put only additives_tags - if ($field ne 'additives') { - my $value = $product_ref->{$field}; - if (defined $value) { - $value =~ s/(\r|\n|\t)/ /g; - push @row, $value; - } - else { - push @row, ''; - } - } - - if ($field eq 'code') { - - push @row, $uri . product_url($product_ref->{code}); - - } - - if (defined $tags_fields{$field}) { - if (defined $product_ref->{$field . '_tags'}) { - push @row, join(',', @{$product_ref->{$field . '_tags'}}); - } - else { - push @row, ''; - } - } - } - - # Do not add images and nutrients if the fields to export are specified - if (not defined $request_ref->{fields}) { - - # "main" category: lowest level category - - my $main_cid = ''; - my $main_cid_lc = ''; - - if ((defined $product_ref->{categories_tags}) and (scalar @{$product_ref->{categories_tags}} > 0)) { - - $main_cid = $product_ref->{categories_tags}[(scalar @{$product_ref->{categories_tags}}) - 1]; - - $main_cid_lc = display_taxonomy_tag($lc, 'categories', $main_cid); - } - - push @row, $main_cid; - - $product_ref->{main_category} = $main_cid; - - add_images_urls_to_product($product_ref); - - # image_url = image_front_url - foreach my $id ('front', 'front','ingredients','nutrition') { - push @row, $product_ref->{"image_" . $id . "_url"}; - push @row, $product_ref->{"image_" . $id . "_small_url"}; - } - - # Nutriments - - foreach (@{$nutriments_tables{$nutriment_table}}) { - - my $nid = $_; # Copy instead of alias - - $nid =~/^#/ and next; - - $nid =~ s/!//g; - $nid =~ s/^-//g; - $nid =~ s/-$//g; - if (defined $product_ref->{nutriments}{"${nid}_100g"}) { - my $value = $product_ref->{nutriments}{"${nid}_100g"}; - push @row, $value; - } - else { - push @row, ''; - } - } - } - - # Extra fields - - my $scans_ref; - - if (defined $request_ref->{extra_fields}) { - foreach my $field (@{$request_ref->{extra_fields}}) { - - my $value; - - # Scans must be loaded separately - if ($field =~ /^scans_(\d\d\d\d)_(.*)_(\w+)$/) { - - my ($scan_year, $scan_field, $scan_cc) = ($1, $2, $3); - - if (not defined $scans_ref) { - # Load the scan data - my $product_path = product_path($product_ref); - $scans_ref = retrieve_json("$data_root/products/$product_path/scans.json"); - } - if (not defined $scans_ref) { - $scans_ref = {}; - } - if ((defined $scans_ref->{$scan_year}) and (defined $scans_ref->{$scan_year}{$scan_field}) - and (defined $scans_ref->{$scan_year}{$scan_field}{$scan_cc})) { - $value = $scans_ref->{$scan_year}{$scan_field}{$scan_cc}; - } - else { - $value = ""; - } - } - elsif (($field =~ /_tags$/) and (defined $product_ref->{$field})) { - $value = join(",", @{$product_ref->{$field}}); - } - else { - $value = $product_ref->{$field}; - } - - if (defined $value) { - $value =~ s/(\r|\n|\t)/ /g; - push @row, $value; - } - else { - push @row, ''; - } - } - } - - if ($format eq "xlsx") { - $worksheet->write_row( $j, 0, \@row); - } - else { - $csv->print (*STDOUT, \@row); - } - } - } - - return; + $request_ref->{title} = lang("search_results"); + $request_ref->{content_ref} = \$html; + display_page($request_ref); } diff --git a/lib/ProductOpener/Ecoscore.pm b/lib/ProductOpener/Ecoscore.pm index 0fa814c85e6bb..59516daf3b5a0 100644 --- a/lib/ProductOpener/Ecoscore.pm +++ b/lib/ProductOpener/Ecoscore.pm @@ -1296,6 +1296,9 @@ sub compute_ecoscore_packaging_adjustment($) { value => -15, non_recyclable_and_non_biodegradable_materials => 1, }; + # indicate that we are missing key data + # this is to indicate to 3rd party that the computed Eco-Score should not be displayed without warnings + $product_ref->{ecoscore_data}{missing_key_data} = 1; $warning = "packaging_data_missing"; } else { diff --git a/lib/ProductOpener/Export.pm b/lib/ProductOpener/Export.pm index b4e5f79186ccb..51995a8471916 100644 --- a/lib/ProductOpener/Export.pm +++ b/lib/ProductOpener/Export.pm @@ -101,8 +101,12 @@ use ProductOpener::Display qw/:all/; use ProductOpener::Food qw/:all/; use ProductOpener::Data qw/:all/; use ProductOpener::Products qw/:all/; +use ProductOpener::Ecoscore qw/localize_ecoscore/; use Text::CSV; +use Excel::Writer::XLSX; +use Data::DeepAccess qw(deep_get deep_exists); + =head1 FUNCTIONS @@ -158,6 +162,12 @@ for front, ingredients and nutrition in all languages. This option is used in particular for exporting from the producers platform and importing to the public database. +=head4 Return value + +Count of the exported documents. + +Note: if the max_count parameter is passed + =cut sub export_csv($) { @@ -165,10 +175,16 @@ sub export_csv($) { my $args_ref = shift; my $filehandle = $args_ref->{filehandle}; + my $filename = $args_ref->{filename}; + my $send_http_headers = $args_ref->{send_http_headers}; # Used for downloads of CSV / Excel results on the OFF website + my $format = $args_ref->{format} || "csv"; my $separator = $args_ref->{separator} || "\t"; my $query_ref = $args_ref->{query}; my $fields_ref = $args_ref->{fields}; my $extra_fields_ref = $args_ref->{extra_fields}; + my $export_computed_fields = $args_ref->{export_computed_fields}; # Fields like the Nutri-Score score computed by OFF + my $export_canonicalized_tags_fields = $args_ref->{export_canonicalized_tags_fields}; # e.g. include "categories_tags" and not only "categories" + my $export_cc = $args_ref->{cc} || "world"; # used to localize Eco-Score fields $log->debug("export_csv - start", { args_ref=>$args_ref }) if $log->is_debug(); @@ -196,11 +212,16 @@ sub export_csv($) { # Possible fields to export are listed in $options{import_export_fields_groups} - my $fields_groups_ref = $options{import_export_fields_groups}; + my @fields_groups = @{$options{import_export_fields_groups}}; + + # Add fields computed by OFF if requested + if (($export_computed_fields) and (defined $options{off_export_fields_groups})) { + push @fields_groups, @{$options{off_export_fields_groups}}; + } my $group_number = 0; - foreach my $group_ref (@{$fields_groups_ref}) { + foreach my $group_ref (@fields_groups) { $group_number++; my $item_number = 0; @@ -240,6 +261,7 @@ sub export_csv($) { } $item_number++; + my $field_sort_key = sprintf("%08d", $group_number * 1000 + $item_number); $nid =~ s/^(-|!)+//g; $nid =~ s/-$//g; @@ -247,12 +269,12 @@ sub export_csv($) { # Order of the fields: sugars_value, sugars_unit, sugars_prepared_value, sugars_prepared_unit if ((defined $product_ref->{nutriments}{$nid . "_value"}) and ($product_ref->{nutriments}{$nid . "_value"} ne "")) { - $populated_fields{$nid . "_value"} = sprintf("%08d", $group_number * 1000 + $item_number) . "_1"; - $populated_fields{$nid . "_unit"} = sprintf("%08d", $group_number * 1000 + $item_number) . "_2"; + $populated_fields{$nid . "_value"} = $field_sort_key . "_1"; + $populated_fields{$nid . "_unit"} = $field_sort_key . "_2"; } if ((defined $product_ref->{nutriments}{$nid . "_prepared_value"}) and ($product_ref->{nutriments}{$nid . "_prepared_value"} ne "")) { - $populated_fields{$nid . "_prepared_value"} = sprintf("%08d", $group_number * 1000 + $item_number) . "_3"; - $populated_fields{$nid . "_prepared_unit"} = sprintf("%08d", $group_number * 1000 + $item_number) . "_4"; + $populated_fields{$nid . "_prepared_value"} = $field_sort_key . "_3"; + $populated_fields{$nid . "_prepared_unit"} = $field_sort_key . "_4"; } } } @@ -297,7 +319,14 @@ sub export_csv($) { foreach my $field (@{$group_ref->[1]}) { + # Prefix fields that are not primary data, but that are computed by OFF, with the "off:" prefix + my $group_prefix = ""; + if ($group_id eq "off") { + $group_prefix = "off:"; + } + $item_number++; + my $field_sort_key = sprintf("%08d", $group_number * 1000 + $item_number); if ($field =~ /_value_unit$/) { # Column can contain value + unit, value, or unit for a specific field @@ -306,7 +335,12 @@ sub export_csv($) { if (defined $tags_fields{$field}) { if ((defined $product_ref->{$field . "_tags"}) and (scalar @{$product_ref->{$field . "_tags"}} > 0)) { - $populated_fields{$field} = sprintf("%08d", $group_number * 1000 + $item_number); + # Export the tags field in the main language of the product + $populated_fields{$group_prefix . $field} = $field_sort_key; + # Also possibly export the canonicalized tags + if ($export_canonicalized_tags_fields ) { + $populated_fields{$group_prefix . $field . "_tags"} = $field_sort_key . "_tags"; + } } } elsif (defined $language_fields{$field}) { @@ -314,13 +348,24 @@ sub export_csv($) { foreach my $l (keys %{$product_ref->{languages_codes}}) { if ((defined $product_ref->{$field . "_$l"}) and ($product_ref->{$field . "_$l"} ne "")) { # Add language code to sort key - $populated_fields{$field . "_$l"} = sprintf("%08d", $group_number * 1000 + $item_number) . "_$l"; + $populated_fields{$group_prefix . $field . "_$l"} = $field_sort_key . "_$l"; } } } } - elsif ((defined $product_ref->{$field}) and ($product_ref->{$field} ne "")) { - $populated_fields{$field} = sprintf("%08d", $group_number * 1000 + $item_number); + else { + my $key = $field; + # Special case for ecoscore_data.adjustments.origins_of_ingredients.value + # which is only present if the Eco-Score fields have been localized (done only once after) + # we check for .values (with an s) instead + if ($field eq "ecoscore_data.adjustments.origins_of_ingredients.value") { + $key = $key . "s" + } + # Allow returning fields that are not at the root of the product structure + # e.g. ecoscore_data.agribalyse.score -> $product_ref->{ecoscore_data}{agribalyse}{score} + if (deep_exists($product_ref, split(/\./, $key))) { + $populated_fields{$group_prefix . $field} = $field_sort_key; + } } } } @@ -360,17 +405,68 @@ sub export_csv($) { # Second pass - output CSV data - my $csv = Text::CSV->new ( { binary => 1 , sep_char => $separator } ) # should set binary attribute. - or die "Cannot use CSV: ".Text::CSV->error_diag (); + # Initialize the XLSX or CSV modules, optionally send HTTP headers (if called from the website) + # and output the header row + my $csv; + my $workbook; + my $worksheet; + + if ($format eq "xlsx") { + + # Send HTTP headers, unless search_and_export_products() is called from a script + if ($send_http_headers) { + require Apache2::RequestRec; + my $r = Apache2::RequestUtil->request(); + $r->headers_out->set("Content-type" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + $r->headers_out->set("Content-disposition" => "attachment;filename=$filename"); + print "Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\r\n\r\n"; + + binmode($filehandle); + } + + $workbook = Excel::Writer::XLSX->new($filehandle); + $worksheet = $workbook->add_worksheet(); + my $workbook_format = $workbook->add_format(); + $workbook_format->set_bold(); + $worksheet->write_row( 0, 0, \@sorted_populated_fields, $workbook_format); + + # Set the width of the columns + for (my $i = 0; $i <= $#sorted_populated_fields; $i++) { + my $width = length($sorted_populated_fields[$i]); + ($width < 20) and $width = 20; + $worksheet->set_column( $i , $i, $width ); + } + } + else { - # Print the header line with fields names - $csv->print ($filehandle, \@sorted_populated_fields); - print $filehandle "\n"; + if ($send_http_headers) { + require Apache2::RequestRec; + my $r = Apache2::RequestUtil->request(); + $r->headers_out->set("Content-type" => "text/csv; charset=UTF-8"); + $r->headers_out->set("Content-disposition" => "attachment;filename=$filename"); + print "Content-Type: text/csv; charset=UTF-8\r\n\r\n"; + + binmode($filehandle, ":encoding(UTF-8)"); + } + + $csv = Text::CSV->new ({ + eol => "\n", + sep => $separator, + quote_space => 0, + binary => 1 + }) or die "Cannot use CSV: ".Text::CSV->error_diag (); + + # Print the header line with fields names + $csv->print ($filehandle, \@sorted_populated_fields); + } $cursor->reset(); + my $j = 0; # Row number + while (my $product_ref = $cursor->next) { + $j++; my @values = (); my $added_images_urls = 0; @@ -378,11 +474,23 @@ sub export_csv($) { my $scans_ref; + # If an ecoscore_* field is requested, we will localize all the Eco-Score fields once + my $ecoscore_localized = 0; + foreach my $field (@sorted_populated_fields) { my $nutriment_field = 0; my $value; + + # Remove the off: prefix for fields computed by OFF, as we don't have the prefix in the product structure + $field =~ s/^off://; + + # Localize the Eco-Score fields that depend on the country of the request + if (($field =~ /^ecoscore/) and (not $ecoscore_localized)) { + localize_ecoscore($export_cc, $product_ref); + $ecoscore_localized = 1; + } # Scans must be loaded separately if ($field =~ /^scans_(\d\d\d\d)_(.*)_(\w+)$/) { @@ -478,20 +586,8 @@ sub export_csv($) { } # Allow returning fields that are not at the root of the product structure # e.g. ecoscore_data.agribalyse.score -> $product_ref->{ecoscore_data}{agribalyse}{score} - elsif ($field =~ /^([^\.]+)\.([^\.]+)\.([^\.]+)\.([^\.]+)$/) { - if ((defined $product_ref->{$1}) and (defined $product_ref->{$1}{$2}) and (defined $product_ref->{$1}{$2}{$3})) { - $value = $product_ref->{$1}{$2}{$3}{$4}; - } - } - elsif ($field =~ /^([^\.]+)\.([^\.]+)\.([^\.]+)$/) { - if ((defined $product_ref->{$1}) and (defined $product_ref->{$1}{$2})) { - $value = $product_ref->{$1}{$2}{$3}; - } - } - elsif ($field =~ /^([^\.]+)\.([^\.]+)$/) { - if (defined $product_ref->{$1}) { - $value = $product_ref->{$1}{$2}; - } + elsif ($field =~ /\./) { + $value = deep_get($product_ref, split(/\./, $field)); } # Fields like "obsolete" : output 1 for true values or 0 elsif ($field eq "obsolete") { @@ -511,11 +607,17 @@ sub export_csv($) { push @values, $value; } - $csv->print ($filehandle, \@values); - print $filehandle "\n"; + if ($format eq "xlsx") { + $worksheet->write_row( $j, 0, \@values); + } + else { + $csv->print ($filehandle, \@values); + } + } - return; + # Return the count of products exported + return $j; } diff --git a/lib/ProductOpener/Import.pm b/lib/ProductOpener/Import.pm index 11498d5eac3c5..85984c0fe2b75 100644 --- a/lib/ProductOpener/Import.pm +++ b/lib/ProductOpener/Import.pm @@ -1655,7 +1655,7 @@ sub import_csv_file($) { # Food category rules for sweeetened/sugared beverages # French PNNS groups from categories - if ($server_domain =~ /openfoodfacts/) { + if ((defined $options{product_type}) and ($options{product_type} eq "food")) { ProductOpener::Food::special_process_product($product_ref); } @@ -2391,7 +2391,7 @@ sub import_products_categories_from_public_database($) { if ((not defined $current_field) or ($current_field ne $product_ref->{$field})) { $log->debug("import_product_categories - new categories", { categories => $product_ref->{$field} } ) if $log->is_debug(); compute_field_tags($product_ref, $product_ref->{lc}, $field); - if ($server_domain =~ /openfoodfacts/) { + if ((defined $options{product_type}) and ($options{product_type} eq "food")) { $log->debug("Food::special_process_product") if $log->is_debug(); ProductOpener::Food::special_process_product($product_ref); } diff --git a/lib/ProductOpener/Test.pm b/lib/ProductOpener/Test.pm new file mode 100644 index 0000000000000..38aef9c438eb3 --- /dev/null +++ b/lib/ProductOpener/Test.pm @@ -0,0 +1,178 @@ +# This file is part of Product Opener. +# +# Product Opener +# Copyright (C) 2011-2020 Association Open Food Facts +# Contact: contact@openfoodfacts.org +# Address: 21 rue des Iles, 94100 Saint-Maur des Fossés, France +# +# Product Opener is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +=head1 NAME + +ProductOpener::Test - utility functions used by unit and integration tests + +=head1 DESCRIPTION + +=cut + +package ProductOpener::Test; + +use utf8; +use Modern::Perl '2017'; +use Exporter qw< import >; + +BEGIN +{ + use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS); + @EXPORT_OK = qw( + + + ); # symbols to export on request + %EXPORT_TAGS = (all => [@EXPORT_OK]); +} + +use vars @EXPORT_OK ; + +use ProductOpener::Config qw/:all/; +use ProductOpener::Data qw/execute_query get_products_collection/; + +use Test::More; +use File::Path qw/make_path remove_tree/; + +use Log::Any qw($log); + + +=head2 remove_all_products () + +For integration tests, we need to start from an empty database, so that the results of the tests +are not affected by previously existing content. + +This function should only be called by tests, and never on production environments. + +=cut + +sub remove_all_products () { + # check we are not on a prod database, by checking there are not more than 100 products + my $products_count = execute_query(sub { + return get_products_collection()->count_documents({}); + }); + unless ((0 <= $products_count) && ($products_count < 1000)) { + die("Refusing to run destructive test on a DB of more than 100 items"); + } + # clean database + execute_query(sub { + return get_products_collection()->delete_many({}); + }); + # clean files + remove_tree("$data_root/products", {keep_root => 1, error => \my $err}); + if (@$err) { + die("not able to remove some products directories: ". join(":", @$err)); + } +} + +=head2 compare_csv_file_to_expected_results($csv_file, $expected_results_dir, $update_expected_results) + +Compare a CSV file containing product data (e.g. the result of a CSV export) to expected results. + +The expected results are stored as individual JSON files for each of the product, +in files named [barcode].json, with a flat key/value pairs structure corresponding to the CSV columns. + +This is so that we can easily see diffs with git diffs: +- we know how many products are affected +- we see individual diffs with the field name + +=head3 Arguments + +=head4 $csv_file - CSV file to compare + +=head4 $expected_results_dir - directory containing the individual JSON files + +=head4 $update_expected_results - flag to indicate to save test results as expected results + +Tests will pass when this flag is passed, and the new expected results can be diffed / commited in GitHub. + +=cut + +sub compare_csv_file_to_expected_results($$$) { + + my $csv_file = shift; + my $expected_results_dir = shift; + my $update_expected_results = shift; + + # Create the expected results dir + if ($update_expected_results) { + if (-e $expected_results_dir) { + remove_tree("$expected_results_dir", {error => \my $err}); + if (@$err) { + die("not able to remove some products directories: ". join(":", @$err)); + } + } + make_path($expected_results_dir); + } + + # Read the CSV file + + my $csv = Text::CSV->new ( { binary => 1 , sep_char => "\t" } ) # should set binary attribute. + or die "Cannot use CSV: ".Text::CSV->error_diag (); + + open (my $io, '<:encoding(UTF-8)', $csv_file) or die("Could not open " . $csv_file . ": $!"); + + # first line contains headers + my $columns_ref = $csv->getline ($io); + $csv->column_names (@{$columns_ref}); + + my $json = JSON->new->allow_nonref->canonical; + my %codes = (); + + while (my $product_ref = $csv->getline_hr ($io)) { + + my $code = $product_ref->{code}; + $codes{$code} = 1; + + # Update the expected results if the --update parameter was set + + if (defined $update_expected_results) { + open (my $result, ">:encoding(UTF-8)", "$expected_results_dir/$code.json") or die("Could not create $expected_results_dir/$code.json: $!\n"); + print $result $json->pretty->encode($product_ref); + close ($result); + } + + # Otherwise compare the result with the expected result + + elsif (open (my $expected_result, "<:encoding(UTF-8)", "$expected_results_dir/$code.json")) { + + local $/; #Enable 'slurp' mode + my $expected_product_ref = $json->decode(<$expected_result>); + is_deeply ($product_ref, $expected_product_ref) or diag explain $product_ref; + } + else { + diag explain $product_ref; + fail("could not load $expected_results_dir/$code.json"); + } + } + + # Check that we are not missing products + + opendir (my $dh, $expected_results_dir) or die("Could not open the $expected_results_dir directory: $!\n"); + + foreach my $file (sort(readdir($dh))) { + + if ($file =~ /(\d+)\.json$/) { + my $code = $1; + ok(exists $codes{$code}, "product code $code exists in CSV export $csv_file"); + } + } +} + +1; diff --git a/t/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json b/t/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json index 54c0c870061cb..8f8a30ec2f645 100644 --- a/t/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json +++ b/t/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json @@ -649,6 +649,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 20, "scores" : { "ad" : 20, diff --git a/t/expected_test_results/attributes/en-maybe-vegan.json b/t/expected_test_results/attributes/en-maybe-vegan.json index 38c8968fd9e7d..f4473aaebd365 100644 --- a/t/expected_test_results/attributes/en-maybe-vegan.json +++ b/t/expected_test_results/attributes/en-maybe-vegan.json @@ -574,6 +574,7 @@ "packagings" : 1 }, "missing_agribalyse_match_warning" : 1, + "missing_key_data" : 1, "status" : "unknown" }, "ecoscore_grade" : "unknown", diff --git a/t/expected_test_results/attributes/en-nutriscore.json b/t/expected_test_results/attributes/en-nutriscore.json index decae82f4c9b2..da64c62466922 100644 --- a/t/expected_test_results/attributes/en-nutriscore.json +++ b/t/expected_test_results/attributes/en-nutriscore.json @@ -664,6 +664,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 38, "scores" : { "ad" : 38, diff --git a/t/expected_test_results/attributes/fr-palm-kernel-fat.json b/t/expected_test_results/attributes/fr-palm-kernel-fat.json index e187fb45e5eda..6400109c97372 100644 --- a/t/expected_test_results/attributes/fr-palm-kernel-fat.json +++ b/t/expected_test_results/attributes/fr-palm-kernel-fat.json @@ -570,6 +570,7 @@ "packagings" : 1 }, "missing_agribalyse_match_warning" : 1, + "missing_key_data" : 1, "status" : "unknown" }, "ecoscore_grade" : "unknown", diff --git a/t/expected_test_results/attributes/fr-palm-oil-free.json b/t/expected_test_results/attributes/fr-palm-oil-free.json index d33eec8b24195..0d5c0330b6d56 100644 --- a/t/expected_test_results/attributes/fr-palm-oil-free.json +++ b/t/expected_test_results/attributes/fr-palm-oil-free.json @@ -567,6 +567,7 @@ "packagings" : 1 }, "missing_agribalyse_match_warning" : 1, + "missing_key_data" : 1, "status" : "unknown" }, "ecoscore_grade" : "unknown", diff --git a/t/expected_test_results/attributes/fr-palm-oil.json b/t/expected_test_results/attributes/fr-palm-oil.json index 3cbc16fb771e8..776145d87c568 100644 --- a/t/expected_test_results/attributes/fr-palm-oil.json +++ b/t/expected_test_results/attributes/fr-palm-oil.json @@ -570,6 +570,7 @@ "packagings" : 1 }, "missing_agribalyse_match_warning" : 1, + "missing_key_data" : 1, "status" : "unknown" }, "ecoscore_grade" : "unknown", diff --git a/t/expected_test_results/attributes/fr-vegetable-oils.json b/t/expected_test_results/attributes/fr-vegetable-oils.json index 75a76031b628e..4a820dd842623 100644 --- a/t/expected_test_results/attributes/fr-vegetable-oils.json +++ b/t/expected_test_results/attributes/fr-vegetable-oils.json @@ -567,6 +567,7 @@ "packagings" : 1 }, "missing_agribalyse_match_warning" : 1, + "missing_key_data" : 1, "status" : "unknown" }, "ecoscore_grade" : "unknown", diff --git a/t/expected_test_results/ecoscore/empty-product.json b/t/expected_test_results/ecoscore/empty-product.json index 89b30e30f0d50..2e1b9cfff17a4 100644 --- a/t/expected_test_results/ecoscore/empty-product.json +++ b/t/expected_test_results/ecoscore/empty-product.json @@ -235,6 +235,7 @@ "packagings" : 1 }, "missing_agribalyse_match_warning" : 1, + "missing_key_data" : 1, "status" : "unknown" }, "ecoscore_grade" : "unknown", diff --git a/t/expected_test_results/ecoscore/fr-oeufs-de-france.json b/t/expected_test_results/ecoscore/fr-oeufs-de-france.json index 7b2d52b028e1b..d519b3aaafab1 100644 --- a/t/expected_test_results/ecoscore/fr-oeufs-de-france.json +++ b/t/expected_test_results/ecoscore/fr-oeufs-de-france.json @@ -328,6 +328,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 55, "scores" : { "ad" : 49, diff --git a/t/expected_test_results/ecoscore/fr-viande-porcine-francaise.json b/t/expected_test_results/ecoscore/fr-viande-porcine-francaise.json index a65774613cc51..34f4160fa6c6f 100644 --- a/t/expected_test_results/ecoscore/fr-viande-porcine-francaise.json +++ b/t/expected_test_results/ecoscore/fr-viande-porcine-francaise.json @@ -329,6 +329,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 50, "scores" : { "ad" : 46, diff --git a/t/expected_test_results/ecoscore/ingredient-palm-oil-rspo.json b/t/expected_test_results/ecoscore/ingredient-palm-oil-rspo.json index 14e2f6224da16..2375d6cd79575 100644 --- a/t/expected_test_results/ecoscore/ingredient-palm-oil-rspo.json +++ b/t/expected_test_results/ecoscore/ingredient-palm-oil-rspo.json @@ -323,6 +323,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 51, "scores" : { "ad" : 51, diff --git a/t/expected_test_results/ecoscore/ingredient-palm-oil.json b/t/expected_test_results/ecoscore/ingredient-palm-oil.json index e9ab43b7384e4..b0d42b254e4c4 100644 --- a/t/expected_test_results/ecoscore/ingredient-palm-oil.json +++ b/t/expected_test_results/ecoscore/ingredient-palm-oil.json @@ -323,6 +323,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 51, "scores" : { "ad" : 51, diff --git a/t/expected_test_results/ecoscore/known-category-butters.json b/t/expected_test_results/ecoscore/known-category-butters.json index 02e43f9057c94..88c599df43579 100644 --- a/t/expected_test_results/ecoscore/known-category-butters.json +++ b/t/expected_test_results/ecoscore/known-category-butters.json @@ -323,6 +323,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 7, "scores" : { "ad" : 7, diff --git a/t/expected_test_results/ecoscore/known-category-margarines.json b/t/expected_test_results/ecoscore/known-category-margarines.json index e9ab43b7384e4..b0d42b254e4c4 100644 --- a/t/expected_test_results/ecoscore/known-category-margarines.json +++ b/t/expected_test_results/ecoscore/known-category-margarines.json @@ -323,6 +323,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 51, "scores" : { "ad" : 51, diff --git a/t/expected_test_results/ecoscore/label-ab-hve-msc-asc.json b/t/expected_test_results/ecoscore/label-ab-hve-msc-asc.json index 3e9dd22fd393f..3bcc6f9d24cf1 100644 --- a/t/expected_test_results/ecoscore/label-ab-hve-msc-asc.json +++ b/t/expected_test_results/ecoscore/label-ab-hve-msc-asc.json @@ -326,6 +326,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 27, "scores" : { "ad" : 27, diff --git a/t/expected_test_results/ecoscore/label-ab-hve.json b/t/expected_test_results/ecoscore/label-ab-hve.json index 75e230025d584..3a8109ed51add 100644 --- a/t/expected_test_results/ecoscore/label-ab-hve.json +++ b/t/expected_test_results/ecoscore/label-ab-hve.json @@ -324,6 +324,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 27, "scores" : { "ad" : 27, diff --git a/t/expected_test_results/ecoscore/label-msc-asc.json b/t/expected_test_results/ecoscore/label-msc-asc.json index c97cd07c5dd64..f27f7efb453db 100644 --- a/t/expected_test_results/ecoscore/label-msc-asc.json +++ b/t/expected_test_results/ecoscore/label-msc-asc.json @@ -324,6 +324,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 17, "scores" : { "ad" : 17, diff --git a/t/expected_test_results/ecoscore/label-organic.json b/t/expected_test_results/ecoscore/label-organic.json index 4e245e283f008..f310489b16807 100644 --- a/t/expected_test_results/ecoscore/label-organic.json +++ b/t/expected_test_results/ecoscore/label-organic.json @@ -323,6 +323,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 22, "scores" : { "ad" : 22, diff --git a/t/expected_test_results/ecoscore/lamb-leg.json b/t/expected_test_results/ecoscore/lamb-leg.json index d98f2ab290a32..f0cac43dfc435 100644 --- a/t/expected_test_results/ecoscore/lamb-leg.json +++ b/t/expected_test_results/ecoscore/lamb-leg.json @@ -318,6 +318,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 1, "scores" : { "ad" : -2, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field-multiple.json b/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field-multiple.json index 488e61fd55f52..d1fd85922fa5c 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field-multiple.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field-multiple.json @@ -327,6 +327,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 49, "scores" : { "ad" : 44, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field.json b/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field.json index c7b387125d7ba..1497c8c3e0812 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-in-origins-field.json @@ -322,6 +322,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 51, "scores" : { "ad" : 46, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-nested-2.json b/t/expected_test_results/ecoscore/origins-of-ingredients-nested-2.json index 071f6525b78c2..ff77b9c534e3e 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-nested-2.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-nested-2.json @@ -320,6 +320,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 34, "scores" : { "ad" : 34, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-nested.json b/t/expected_test_results/ecoscore/origins-of-ingredients-nested.json index 1b1e3ea5d5f99..c94ab4eeb6506 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-nested.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-nested.json @@ -320,6 +320,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 34, "scores" : { "ad" : 34, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-not-specified.json b/t/expected_test_results/ecoscore/origins-of-ingredients-not-specified.json index 25cf5e0725b94..5cf9a96b72a65 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-not-specified.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-not-specified.json @@ -320,6 +320,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 30, "scores" : { "ad" : 30, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-partly-specified.json b/t/expected_test_results/ecoscore/origins-of-ingredients-partly-specified.json index e92d22e5779f9..45b5362e67d8b 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-partly-specified.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-partly-specified.json @@ -322,6 +322,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 45, "scores" : { "ad" : 41, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-specified-multiple.json b/t/expected_test_results/ecoscore/origins-of-ingredients-specified-multiple.json index fad3853689734..355906ced5270 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-specified-multiple.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-specified-multiple.json @@ -338,6 +338,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 47, "scores" : { "ad" : 44, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-specified.json b/t/expected_test_results/ecoscore/origins-of-ingredients-specified.json index a4854b5bf6ee7..5e0e55fc72201 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-specified.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-specified.json @@ -326,6 +326,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 50, "scores" : { "ad" : 46, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-unknown-origin.json b/t/expected_test_results/ecoscore/origins-of-ingredients-unknown-origin.json index b338a0af6ecc0..160e87d101be7 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-unknown-origin.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-unknown-origin.json @@ -320,6 +320,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 34, "scores" : { "ad" : 34, diff --git a/t/expected_test_results/ecoscore/origins-of-ingredients-unspecified-origin.json b/t/expected_test_results/ecoscore/origins-of-ingredients-unspecified-origin.json index 9bca72317dd61..b9e0fbce85e6c 100644 --- a/t/expected_test_results/ecoscore/origins-of-ingredients-unspecified-origin.json +++ b/t/expected_test_results/ecoscore/origins-of-ingredients-unspecified-origin.json @@ -318,6 +318,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 34, "scores" : { "ad" : 34, diff --git a/t/expected_test_results/ecoscore/packaging-unspecified-no-a-eco-score.json b/t/expected_test_results/ecoscore/packaging-unspecified-no-a-eco-score.json index 56ca9b47b176c..e8961cbaeaf5a 100644 --- a/t/expected_test_results/ecoscore/packaging-unspecified-no-a-eco-score.json +++ b/t/expected_test_results/ecoscore/packaging-unspecified-no-a-eco-score.json @@ -319,6 +319,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 79, "scores" : { "ad" : 79, diff --git a/t/expected_test_results/ecoscore/packaging-unspecified.json b/t/expected_test_results/ecoscore/packaging-unspecified.json index 821fb5622b4e7..624a311491169 100644 --- a/t/expected_test_results/ecoscore/packaging-unspecified.json +++ b/t/expected_test_results/ecoscore/packaging-unspecified.json @@ -323,6 +323,7 @@ "packagings" : 1 }, "missing_data_warning" : 1, + "missing_key_data" : 1, "score" : 34, "scores" : { "ad" : 34, diff --git a/t/expected_test_results/ecoscore/unknown-category.json b/t/expected_test_results/ecoscore/unknown-category.json index e308466446845..c59760148f2ef 100644 --- a/t/expected_test_results/ecoscore/unknown-category.json +++ b/t/expected_test_results/ecoscore/unknown-category.json @@ -238,6 +238,7 @@ "packagings" : 1 }, "missing_agribalyse_match_warning" : 1, + "missing_key_data" : 1, "status" : "unknown" }, "ecoscore_grade" : "unknown", diff --git a/t/expected_test_results/export/25000044984.json b/t/expected_test_results/export/25000044984.json new file mode 100644 index 0000000000000..2c79ea72e165f --- /dev/null +++ b/t/expected_test_results/export/25000044984.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "The Minute Maid Company", + "brands" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "12.5", + "categories" : "Beverages, Carbonated drinks, Sodas, Lemonade, Sweetened beverages", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "25000044984", + "conservation_conditions_fr" : "", + "countries" : "France, United States", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, Databases, database-usda, App - InFood", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "50", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "50", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Contains pure filtered water, lemon juice, cane sugar, natural flavors.", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Contains pure filtered water, lemon juice, cane sugar, natural flavors.", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "en", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "Simply lemonade", + "product_name_es" : "", + "product_name_fr" : "Simply Lemonade", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0.0159", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "8 OZA (240 ml)", + "sodium_unit" : "g", + "sodium_value" : "0.00636", + "sources_fields:org-database-usda:available_date" : "2019-07-29T00:00:00Z", + "sources_fields:org-database-usda:fdc_category" : "Soda", + "sources_fields:org-database-usda:fdc_data_source" : "LI", + "sources_fields:org-database-usda:fdc_id" : "678078", + "sources_fields:org-database-usda:modified_date" : "2019-07-29T00:00:00Z", + "sources_fields:org-database-usda:publication_date" : "2019-12-06T00:00:00Z", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "11.67", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/26281742.json b/t/expected_test_results/export/26281742.json new file mode 100644 index 0000000000000..c8b336030fce5 --- /dev/null +++ b/t/expected_test_results/export/26281742.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Grandessa", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "9.9", + "categories" : "Plant-based foods and beverages, Plant-based foods, Spreads, Breakfasts, Plant-based spreads, Sweet spreads, Fruit and vegetable preserves", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "26281742", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "171", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "171", + "fat_unit" : "g", + "fat_value" : "0.1", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Made in Belgium", + "lc" : "en", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "made in belgium", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "serving", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "fr:bocal verre", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "Stawberry jam", + "product_name_es" : "", + "product_name_fr" : "Strawberry conserve", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.1", + "quantity" : "500 g", + "salt_unit" : "g", + "salt_value" : "2.54", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.1", + "serving_size" : "serving", + "sodium_unit" : "g", + "sodium_value" : "1.016", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "9.9", + "traces" : "Eggs, Milk", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/27096765.json b/t/expected_test_results/export/27096765.json new file mode 100644 index 0000000000000..8be4949fcf387 --- /dev/null +++ b/t/expected_test_results/export/27096765.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Lait, Soja", + "brand_owner" : "", + "brands" : "Château", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "52", + "categories" : "Snacks, Snacks sucrés, Cacao et dérivés, Biscuits et gâteaux, Gâteaux, Chocolats, Chocolats au lait, Gâteaux au chocolat", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "27096765", + "conservation_conditions_fr" : "", + "countries" : "Belgique, France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, App - InFood", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "563", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "563", + "fat_unit" : "g", + "fat_value" : "35", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Sugar, cocoa butter, cream powder (milk) (15.9%), cocoa paste, whole milk powder (5.5%), skim milk powder, lactose, emulsifier: lecithin (soy), vanilla extract", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Sucre, beurre de cacao, crème en poudre (lait) (15,9%), pâte de cacao, lait entier en poudre (5,5%), lait écrémé en poudre, lactose, émulsifiant : lécithine (soja), extrait de vanille", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Agriculture durable, en:UTZ Certified", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "Métal, Plastique, en:Recyclable Metals, Aluminium", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Lait crème", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "8", + "quantity" : "5 x 40 g", + "salt_unit" : "g", + "salt_value" : "0.24", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "22", + "serving_size" : "40 g", + "sodium_unit" : "g", + "sodium_value" : "0.096", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "51", + "traces" : "Fruits à coque, Arachides", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/29161690.json b/t/expected_test_results/export/29161690.json new file mode 100644 index 0000000000000..66fd5ba2eebbf --- /dev/null +++ b/t/expected_test_results/export/29161690.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "27.6", + "categories" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "29161690", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "635", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "635", + "fat_unit" : "g", + "fat_value" : "54.9", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "100 % Almond Buter", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "21", + "quantity" : "227 g", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "5.4", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "3.4", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3173990027337.json b/t/expected_test_results/export/3173990027337.json new file mode 100644 index 0000000000000..f0fa821dfe15e --- /dev/null +++ b/t/expected_test_results/export/3173990027337.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "70", + "categories" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3173990027337", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "455", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "455", + "fat_unit" : "g", + "fat_value" : "15", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Fourrés myrtilles", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "5.7", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0.43", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "1.6", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.172", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "34", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3250392332105.json b/t/expected_test_results/export/3250392332105.json new file mode 100644 index 0000000000000..929e62859d5ba --- /dev/null +++ b/t/expected_test_results/export/3250392332105.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Netto", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "4.1", + "categories" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3250392332105", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "84", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "84", + "fat_unit" : "g", + "fat_value" : "3", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Thon catalane", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "8.9", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "1.1", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.2", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.44", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "4.1", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3256220513173.json b/t/expected_test_results/export/3256220513173.json new file mode 100644 index 0000000000000..ced9deaa4ad5a --- /dev/null +++ b/t/expected_test_results/export/3256220513173.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "U", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "80", + "categories" : "Boissons, Sirops, Boissons avec sucre ajouté", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3256220513173", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "Producer - Systeme U, Producers, App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "330", + "energy-kj_unit" : "kJ", + "energy-kj_value" : "1402", + "energy_unit" : "kJ", + "energy_value" : "1402", + "fat_unit" : "g", + "fat_value" : "0.1", + "fiber_unit" : "g", + "fiber_value" : "0.5", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Sirop de Thé Pêche", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Sucre, jus de fruits à base de concentrés 40% (pêche 20%, citron), eau, arômes, acidifiant : acide citrique, colorants : lutéine et anthocyanes, stabilisant : E445.", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Point Vert, Sans conservateurs, Transformé en France", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "Métal, Bidon", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Sirop de thé pêche", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.1", + "quantity" : "75 cl", + "salt_unit" : "g", + "salt_value" : "0.01", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.1", + "serving_size" : "200 ml", + "sodium_unit" : "g", + "sodium_value" : "0.004", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Super U, Magasins U", + "sugars_unit" : "g", + "sugars_value" : "79", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3259330020135.json b/t/expected_test_results/export/3259330020135.json new file mode 100644 index 0000000000000..7a5ea7f0c03af --- /dev/null +++ b/t/expected_test_results/export/3259330020135.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "", + "carbohydrates_value" : "", + "categories" : "Plant-based foods and beverages, Plant-based foods, Legumes and their products, Meat analogues, Tofu", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3259330020135", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "", + "energy-kcal_value" : "", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "", + "energy_value" : "", + "fat_unit" : "", + "fat_value" : "", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Graines de soja sans OGM, eau, glucono delta lactone (E575) chlorure de calcium (E509), sulfate de calcium (E516)", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "en", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "Tofu en flan", + "product_name_es" : "", + "product_name_fr" : "", + "product_name_pt" : "", + "proteins_unit" : "", + "proteins_value" : "", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "", + "saturated-fat_value" : "", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "", + "sugars_value" : "", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3270160503070.json b/t/expected_test_results/export/3270160503070.json new file mode 100644 index 0000000000000..39f598b077656 --- /dev/null +++ b/t/expected_test_results/export/3270160503070.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Picard", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "7.9", + "categories" : "Aliments et boissons à base de végétaux, Aliments d'origine végétale, Condiments, Aliments à base de fruits et de légumes, Plantes condimentaires, Surgelés, Légumes et dérivés, Aliments à base de plantes surgelés, Légumes surgelés, Epicerie", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3270160503070", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - Yuka, Apps", + "emb_codes" : "EMB 62863C", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "41", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "41", + "fat_unit" : "g", + "fat_value" : "0.2", + "fiber_unit" : "g", + "fiber_value" : "1.4", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Oignons surgelés", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Oignons rouges 100%", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "France, Bénélux", + "origins" : "", + "packaging" : "Plastique, Surgelé", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Oignons rouges émincés surgelés", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "1.2", + "quantity" : "450 g", + "salt_unit" : "g", + "salt_value" : "0.01", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.1", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.004", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Picard", + "sugars_unit" : "g", + "sugars_value" : "5.6", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3451790834080.json b/t/expected_test_results/export/3451790834080.json new file mode 100644 index 0000000000000..71cd5a2397cf6 --- /dev/null +++ b/t/expected_test_results/export/3451790834080.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "Vitamin enriched milk", + "abbreviated_product_name_fr" : "", + "allergens" : "Lait", + "brand_owner" : "Savencia", + "brands" : "Elle & Vire, Savencia, Elle&Vire International", + "calcium_unit" : "mg", + "calcium_value" : "120", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "4.8", + "categories" : "Produits laitiers, Crèmes, Laits, Laits homogénéisés, Laits demi-écrémés, Laits UHT, Crèmes entières, Crèmes cuisson", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3451790834080", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, Producers, Producer - elle-vire", + "emb_codes" : "FR 80.001.002 EC, FR 50.139.001 EC", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "46", + "energy-kj_unit" : "kJ", + "energy-kj_value" : "193", + "energy_unit" : "kJ", + "energy_value" : "193", + "fat_unit" : "g", + "fat_value" : "1.55", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "Semi-skimmed milk", + "generic_name_fr" : "Lait demi-écrémé stérilisé UHT enrichi en vitamines B1, B2, B5, B12 et D - longue conservation", + "generic_name_pt" : "", + "ingredients_text_en" : "Milk", + "ingredients_text_es" : "Leche", + "ingredients_text_fr" : "_Lait_ demi-écrémé stérilisé UHT enrichi en vitamines B1, B2, B5, B12 et D.", + "ingredients_text_pt" : "Leite", + "iron_unit" : "g", + "iron_value" : "21.875", + "labels" : "Enrichi en vitamines, Fabriqué en France", + "lc" : "fr", + "link" : "https://www.elle-et-vire.com/en/produits/lait/bouteilles/lait-demi-ecreme-vitamine-uht/", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "France, Somme", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "France", + "packaging" : "Plastique, Bouchon en polyéthylène, Bouteille en Polyéthylène, Opercule en matériau composite, Étiquette en papier", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "29135200", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "UHT sterilised semi-skimmed milk enriched with vitamins B1, B2, B5, B12 and D - Long life", + "product_name_es" : "", + "product_name_fr" : "Lait demi ecrémé", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "3.2", + "quantity" : "1 l", + "salt_unit" : "g", + "salt_value" : "0.13", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "1.1", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.052", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Toutes enseignes GMS", + "sugars_unit" : "g", + "sugars_value" : "4.8", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3564703999971.json b/t/expected_test_results/export/3564703999971.json new file mode 100644 index 0000000000000..941d8619524a4 --- /dev/null +++ b/t/expected_test_results/export/3564703999971.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Marque Repère", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "0", + "categories" : "Matières grasses", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3564703999971", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "819", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "819", + "fat_unit" : "g", + "fat_value" : "91", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Huile d'olive vierge extra issue de l'agriculture biologique - huile pour friture et assaisonnement - huile d'olive de catégorie supérieure obtenue directement des olives et uniquement par des procédés mécaniques tunisie", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Bio", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Huile d'olive", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "16", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Leclerc", + "sugars_unit" : "g", + "sugars_value" : "0", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3661344653573.json b/t/expected_test_results/export/3661344653573.json new file mode 100644 index 0000000000000..0515bb195b218 --- /dev/null +++ b/t/expected_test_results/export/3661344653573.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Lait", + "brand_owner" : "", + "brands" : "Les 2 vaches", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "19.2", + "categories" : "Produits laitiers, Desserts, Desserts lactés, Crèmes dessert, Crèmes dessert café", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3661344653573", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, App - Open Food Facts", + "emb_codes" : "FR 14.370.001 EC", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "137", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "137", + "fat_unit" : "g", + "fat_value" : "5", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Lait entier pasteurisé équitable (73,4%), sucre de canne'; équiltable (9,5%), crème'; équitable amidon* de mais, lait écrémé en poudre, cale'; lyophilise équitable (1,2%). ';Issu de l'agriculture biologique, Lait Origine France. Commerce équitable contrilé Fair For Life: 90.7% des ingrédients d'origine agricole. Café issu du commerce équitable certifié Fairtrade/Max Havelaar. 'poudre de lait origine France Meuglez-nous au 0 801 803 804 CERTI AGRIC FR 14.370.001 CE CRÊMEUH CAFE", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Bio, Bio européen, Commerce équitable, FR-BIO-01, Max Havelaar, Nutriscore, Nutriscore C", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Yaourt Crémeuh Café", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "3.9", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0.4", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "3.5", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.16", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "15", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3760178254021.json b/t/expected_test_results/export/3760178254021.json new file mode 100644 index 0000000000000..7b22caac0ff11 --- /dev/null +++ b/t/expected_test_results/export/3760178254021.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "13", + "categories" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3760178254021", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "148", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "148", + "fat_unit" : "g", + "fat_value" : "9.2", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Chocolat au lait", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "3.4", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "5.4", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "13", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/3770013801303.json b/t/expected_test_results/export/3770013801303.json new file mode 100644 index 0000000000000..ec7e7c8b0fdf1 --- /dev/null +++ b/t/expected_test_results/export/3770013801303.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "7.5", + "categories" : "Boissons, Boissons gazeuses, Sodas, Limonades", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3770013801303", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "31.2", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "31.2", + "fat_unit" : "g", + "fat_value" : "1", + "fiber_unit" : "g", + "fiber_value" : "1", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Bio", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Limonade", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.7", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "1", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "7.5", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/5050083706622.json b/t/expected_test_results/export/5050083706622.json new file mode 100644 index 0000000000000..49516d27b5c98 --- /dev/null +++ b/t/expected_test_results/export/5050083706622.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Gluten, Lait, Fruits à coque", + "brand_owner" : "", + "brands" : "Kellogg's, kellogs", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "68", + "categories" : "Aliments et boissons à base de végétaux, Aliments d'origine végétale, Céréales et pommes de terre, Petit-déjeuners, Céréales et dérivés, Céréales pour petit-déjeuner, Céréales au chocolat, Céréales extrudées, Céréales fourrées", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "5050083706622", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, App - Open Food Facts", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "450", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "450", + "fat_unit" : "g", + "fat_value" : "16", + "fiber_unit" : "g", + "fiber_value" : "1", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Céréales fourrées chocolat noisette", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Farines de céréales (Blé{26%}, Avoine complète{17%}, Riz{12%}), Fourrage Chocolat Noisettes (Sucre, Huiles végétaleles [Colza, Palme], Chocolat {4%}[Sucre, Pâte de cacao], Maltodextrine, Noisettes{2%),Cacao maigre en poudre, Petit-lait en poudre, lait écrémé en poudre, Émulsifiant([Lécithine de tournesol], Arôme naturel), Sucre, Sel, Colorant (Charoténoides, Rocou), Antioxydant (Palmitate d'ascorbyle, Alpha-tocophérol). Vitamines et Minéraux : Vitamines (niacine, B6, B2, Bl, acide folique, B12), Fer.", + "ingredients_text_pt" : "", + "iron_unit" : "mg", + "iron_value" : "2.4", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "Carton", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Trésor goût Chocolat Noisettes", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "6.9", + "quantity" : "400 g", + "salt_unit" : "g", + "salt_value" : "1.14", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "4", + "serving_size" : "30 g", + "sodium_unit" : "g", + "sodium_value" : "0.456", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "29", + "traces" : "Fruits à coque", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "µg", + "vitamin-b12_value" : "0.63", + "vitamin-b1_unit" : "mg", + "vitamin-b1_value" : "0.28", + "vitamin-b2_unit" : "mg", + "vitamin-b2_value" : "0.35", + "vitamin-b6_unit" : "mg", + "vitamin-b6_value" : "0.35", + "vitamin-b9_unit" : "µg", + "vitamin-b9_value" : "50", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "mg", + "vitamin-pp_value" : "4" +} diff --git a/t/expected_test_results/export/5410803950689.json b/t/expected_test_results/export/5410803950689.json new file mode 100644 index 0000000000000..e69386522ab87 --- /dev/null +++ b/t/expected_test_results/export/5410803950689.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Halal maïza", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "17.1", + "categories" : "Sauces, Sauces algériennes, Epicerie", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "5410803950689", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "521", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "521", + "fat_unit" : "g", + "fat_value" : "49.4", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Sauce émulsionnée froide piquante aux oignons rôtis", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Halal", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "Plastique, Flacon", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Sauce algérienne", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "1.9", + "quantity" : "500 ml", + "salt_unit" : "g", + "salt_value" : "2.1", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "4.2", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.84", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "12.8", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/5601009974337.json b/t/expected_test_results/export/5601009974337.json new file mode 100644 index 0000000000000..212286f32d0d1 --- /dev/null +++ b/t/expected_test_results/export/5601009974337.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Leite", + "brand_owner" : "", + "brands" : "Pingo Doce, Gelgurte", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "13.7", + "categories" : "Laticínios, Alimentos Fermentados, Produtos lácteos fermentados, Iogurtes", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "5601009974337", + "conservation_conditions_fr" : "", + "countries" : "França, Portugal", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "PT ILT 39 EC", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "78", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "78", + "fat_unit" : "g", + "fat_value" : "1.4", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "Iogurte Líquido Meio Gordo com sumo e polpa de morango (4,4%) e polpa de banana (1%).", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "_Leite_ pasteurizado desnatado, _leite_ pasteurizado, açucar, sumo de morango reconstituído e polpa de morango, polpa de banana, _leite_ em pó magro, dextrose, aroma banana, aroma morango, corantes da fruta (antocianinas, beta-caroteno), amido de milho, espessantes (pectina amidada, goma xantana), fermentos lácticos, regulador de acidez (citrato trissódico), conservante da fruta (sorbato de potássio).", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "pt", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "Guarda, Portugal", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "Portugal", + "packaging" : "Plástico, HDPE - Polietileno de alta densidade", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "", + "product_name_pt" : "Iogurte morango banana", + "proteins_unit" : "g", + "proteins_value" : "2.7", + "quantity" : "170 g", + "salt_unit" : "g", + "salt_value" : "0.1", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.9", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.04", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Pingo Doce", + "sugars_unit" : "g", + "sugars_value" : "11.1", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/71464240608.json b/t/expected_test_results/export/71464240608.json new file mode 100644 index 0000000000000..12f17c1e14e39 --- /dev/null +++ b/t/expected_test_results/export/71464240608.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "Wm. Bolthouse Farms Inc.", + "brands" : "Bolthouse Farms", + "calcium_unit" : "mg", + "calcium_value" : "17", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "13.75", + "categories" : "Plant-based foods and beverages, Beverages, Plant-based beverages", + "cholesterol_unit" : "mg", + "cholesterol_value" : "0", + "code" : "71464240608", + "conservation_conditions_fr" : "", + "countries" : "France, United States", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, Databases, database-usda", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "58", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "58", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "g", + "fiber_value" : "0.8", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Pineapple juice from concentrate (water, pineapple juice concentrate), apple juice from concentrate (water, apple juice concentrate), mango puree from concentrate (water, mango puree concentrate), banana puree, kiwi puree, spirulina powder, natural flavor, green tea extract, spinach powder, broccoli powder, barley grass powder, wheat grass powder, garlic powder, jerusalem artichoke powder, nova scotia dulse powder.", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "mg", + "iron_value" : "0.45", + "labels" : "", + "lc" : "en", + "link" : "", + "manganese_unit" : "mg", + "manganese_value" : "1", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "mg", + "potassium_value" : "175", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "100% fruit juice smoothie, green goodness", + "product_name_es" : "", + "product_name_fr" : "Green goodness smoothie", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.83", + "quantity" : "", + "salt_unit" : "mg", + "salt_value" : "30", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "8 OZA (240 ml)", + "sodium_unit" : "mg", + "sodium_value" : "12", + "sources_fields:org-database-usda:available_date" : "2018-02-14T00:00:00Z", + "sources_fields:org-database-usda:fdc_category" : "Fruit & Vegetable Juice, Nectars & Fruit Drinks", + "sources_fields:org-database-usda:fdc_data_source" : "LI", + "sources_fields:org-database-usda:fdc_id" : "653042", + "sources_fields:org-database-usda:modified_date" : "2018-02-14T00:00:00Z", + "sources_fields:org-database-usda:publication_date" : "2019-12-06T00:00:00Z", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "12.5", + "traces" : "", + "trans-fat_unit" : "g", + "trans-fat_value" : "0", + "vitamin-a_unit" : "IU", + "vitamin-a_value" : "417", + "vitamin-b12_unit" : "µg", + "vitamin-b12_value" : "0.62", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "mg", + "vitamin-b2_value" : "0.071", + "vitamin-b6_unit" : "mg", + "vitamin-b6_value" : "0.125", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "mg", + "vitamin-c_value" : "12.5", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/77000001.json b/t/expected_test_results/export/77000001.json new file mode 100644 index 0000000000000..b8e0f6dbe23e2 --- /dev/null +++ b/t/expected_test_results/export/77000001.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Alex Olivier", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "", + "carbohydrates_value" : "", + "categories" : "Produits à tartiner, Petit-déjeuners, Produits à tartiner sucrés, Pâtes à tartiner, Pâtes à tartiner aux noisettes, Pâtes à tartiner au chocolat, Pâtes à tartiner aux noisettes et au cacao", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "77000001", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "", + "emb_codes" : "", + "energy-kcal_unit" : "", + "energy-kcal_value" : "", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "", + "energy_value" : "", + "fat_unit" : "", + "fat_value" : "", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "%", + "fruits-vegetables-nuts-estimate_value" : "49", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Pâte à tartiner chocolat et noisettes", + "product_name_pt" : "", + "proteins_unit" : "", + "proteins_value" : "", + "quantity" : "300 g", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "", + "saturated-fat_value" : "", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "", + "sugars_value" : "", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/7804659650035.json b/t/expected_test_results/export/7804659650035.json new file mode 100644 index 0000000000000..51761f818cdb9 --- /dev/null +++ b/t/expected_test_results/export/7804659650035.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Altramuces, Mostaza", + "brand_owner" : "", + "brands" : "Notco", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "9.3", + "categories" : "Salsas, Mayonesas, Comestibles", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "7804659650035", + "conservation_conditions_fr" : "", + "countries" : "Chile, Francia, España", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "582", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "582", + "fat_unit" : "g", + "fat_value" : "58", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "Aceite de canola, agua, garbanzos, lupino, semillas de mostaza, vinagre de uva, jugo de limón, sal, azúcar rubia, pimienta blanca, ajo en polvo, EDTA.\n\n\n\nIngredients list (English):\n\nCanola Oil, Water, Garbanzo Beans, Lupin (bean), Mustard Seeds, Grape Vinegar, Lemon Juice, Salt, White Sugar, White Pepper, Garlic Powder, EDTA.", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Vegetariano, Vegano", + "lc" : "es", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "g", + "monounsaturated-fat_value" : "39", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "g", + "polyunsaturated-fat_value" : "3", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "Not mayo", + "product_name_fr" : "", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "1", + "quantity" : "", + "salt_unit" : "mg", + "salt_value" : "640", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "3", + "serving_size" : "12 g", + "sodium_unit" : "mg", + "sodium_value" : "256", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "1", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/80650904.json b/t/expected_test_results/export/80650904.json new file mode 100644 index 0000000000000..afe33015cc41a --- /dev/null +++ b/t/expected_test_results/export/80650904.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "", + "carbohydrates_value" : "", + "categories" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "80650904", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "", + "energy-kcal_value" : "", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "", + "energy_value" : "", + "fat_unit" : "", + "fat_value" : "", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Olio aromatizzato funghi e tartufo", + "product_name_pt" : "", + "proteins_unit" : "", + "proteins_value" : "", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "", + "saturated-fat_value" : "", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "", + "sugars_value" : "", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/8712423020221.json b/t/expected_test_results/export/8712423020221.json new file mode 100644 index 0000000000000..499b7bd5f9190 --- /dev/null +++ b/t/expected_test_results/export/8712423020221.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Unilever", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "0", + "categories" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "8712423020221", + "conservation_conditions_fr" : "", + "countries" : "France", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "1", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "1", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "The Tasty Decaf", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "0", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/8722700472575.json b/t/expected_test_results/export/8722700472575.json new file mode 100644 index 0000000000000..ce24d8bcb2868 --- /dev/null +++ b/t/expected_test_results/export/8722700472575.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "Amora sauce caesar 1l", + "allergens" : "Œufs, Poisson, Lait", + "brand_owner" : "", + "brands" : "Amora", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "4.8", + "categories" : "Condiments, Sauces, Sauces salades, Sauces caesar, Epicerie", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "8722700472575", + "conservation_conditions_fr" : "A conserver au sec, à l'abri de la lumière et à température ambiante (<25°C).Après ouverture, se conserve au réfrigérateur dans un délai de 1 mois.", + "countries" : "France", + "customer_service_fr" : "UNILEVER France Food Solutions Relation Consommateurs, Unilever France Food Solutions, 20 rue des Deux Gares 92842 Rueil-Malmaison Cedex", + "data_sources" : "App - yuka, Apps, Producers, Producer - unilever-france-rhd, Database - Equadis, Database - GDSN, Databases", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "273", + "energy-kj_unit" : "kJ", + "energy-kj_value" : "1137", + "energy_unit" : "kJ", + "energy_value" : "1137", + "fat_unit" : "g", + "fat_value" : "27", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Sauce Salade & Sandwich Caesar", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Eau, huile de tournesol, vinaigre d'alcool, FROMAGE 3,2%, LAIT écrémé en poudre, jaune d'ŒUF de poules élevées en plein air 2,3%, ail 2,2%, amidon modifié de maïs, sel, jus de citron concentré, sucre, ANCHOIS 0,27%, conservateur : sorbate de potassium, épaississant : gomme xanthane, poivre noir, antioxydant : E385, sirop de sucre inverti, concentré de carthame. Peut contenir : sésame, moutarde.", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Sans colorants artificiels, Sans exhausteur de goût", + "lc" : "fr", + "link" : "http://www-unileverfoodsolutions-com.s3.amazonaws.com/ext%2Fdownload%2Fmis%2Ffr%2F8_72270_047257_5_fr.pdf", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "Plastique, Bouteille, en:test", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "Bien agiter avant emploi.", + "producer_product_id" : "", + "producer_version_id" : "CU AM SLDDRE CAESAR 6X1L PBOT FR", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Amora Sauce caesar salade & sandwich bouteille 1L", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "2.8", + "quantity" : "1000 ml", + "salt_unit" : "g", + "salt_value" : "1.6", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "3.8", + "serving_size" : "30 ml (Portion)", + "sodium_unit" : "g", + "sodium_value" : "0.64", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "8711200996988", + "sources_fields:org-gs1:gpcCategoryCode" : "10000200", + "sources_fields:org-gs1:gpcCategoryName" : "Assaisonnements/Sauces Froides (Longue Conservation)", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "true", + "sources_fields:org-gs1:lastChangeDateTime" : "2022-01-12T19:08:58+01:00", + "sources_fields:org-gs1:partyName" : "UNILEVER FRANCE RHD", + "sources_fields:org-gs1:productionVariantDescription" : "CU AM SLDDRE CAESAR 6X1L PBOT FR", + "sources_fields:org-gs1:publicationDateTime" : "2022-01-12T19:08:58+01:00", + "stores" : "Intermarché", + "sugars_unit" : "g", + "sugars_value" : "3.2", + "traces" : "Moutarde, Graines de sésame", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export/9002355004345.json b/t/expected_test_results/export/9002355004345.json new file mode 100644 index 0000000000000..84f8dfcb55d77 --- /dev/null +++ b/t/expected_test_results/export/9002355004345.json @@ -0,0 +1,113 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "brand_owner" : "", + "brands" : "Tiroler Früchteküche", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "54", + "categories" : "Pflanzliche Lebensmittel und Getränke, Pflanzliche Lebensmittel, Frucht- und gemüsebasierte Lebensmittel, Brotaufstriche, Frühstücke, Fruchtbasierte Lebensmittel, Pflanzliche Brotaufstriche, Süße Brotaufstriche, Konfitüren und Marmeladen, Konfitüren", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "9002355004345", + "conservation_conditions_fr" : "", + "countries" : "Frankreich, Deutschland", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "224", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "224", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "lc" : "de", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "origin_fr" : "", + "origins" : "", + "packaging" : "Glas", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "Tiroler Früchteküche Marillen", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "420 g", + "salt_unit" : "g", + "salt_value" : "0", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "sugars_unit" : "g", + "sugars_value" : "53", + "traces" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/25000044984.json b/t/expected_test_results/export_more_fields/25000044984.json new file mode 100644 index 0000000000000..735262cf27f5d --- /dev/null +++ b/t/expected_test_results/export_more_fields/25000044984.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "The Minute Maid Company", + "brands" : "", + "brands_tags" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "12.5", + "categories" : "Beverages, Carbonated drinks, Sodas, Lemonade, Sweetened beverages", + "categories_tags" : "en:beverages,en:carbonated-drinks,en:sodas,en:lemonade,en:sweetened-beverages", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "25000044984", + "conservation_conditions_fr" : "", + "countries" : "France, United States", + "countries_tags" : "en:france,en:united-states", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, Databases, database-usda, App - InFood", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "50", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "50", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Contains pure filtered water, lemon juice, cane sugar, natural flavors.", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Contains pure filtered water, lemon juice, cane sugar, natural flavors.", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "en", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "", + "off:ecoscore_data.adjustments.packaging.value" : "", + "off:ecoscore_data.adjustments.production_system.value" : "", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "not-applicable", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "e", + "off:nutriscore_score" : "15", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "Simply lemonade", + "product_name_es" : "", + "product_name_fr" : "Simply Lemonade", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0.0159", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "8 OZA (240 ml)", + "sodium_unit" : "g", + "sodium_value" : "0.00636", + "sources_fields:org-database-usda:available_date" : "2019-07-29T00:00:00Z", + "sources_fields:org-database-usda:fdc_category" : "Soda", + "sources_fields:org-database-usda:fdc_data_source" : "LI", + "sources_fields:org-database-usda:fdc_id" : "678078", + "sources_fields:org-database-usda:modified_date" : "2019-07-29T00:00:00Z", + "sources_fields:org-database-usda:publication_date" : "2019-12-06T00:00:00Z", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "11.67", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/26281742.json b/t/expected_test_results/export_more_fields/26281742.json new file mode 100644 index 0000000000000..087f804290fb1 --- /dev/null +++ b/t/expected_test_results/export_more_fields/26281742.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Grandessa", + "brands_tags" : "grandessa", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "9.9", + "categories" : "Plant-based foods and beverages, Plant-based foods, Spreads, Breakfasts, Plant-based spreads, Sweet spreads, Fruit and vegetable preserves", + "categories_tags" : "en:plant-based-foods-and-beverages,en:plant-based-foods,en:spreads,en:breakfasts,en:plant-based-spreads,en:sweet-spreads,en:fruit-and-vegetable-preserves", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "26281742", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "171", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "171", + "fat_unit" : "g", + "fat_value" : "0.1", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Made in Belgium", + "labels_tags" : "en:made-in-belgium", + "lc" : "en", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "made in belgium", + "manufacturing_places_tags" : "made-in-belgium", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "serving", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "0", + "off:ecoscore_data.adjustments.packaging.value" : "-2", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "fr:bocal verre", + "packaging_tags" : "fr:bocal-verre", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "Stawberry jam", + "product_name_es" : "", + "product_name_fr" : "Strawberry conserve", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.1", + "quantity" : "500 g", + "salt_unit" : "g", + "salt_value" : "2.54", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.1", + "serving_size" : "serving", + "sodium_unit" : "g", + "sodium_value" : "1.016", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "9.9", + "traces" : "Eggs, Milk", + "traces_tags" : "en:eggs,en:milk", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/27096765.json b/t/expected_test_results/export_more_fields/27096765.json new file mode 100644 index 0000000000000..a7242e6fd0f0c --- /dev/null +++ b/t/expected_test_results/export_more_fields/27096765.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Lait, Soja", + "allergens_tags" : "en:milk,en:soybeans", + "brand_owner" : "", + "brands" : "Château", + "brands_tags" : "chateau", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "52", + "categories" : "Snacks, Snacks sucrés, Cacao et dérivés, Biscuits et gâteaux, Gâteaux, Chocolats, Chocolats au lait, Gâteaux au chocolat", + "categories_tags" : "en:snacks,en:sweet-snacks,en:cocoa-and-its-products,en:biscuits-and-cakes,en:cakes,en:chocolates,en:milk-chocolates,en:chocolate-cakes", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "27096765", + "conservation_conditions_fr" : "", + "countries" : "Belgique, France", + "countries_tags" : "en:belgium,en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, App - InFood", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "563", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "563", + "fat_unit" : "g", + "fat_value" : "35", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Sugar, cocoa butter, cream powder (milk) (15.9%), cocoa paste, whole milk powder (5.5%), skim milk powder, lactose, emulsifier: lecithin (soy), vanilla extract", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Sucre, beurre de cacao, crème en poudre (lait) (15,9%), pâte de cacao, lait entier en poudre (5,5%), lait écrémé en poudre, lactose, émulsifiant : lécithine (soja), extrait de vanille", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Agriculture durable, en:UTZ Certified", + "labels_tags" : "en:sustainable-farming,en:utz-certified", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-13", + "off:ecoscore_data.adjustments.production_system.value" : "10", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "23585", + "off:ecoscore_grade" : "d", + "off:ecoscore_score" : "30", + "off:nutriscore_grade" : "e", + "off:nutriscore_score" : "28", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "Métal, Plastique, en:Recyclable Metals, Aluminium", + "packaging_tags" : "en:metal,en:plastic,en:recyclable-metals,en:aluminium", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Lait crème", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "8", + "quantity" : "5 x 40 g", + "salt_unit" : "g", + "salt_value" : "0.24", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "22", + "serving_size" : "40 g", + "sodium_unit" : "g", + "sodium_value" : "0.096", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "51", + "traces" : "Fruits à coque, Arachides", + "traces_tags" : "en:nuts,en:peanuts", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/29161690.json b/t/expected_test_results/export_more_fields/29161690.json new file mode 100644 index 0000000000000..22985755d7ed8 --- /dev/null +++ b/t/expected_test_results/export_more_fields/29161690.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "", + "brands_tags" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "27.6", + "categories" : "", + "categories_tags" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "29161690", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "635", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "635", + "fat_unit" : "g", + "fat_value" : "54.9", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "100 % Almond Buter", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "21", + "quantity" : "227 g", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "5.4", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "3.4", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3173990027337.json b/t/expected_test_results/export_more_fields/3173990027337.json new file mode 100644 index 0000000000000..02834c079489c --- /dev/null +++ b/t/expected_test_results/export_more_fields/3173990027337.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "", + "brands_tags" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "70", + "categories" : "", + "categories_tags" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3173990027337", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "455", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "455", + "fat_unit" : "g", + "fat_value" : "15", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Fourrés myrtilles", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "5.7", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0.43", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "1.6", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.172", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "34", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3250392332105.json b/t/expected_test_results/export_more_fields/3250392332105.json new file mode 100644 index 0000000000000..045172ff74a22 --- /dev/null +++ b/t/expected_test_results/export_more_fields/3250392332105.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Netto", + "brands_tags" : "netto", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "4.1", + "categories" : "", + "categories_tags" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3250392332105", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "84", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "84", + "fat_unit" : "g", + "fat_value" : "3", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Thon catalane", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "8.9", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "1.1", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.2", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.44", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "4.1", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3256220513173.json b/t/expected_test_results/export_more_fields/3256220513173.json new file mode 100644 index 0000000000000..c05c93215dc0a --- /dev/null +++ b/t/expected_test_results/export_more_fields/3256220513173.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "U", + "brands_tags" : "u", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "80", + "categories" : "Boissons, Sirops, Boissons avec sucre ajouté", + "categories_tags" : "en:beverages,en:syrups,en:sweetened-beverages", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3256220513173", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "Producer - Systeme U, Producers, App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "330", + "energy-kj_unit" : "kJ", + "energy-kj_value" : "1402", + "energy_unit" : "kJ", + "energy_value" : "1402", + "fat_unit" : "g", + "fat_value" : "0.1", + "fiber_unit" : "g", + "fiber_value" : "0.5", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Sirop de Thé Pêche", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Sucre, jus de fruits à base de concentrés 40% (pêche 20%, citron), eau, arômes, acidifiant : acide citrique, colorants : lutéine et anthocyanes, stabilisant : E445.", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Point Vert, Sans conservateurs, Transformé en France", + "labels_tags" : "en:green-dot,en:no-preservatives,en:transformed-in-france", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "0", + "off:ecoscore_data.adjustments.packaging.value" : "-10", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "e", + "off:nutriscore_score" : "20", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "Métal, Bidon", + "packaging_tags" : "en:metal,en:jug", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Sirop de thé pêche", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.1", + "quantity" : "75 cl", + "salt_unit" : "g", + "salt_value" : "0.01", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.1", + "serving_size" : "200 ml", + "sodium_unit" : "g", + "sodium_value" : "0.004", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Super U, Magasins U", + "stores_tags" : "super-u,magasins-u", + "sugars_unit" : "g", + "sugars_value" : "79", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3259330020135.json b/t/expected_test_results/export_more_fields/3259330020135.json new file mode 100644 index 0000000000000..c8488341a4503 --- /dev/null +++ b/t/expected_test_results/export_more_fields/3259330020135.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "", + "brands_tags" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "", + "carbohydrates_value" : "", + "categories" : "Plant-based foods and beverages, Plant-based foods, Legumes and their products, Meat analogues, Tofu", + "categories_tags" : "en:plant-based-foods-and-beverages,en:plant-based-foods,en:legumes-and-their-products,en:meat-analogues,en:tofu", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3259330020135", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "", + "energy-kcal_value" : "", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "", + "energy_value" : "", + "fat_unit" : "", + "fat_value" : "", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Graines de soja sans OGM, eau, glucono delta lactone (E575) chlorure de calcium (E509), sulfate de calcium (E516)", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "en", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "20904", + "off:ecoscore_grade" : "b", + "off:ecoscore_score" : "77", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "Tofu en flan", + "product_name_es" : "", + "product_name_fr" : "", + "product_name_pt" : "", + "proteins_unit" : "", + "proteins_value" : "", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "", + "saturated-fat_value" : "", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "", + "sugars_value" : "", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3270160503070.json b/t/expected_test_results/export_more_fields/3270160503070.json new file mode 100644 index 0000000000000..7f2dcfabe15ee --- /dev/null +++ b/t/expected_test_results/export_more_fields/3270160503070.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Picard", + "brands_tags" : "picard", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "7.9", + "categories" : "Aliments et boissons à base de végétaux, Aliments d'origine végétale, Condiments, Aliments à base de fruits et de légumes, Plantes condimentaires, Surgelés, Légumes et dérivés, Aliments à base de plantes surgelés, Légumes surgelés, Epicerie", + "categories_tags" : "en:plant-based-foods-and-beverages,en:plant-based-foods,en:condiments,en:fruits-and-vegetables-based-foods,en:culinary-plants,en:frozen-foods,en:vegetables-based-foods,en:frozen-plant-based-foods,en:frozen-vegetables,fr:epicerie", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3270160503070", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - Yuka, Apps", + "emb_codes" : "EMB 62863C", + "emb_codes_tags" : "emb-62863c", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "41", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "41", + "fat_unit" : "g", + "fat_value" : "0.2", + "fiber_unit" : "g", + "fiber_value" : "1.4", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Oignons surgelés", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Oignons rouges 100%", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-10", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "a", + "off:nutriscore_score" : "-5", + "origin_fr" : "France, Bénélux", + "origins" : "", + "origins_tags" : "", + "packaging" : "Plastique, Surgelé", + "packaging_tags" : "en:plastic,en:frozen", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Oignons rouges émincés surgelés", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "1.2", + "quantity" : "450 g", + "salt_unit" : "g", + "salt_value" : "0.01", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.1", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.004", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Picard", + "stores_tags" : "picard", + "sugars_unit" : "g", + "sugars_value" : "5.6", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3451790834080.json b/t/expected_test_results/export_more_fields/3451790834080.json new file mode 100644 index 0000000000000..528dd9d75ec27 --- /dev/null +++ b/t/expected_test_results/export_more_fields/3451790834080.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "Vitamin enriched milk", + "abbreviated_product_name_fr" : "", + "allergens" : "Lait", + "allergens_tags" : "en:milk", + "brand_owner" : "Savencia", + "brands" : "Elle & Vire, Savencia, Elle&Vire International", + "brands_tags" : "elle-vire,savencia,elle-vire-international", + "calcium_unit" : "mg", + "calcium_value" : "120", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "4.8", + "categories" : "Produits laitiers, Crèmes, Laits, Laits homogénéisés, Laits demi-écrémés, Laits UHT, Crèmes entières, Crèmes cuisson", + "categories_tags" : "en:dairies,en:creams,en:milks,en:homogenized-milks,en:semi-skimmed-milks,en:uht-milks,fr:cremes-entieres,fr:cremes-cuisson", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3451790834080", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, Producers, Producer - elle-vire", + "emb_codes" : "FR 80.001.002 EC, FR 50.139.001 EC", + "emb_codes_tags" : "fr-80-001-002-ec,fr-50-139-001-ec", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "46", + "energy-kj_unit" : "kJ", + "energy-kj_value" : "193", + "energy_unit" : "kJ", + "energy_value" : "193", + "fat_unit" : "g", + "fat_value" : "1.55", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "Semi-skimmed milk", + "generic_name_fr" : "Lait demi-écrémé stérilisé UHT enrichi en vitamines B1, B2, B5, B12 et D - longue conservation", + "generic_name_pt" : "", + "ingredients_text_en" : "Milk", + "ingredients_text_es" : "Leche", + "ingredients_text_fr" : "_Lait_ demi-écrémé stérilisé UHT enrichi en vitamines B1, B2, B5, B12 et D.", + "ingredients_text_pt" : "Leite", + "iron_unit" : "g", + "iron_value" : "21.875", + "labels" : "Enrichi en vitamines, Fabriqué en France", + "labels_tags" : "en:enriched-wih-vitamins,en:made-in-france", + "lc" : "fr", + "link" : "https://www.elle-et-vire.com/en/produits/lait/bouteilles/lait-demi-ecreme-vitamine-uht/", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "France, Somme", + "manufacturing_places_tags" : "france,somme", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "19", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "0", + "off:ecoscore_data.adjustments.packaging.value" : "-12", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "19041", + "off:ecoscore_grade" : "b", + "off:ecoscore_score" : "61", + "off:nutriscore_grade" : "b", + "off:nutriscore_score" : "1", + "origin_fr" : "", + "origins" : "France", + "origins_tags" : "en:france", + "packaging" : "Plastique, Bouchon en polyéthylène, Bouteille en Polyéthylène, Opercule en matériau composite, Étiquette en papier", + "packaging_tags" : "en:plastic,fr:bouchon-en-polyethylene,fr:bouteille-en-polyethylene,fr:opercule-en-materiau-composite,fr:etiquette-en-papier", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "29135200", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "UHT sterilised semi-skimmed milk enriched with vitamins B1, B2, B5, B12 and D - Long life", + "product_name_es" : "", + "product_name_fr" : "Lait demi ecrémé", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "3.2", + "quantity" : "1 l", + "salt_unit" : "g", + "salt_value" : "0.13", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "1.1", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.052", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Toutes enseignes GMS", + "stores_tags" : "toutes-enseignes-gms", + "sugars_unit" : "g", + "sugars_value" : "4.8", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3564703999971.json b/t/expected_test_results/export_more_fields/3564703999971.json new file mode 100644 index 0000000000000..9a64d007ce585 --- /dev/null +++ b/t/expected_test_results/export_more_fields/3564703999971.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Marque Repère", + "brands_tags" : "marque-repere", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "0", + "categories" : "Matières grasses", + "categories_tags" : "en:fats", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3564703999971", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "819", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "819", + "fat_unit" : "g", + "fat_value" : "91", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Huile d'olive vierge extra issue de l'agriculture biologique - huile pour friture et assaisonnement - huile d'olive de catégorie supérieure obtenue directement des olives et uniquement par des procédés mécaniques tunisie", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Bio", + "labels_tags" : "en:organic", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "d", + "off:nutriscore_score" : "12", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Huile d'olive", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "16", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Leclerc", + "stores_tags" : "leclerc", + "sugars_unit" : "g", + "sugars_value" : "0", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3661344653573.json b/t/expected_test_results/export_more_fields/3661344653573.json new file mode 100644 index 0000000000000..cb7afc4d845b2 --- /dev/null +++ b/t/expected_test_results/export_more_fields/3661344653573.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Lait", + "allergens_tags" : "en:milk", + "brand_owner" : "", + "brands" : "Les 2 vaches", + "brands_tags" : "les-2-vaches", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "19.2", + "categories" : "Produits laitiers, Desserts, Desserts lactés, Crèmes dessert, Crèmes dessert café", + "categories_tags" : "en:dairies,en:desserts,en:dairy-desserts,en:dessert-creams,en:coffee-custard-dessert", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3661344653573", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, App - Open Food Facts", + "emb_codes" : "FR 14.370.001 EC", + "emb_codes_tags" : "fr-14-370-001-ec", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "137", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "137", + "fat_unit" : "g", + "fat_value" : "5", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Lait entier pasteurisé équitable (73,4%), sucre de canne'; équiltable (9,5%), crème'; équitable amidon* de mais, lait écrémé en poudre, cale'; lyophilise équitable (1,2%). ';Issu de l'agriculture biologique, Lait Origine France. Commerce équitable contrilé Fair For Life: 90.7% des ingrédients d'origine agricole. Café issu du commerce équitable certifié Fairtrade/Max Havelaar. 'poudre de lait origine France Meuglez-nous au 0 801 803 804 CERTI AGRIC FR 14.370.001 CE CRÊMEUH CAFE", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Bio, Bio européen, Commerce équitable, FR-BIO-01, Max Havelaar, Nutriscore, Nutriscore C", + "labels_tags" : "en:organic,en:eu-organic,en:fair-trade,en:fr-bio-01,en:max-havelaar,en:nutriscore,en:nutriscore-grade-c", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "15", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "c", + "off:nutriscore_score" : "6", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Yaourt Crémeuh Café", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "3.9", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0.4", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "3.5", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.16", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "15", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3760178254021.json b/t/expected_test_results/export_more_fields/3760178254021.json new file mode 100644 index 0000000000000..d8a4a56aa651a --- /dev/null +++ b/t/expected_test_results/export_more_fields/3760178254021.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "", + "brands_tags" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "13", + "categories" : "", + "categories_tags" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3760178254021", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "148", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "148", + "fat_unit" : "g", + "fat_value" : "9.2", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Chocolat au lait", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "3.4", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "5.4", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "13", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/3770013801303.json b/t/expected_test_results/export_more_fields/3770013801303.json new file mode 100644 index 0000000000000..a2a1e4ac963d7 --- /dev/null +++ b/t/expected_test_results/export_more_fields/3770013801303.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "", + "brands_tags" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "7.5", + "categories" : "Boissons, Boissons gazeuses, Sodas, Limonades", + "categories_tags" : "en:beverages,en:carbonated-drinks,en:sodas,en:lemonade", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "3770013801303", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "31.2", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "31.2", + "fat_unit" : "g", + "fat_value" : "1", + "fiber_unit" : "g", + "fiber_value" : "1", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Bio", + "labels_tags" : "en:organic", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "", + "off:ecoscore_data.adjustments.packaging.value" : "", + "off:ecoscore_data.adjustments.production_system.value" : "", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "not-applicable", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Limonade", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.7", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "1", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "7.5", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/5050083706622.json b/t/expected_test_results/export_more_fields/5050083706622.json new file mode 100644 index 0000000000000..649f8e547ac8b --- /dev/null +++ b/t/expected_test_results/export_more_fields/5050083706622.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Gluten, Lait, Fruits à coque", + "allergens_tags" : "en:gluten,en:milk,en:nuts", + "brand_owner" : "", + "brands" : "Kellogg's, kellogs", + "brands_tags" : "kellogg-s,kellogs", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "68", + "categories" : "Aliments et boissons à base de végétaux, Aliments d'origine végétale, Céréales et pommes de terre, Petit-déjeuners, Céréales et dérivés, Céréales pour petit-déjeuner, Céréales au chocolat, Céréales extrudées, Céréales fourrées", + "categories_tags" : "en:plant-based-foods-and-beverages,en:plant-based-foods,en:cereals-and-potatoes,en:breakfasts,en:cereals-and-their-products,en:breakfast-cereals,en:chocolate-cereals,en:extruded-cereals,en:filled-cereals", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "5050083706622", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, App - Open Food Facts", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "450", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "450", + "fat_unit" : "g", + "fat_value" : "16", + "fiber_unit" : "g", + "fiber_value" : "1", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Céréales fourrées chocolat noisette", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Farines de céréales (Blé{26%}, Avoine complète{17%}, Riz{12%}), Fourrage Chocolat Noisettes (Sucre, Huiles végétaleles [Colza, Palme], Chocolat {4%}[Sucre, Pâte de cacao], Maltodextrine, Noisettes{2%),Cacao maigre en poudre, Petit-lait en poudre, lait écrémé en poudre, Émulsifiant([Lécithine de tournesol], Arôme naturel), Sucre, Sel, Colorant (Charoténoides, Rocou), Antioxydant (Palmitate d'ascorbyle, Alpha-tocophérol). Vitamines et Minéraux : Vitamines (niacine, B6, B2, Bl, acide folique, B12), Fer.", + "ingredients_text_pt" : "", + "iron_unit" : "mg", + "iron_value" : "2.4", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "0", + "off:ecoscore_data.adjustments.packaging.value" : "-1", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "-10", + "off:ecoscore_data.agribalyse.code" : "32135", + "off:ecoscore_grade" : "c", + "off:ecoscore_score" : "44", + "off:nutriscore_grade" : "d", + "off:nutriscore_score" : "18", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "Carton", + "packaging_tags" : "en:cardboard", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Trésor goût Chocolat Noisettes", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "6.9", + "quantity" : "400 g", + "salt_unit" : "g", + "salt_value" : "1.14", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "4", + "serving_size" : "30 g", + "sodium_unit" : "g", + "sodium_value" : "0.456", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "29", + "traces" : "Fruits à coque", + "traces_tags" : "en:nuts", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "µg", + "vitamin-b12_value" : "0.63", + "vitamin-b1_unit" : "mg", + "vitamin-b1_value" : "0.28", + "vitamin-b2_unit" : "mg", + "vitamin-b2_value" : "0.35", + "vitamin-b6_unit" : "mg", + "vitamin-b6_value" : "0.35", + "vitamin-b9_unit" : "µg", + "vitamin-b9_value" : "50", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "mg", + "vitamin-pp_value" : "4" +} diff --git a/t/expected_test_results/export_more_fields/5410803950689.json b/t/expected_test_results/export_more_fields/5410803950689.json new file mode 100644 index 0000000000000..4fd9386fdf930 --- /dev/null +++ b/t/expected_test_results/export_more_fields/5410803950689.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Halal maïza", + "brands_tags" : "halal-maiza", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "17.1", + "categories" : "Sauces, Sauces algériennes, Epicerie", + "categories_tags" : "en:sauces,en:algerian-sauces,fr:epicerie", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "5410803950689", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "521", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "521", + "fat_unit" : "g", + "fat_value" : "49.4", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Sauce émulsionnée froide piquante aux oignons rôtis", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Halal", + "labels_tags" : "en:halal", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-10", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "e", + "off:nutriscore_score" : "21", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "Plastique, Flacon", + "packaging_tags" : "en:plastic,en:vial", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Sauce algérienne", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "1.9", + "quantity" : "500 ml", + "salt_unit" : "g", + "salt_value" : "2.1", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "4.2", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.84", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "12.8", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/5601009974337.json b/t/expected_test_results/export_more_fields/5601009974337.json new file mode 100644 index 0000000000000..845e04f3ef80a --- /dev/null +++ b/t/expected_test_results/export_more_fields/5601009974337.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Leite", + "allergens_tags" : "en:milk", + "brand_owner" : "", + "brands" : "Pingo Doce, Gelgurte", + "brands_tags" : "pingo-doce,gelgurte", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "13.7", + "categories" : "Laticínios, Alimentos Fermentados, Produtos lácteos fermentados, Iogurtes", + "categories_tags" : "en:dairies,en:fermented-foods,en:fermented-milk-products,en:yogurts", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "5601009974337", + "conservation_conditions_fr" : "", + "countries" : "França, Portugal", + "countries_tags" : "en:france,en:portugal", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "PT ILT 39 EC", + "emb_codes_tags" : "pt-ilt-39-ec", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "78", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "78", + "fat_unit" : "g", + "fat_value" : "1.4", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "Iogurte Líquido Meio Gordo com sumo e polpa de morango (4,4%) e polpa de banana (1%).", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "_Leite_ pasteurizado desnatado, _leite_ pasteurizado, açucar, sumo de morango reconstituído e polpa de morango, polpa de banana, _leite_ em pó magro, dextrose, aroma banana, aroma morango, corantes da fruta (antocianinas, beta-caroteno), amido de milho, espessantes (pectina amidada, goma xantana), fermentos lácticos, regulador de acidez (citrato trissódico), conservante da fruta (sorbato de potássio).", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "pt", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "Guarda, Portugal", + "manufacturing_places_tags" : "guarda,portugal", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "8", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "0", + "off:ecoscore_data.adjustments.packaging.value" : "-8", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "b", + "off:nutriscore_score" : "1", + "origin_fr" : "", + "origins" : "Portugal", + "origins_tags" : "en:portugal", + "packaging" : "Plástico, HDPE - Polietileno de alta densidade", + "packaging_tags" : "en:plastic,en:hdpe-high-density-polyethylene", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "", + "product_name_pt" : "Iogurte morango banana", + "proteins_unit" : "g", + "proteins_value" : "2.7", + "quantity" : "170 g", + "salt_unit" : "g", + "salt_value" : "0.1", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0.9", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0.04", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "Pingo Doce", + "stores_tags" : "pingo-doce", + "sugars_unit" : "g", + "sugars_value" : "11.1", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/71464240608.json b/t/expected_test_results/export_more_fields/71464240608.json new file mode 100644 index 0000000000000..4ad9ff8346901 --- /dev/null +++ b/t/expected_test_results/export_more_fields/71464240608.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "Wm. Bolthouse Farms Inc.", + "brands" : "Bolthouse Farms", + "brands_tags" : "bolthouse-farms", + "calcium_unit" : "mg", + "calcium_value" : "17", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "13.75", + "categories" : "Plant-based foods and beverages, Beverages, Plant-based beverages", + "categories_tags" : "en:plant-based-foods-and-beverages,en:beverages,en:plant-based-beverages", + "cholesterol_unit" : "mg", + "cholesterol_value" : "0", + "code" : "71464240608", + "conservation_conditions_fr" : "", + "countries" : "France, United States", + "countries_tags" : "en:france,en:united-states", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps, Databases, database-usda", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "58", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "58", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "g", + "fiber_value" : "0.8", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "Pineapple juice from concentrate (water, pineapple juice concentrate), apple juice from concentrate (water, apple juice concentrate), mango puree from concentrate (water, mango puree concentrate), banana puree, kiwi puree, spirulina powder, natural flavor, green tea extract, spinach powder, broccoli powder, barley grass powder, wheat grass powder, garlic powder, jerusalem artichoke powder, nova scotia dulse powder.", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "mg", + "iron_value" : "0.45", + "labels" : "", + "labels_tags" : "", + "lc" : "en", + "link" : "", + "manganese_unit" : "mg", + "manganese_value" : "1", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "e", + "off:nutriscore_score" : "18", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "mg", + "potassium_value" : "175", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "100% fruit juice smoothie, green goodness", + "product_name_es" : "", + "product_name_fr" : "Green goodness smoothie", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0.83", + "quantity" : "", + "salt_unit" : "mg", + "salt_value" : "30", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "8 OZA (240 ml)", + "sodium_unit" : "mg", + "sodium_value" : "12", + "sources_fields:org-database-usda:available_date" : "2018-02-14T00:00:00Z", + "sources_fields:org-database-usda:fdc_category" : "Fruit & Vegetable Juice, Nectars & Fruit Drinks", + "sources_fields:org-database-usda:fdc_data_source" : "LI", + "sources_fields:org-database-usda:fdc_id" : "653042", + "sources_fields:org-database-usda:modified_date" : "2018-02-14T00:00:00Z", + "sources_fields:org-database-usda:publication_date" : "2019-12-06T00:00:00Z", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "12.5", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "g", + "trans-fat_value" : "0", + "vitamin-a_unit" : "IU", + "vitamin-a_value" : "417", + "vitamin-b12_unit" : "µg", + "vitamin-b12_value" : "0.62", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "mg", + "vitamin-b2_value" : "0.071", + "vitamin-b6_unit" : "mg", + "vitamin-b6_value" : "0.125", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "mg", + "vitamin-c_value" : "12.5", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/77000001.json b/t/expected_test_results/export_more_fields/77000001.json new file mode 100644 index 0000000000000..70e16cdf2426d --- /dev/null +++ b/t/expected_test_results/export_more_fields/77000001.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Alex Olivier", + "brands_tags" : "alex-olivier", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "", + "carbohydrates_value" : "", + "categories" : "Produits à tartiner, Petit-déjeuners, Produits à tartiner sucrés, Pâtes à tartiner, Pâtes à tartiner aux noisettes, Pâtes à tartiner au chocolat, Pâtes à tartiner aux noisettes et au cacao", + "categories_tags" : "en:spreads,en:breakfasts,en:sweet-spreads,fr:pates-a-tartiner,en:hazelnut-spreads,en:chocolate-spreads,en:cocoa-and-hazelnuts-spreads", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "77000001", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "", + "energy-kcal_value" : "", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "", + "energy_value" : "", + "fat_unit" : "", + "fat_value" : "", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "%", + "fruits-vegetables-nuts-estimate_value" : "49", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "31032", + "off:ecoscore_grade" : "d", + "off:ecoscore_score" : "20", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Pâte à tartiner chocolat et noisettes", + "product_name_pt" : "", + "proteins_unit" : "", + "proteins_value" : "", + "quantity" : "300 g", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "", + "saturated-fat_value" : "", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "", + "sugars_value" : "", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/7804659650035.json b/t/expected_test_results/export_more_fields/7804659650035.json new file mode 100644 index 0000000000000..7ebb4afc82818 --- /dev/null +++ b/t/expected_test_results/export_more_fields/7804659650035.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "Altramuces, Mostaza", + "allergens_tags" : "en:lupin,en:mustard", + "brand_owner" : "", + "brands" : "Notco", + "brands_tags" : "notco", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "9.3", + "categories" : "Salsas, Mayonesas, Comestibles", + "categories_tags" : "en:sauces,en:mayonnaises,es:comestibles", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "7804659650035", + "conservation_conditions_fr" : "", + "countries" : "Chile, Francia, España", + "countries_tags" : "en:chile,en:france,en:spain", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "582", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "582", + "fat_unit" : "g", + "fat_value" : "58", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "Aceite de canola, agua, garbanzos, lupino, semillas de mostaza, vinagre de uva, jugo de limón, sal, azúcar rubia, pimienta blanca, ajo en polvo, EDTA.\n\n\n\nIngredients list (English):\n\nCanola Oil, Water, Garbanzo Beans, Lupin (bean), Mustard Seeds, Grape Vinegar, Lemon Juice, Salt, White Sugar, White Pepper, Garlic Powder, EDTA.", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Vegetariano, Vegano", + "labels_tags" : "en:vegetarian,en:vegan", + "lc" : "es", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "g", + "monounsaturated-fat_value" : "39", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "11054", + "off:ecoscore_grade" : "d", + "off:ecoscore_score" : "29", + "off:nutriscore_grade" : "d", + "off:nutriscore_score" : "11", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "g", + "polyunsaturated-fat_value" : "3", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "Not mayo", + "product_name_fr" : "", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "1", + "quantity" : "", + "salt_unit" : "mg", + "salt_value" : "640", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "3", + "serving_size" : "12 g", + "sodium_unit" : "mg", + "sodium_value" : "256", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "1", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/80650904.json b/t/expected_test_results/export_more_fields/80650904.json new file mode 100644 index 0000000000000..e588b3ec8ef97 --- /dev/null +++ b/t/expected_test_results/export_more_fields/80650904.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "", + "brands_tags" : "", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "", + "carbohydrates_value" : "", + "categories" : "", + "categories_tags" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "80650904", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "", + "energy-kcal_value" : "", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "", + "energy_value" : "", + "fat_unit" : "", + "fat_value" : "", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Olio aromatizzato funghi e tartufo", + "product_name_pt" : "", + "proteins_unit" : "", + "proteins_value" : "", + "quantity" : "", + "salt_unit" : "", + "salt_value" : "", + "saturated-fat_unit" : "", + "saturated-fat_value" : "", + "serving_size" : "", + "sodium_unit" : "", + "sodium_value" : "", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "", + "sugars_value" : "", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/8712423020221.json b/t/expected_test_results/export_more_fields/8712423020221.json new file mode 100644 index 0000000000000..1eb60a21c1d2f --- /dev/null +++ b/t/expected_test_results/export_more_fields/8712423020221.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Unilever", + "brands_tags" : "unilever", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "0", + "categories" : "", + "categories_tags" : "", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "8712423020221", + "conservation_conditions_fr" : "", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "1", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "1", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "fr", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-15", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "", + "off:ecoscore_grade" : "unknown", + "off:ecoscore_score" : "", + "off:nutriscore_grade" : "", + "off:nutriscore_score" : "", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "", + "packaging_tags" : "", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "The Tasty Decaf", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "", + "salt_unit" : "g", + "salt_value" : "0", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "0", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/8722700472575.json b/t/expected_test_results/export_more_fields/8722700472575.json new file mode 100644 index 0000000000000..0fe50e29a925c --- /dev/null +++ b/t/expected_test_results/export_more_fields/8722700472575.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "Amora sauce caesar 1l", + "allergens" : "Œufs, Poisson, Lait", + "allergens_tags" : "en:eggs,en:fish,en:milk", + "brand_owner" : "", + "brands" : "Amora", + "brands_tags" : "amora", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "4.8", + "categories" : "Condiments, Sauces, Sauces salades, Sauces caesar, Epicerie", + "categories_tags" : "en:condiments,en:sauces,en:salad-dressings,en:caesar-sauces,fr:epicerie", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "8722700472575", + "conservation_conditions_fr" : "A conserver au sec, à l'abri de la lumière et à température ambiante (<25°C).Après ouverture, se conserve au réfrigérateur dans un délai de 1 mois.", + "countries" : "France", + "countries_tags" : "en:france", + "customer_service_fr" : "UNILEVER France Food Solutions Relation Consommateurs, Unilever France Food Solutions, 20 rue des Deux Gares 92842 Rueil-Malmaison Cedex", + "data_sources" : "App - yuka, Apps, Producers, Producer - unilever-france-rhd, Database - Equadis, Database - GDSN, Databases", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "273", + "energy-kj_unit" : "kJ", + "energy-kj_value" : "1137", + "energy_unit" : "kJ", + "energy_value" : "1137", + "fat_unit" : "g", + "fat_value" : "27", + "fiber_unit" : "g", + "fiber_value" : "0", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "Sauce Salade & Sandwich Caesar", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "Eau, huile de tournesol, vinaigre d'alcool, FROMAGE 3,2%, LAIT écrémé en poudre, jaune d'ŒUF de poules élevées en plein air 2,3%, ail 2,2%, amidon modifié de maïs, sel, jus de citron concentré, sucre, ANCHOIS 0,27%, conservateur : sorbate de potassium, épaississant : gomme xanthane, poivre noir, antioxydant : E385, sirop de sucre inverti, concentré de carthame. Peut contenir : sésame, moutarde.", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "Sans colorants artificiels, Sans exhausteur de goût", + "labels_tags" : "en:no-artificial-colors,en:no-flavour-enhancer", + "lc" : "fr", + "link" : "http://www-unileverfoodsolutions-com.s3.amazonaws.com/ext%2Fdownload%2Fmis%2Ffr%2F8_72270_047257_5_fr.pdf", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "1", + "off:ecoscore_data.adjustments.packaging.value" : "-10", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "11187", + "off:ecoscore_grade" : "d", + "off:ecoscore_score" : "34", + "off:nutriscore_grade" : "d", + "off:nutriscore_score" : "13", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "Plastique, Bouteille, en:test", + "packaging_tags" : "en:plastic,en:bottle,en:test", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "Bien agiter avant emploi.", + "producer_product_id" : "", + "producer_version_id" : "CU AM SLDDRE CAESAR 6X1L PBOT FR", + "product_name_de" : "", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "Amora Sauce caesar salade & sandwich bouteille 1L", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "2.8", + "quantity" : "1000 ml", + "salt_unit" : "g", + "salt_value" : "1.6", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "3.8", + "serving_size" : "30 ml (Portion)", + "sodium_unit" : "g", + "sodium_value" : "0.64", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "8711200996988", + "sources_fields:org-gs1:gpcCategoryCode" : "10000200", + "sources_fields:org-gs1:gpcCategoryName" : "Assaisonnements/Sauces Froides (Longue Conservation)", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "true", + "sources_fields:org-gs1:lastChangeDateTime" : "2022-01-12T19:08:58+01:00", + "sources_fields:org-gs1:partyName" : "UNILEVER FRANCE RHD", + "sources_fields:org-gs1:productionVariantDescription" : "CU AM SLDDRE CAESAR 6X1L PBOT FR", + "sources_fields:org-gs1:publicationDateTime" : "2022-01-12T19:08:58+01:00", + "stores" : "Intermarché", + "stores_tags" : "intermarche", + "sugars_unit" : "g", + "sugars_value" : "3.2", + "traces" : "Moutarde, Graines de sésame", + "traces_tags" : "en:mustard,en:sesame-seeds", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/export_more_fields/9002355004345.json b/t/expected_test_results/export_more_fields/9002355004345.json new file mode 100644 index 0000000000000..6f04f2bdd1255 --- /dev/null +++ b/t/expected_test_results/export_more_fields/9002355004345.json @@ -0,0 +1,134 @@ +{ + "abbreviated_product_name_en" : "", + "abbreviated_product_name_fr" : "", + "allergens" : "", + "allergens_tags" : "", + "brand_owner" : "", + "brands" : "Tiroler Früchteküche", + "brands_tags" : "tiroler-fruchtekuche", + "calcium_unit" : "", + "calcium_value" : "", + "carbohydrates_unit" : "g", + "carbohydrates_value" : "54", + "categories" : "Pflanzliche Lebensmittel und Getränke, Pflanzliche Lebensmittel, Frucht- und gemüsebasierte Lebensmittel, Brotaufstriche, Frühstücke, Fruchtbasierte Lebensmittel, Pflanzliche Brotaufstriche, Süße Brotaufstriche, Konfitüren und Marmeladen, Konfitüren", + "categories_tags" : "en:plant-based-foods-and-beverages,en:plant-based-foods,en:fruits-and-vegetables-based-foods,en:spreads,en:breakfasts,en:fruits-based-foods,en:plant-based-spreads,en:sweet-spreads,en:fruit-and-vegetable-preserves,en:jams", + "cholesterol_unit" : "", + "cholesterol_value" : "", + "code" : "9002355004345", + "conservation_conditions_fr" : "", + "countries" : "Frankreich, Deutschland", + "countries_tags" : "en:france,en:germany", + "customer_service_fr" : "", + "data_sources" : "App - yuka, Apps", + "emb_codes" : "", + "emb_codes_tags" : "", + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : "224", + "energy-kj_unit" : "", + "energy-kj_value" : "", + "energy_unit" : "kcal", + "energy_value" : "224", + "fat_unit" : "g", + "fat_value" : "0", + "fiber_unit" : "", + "fiber_value" : "", + "fruits-vegetables-nuts-estimate_unit" : "", + "fruits-vegetables-nuts-estimate_value" : "", + "generic_name_en" : "", + "generic_name_fr" : "", + "generic_name_pt" : "", + "ingredients_text_en" : "", + "ingredients_text_es" : "", + "ingredients_text_fr" : "", + "ingredients_text_pt" : "", + "iron_unit" : "", + "iron_value" : "", + "labels" : "", + "labels_tags" : "", + "lc" : "de", + "link" : "", + "manganese_unit" : "", + "manganese_value" : "", + "manufacturing_places" : "", + "manufacturing_places_tags" : "", + "monounsaturated-fat_unit" : "", + "monounsaturated-fat_value" : "", + "nutrition_data_per" : "100g", + "nutrition_data_prepared_per" : "100g", + "obsolete" : "0", + "off:ecoscore_data.adjustments.origins_of_ingredients.value" : "-5", + "off:ecoscore_data.adjustments.packaging.non_recyclable_and_non_biodegradable_materials" : "0", + "off:ecoscore_data.adjustments.packaging.value" : "-2", + "off:ecoscore_data.adjustments.production_system.value" : "0", + "off:ecoscore_data.adjustments.threatened_species.value" : "", + "off:ecoscore_data.agribalyse.code" : "31024", + "off:ecoscore_grade" : "c", + "off:ecoscore_score" : "43", + "off:nutriscore_grade" : "c", + "off:nutriscore_score" : "7", + "origin_fr" : "", + "origins" : "", + "origins_tags" : "", + "packaging" : "Glas", + "packaging_tags" : "en:glass", + "polyunsaturated-fat_unit" : "", + "polyunsaturated-fat_value" : "", + "potassium_unit" : "", + "potassium_value" : "", + "preparation_fr" : "", + "producer_product_id" : "", + "producer_version_id" : "", + "product_name_de" : "Tiroler Früchteküche Marillen", + "product_name_en" : "", + "product_name_es" : "", + "product_name_fr" : "", + "product_name_pt" : "", + "proteins_unit" : "g", + "proteins_value" : "0", + "quantity" : "420 g", + "salt_unit" : "g", + "salt_value" : "0", + "saturated-fat_unit" : "g", + "saturated-fat_value" : "0", + "serving_size" : "", + "sodium_unit" : "g", + "sodium_value" : "0", + "sources_fields:org-database-usda:available_date" : "", + "sources_fields:org-database-usda:fdc_category" : "", + "sources_fields:org-database-usda:fdc_data_source" : "", + "sources_fields:org-database-usda:fdc_id" : "", + "sources_fields:org-database-usda:modified_date" : "", + "sources_fields:org-database-usda:publication_date" : "", + "sources_fields:org-gs1:gln" : "", + "sources_fields:org-gs1:gpcCategoryCode" : "", + "sources_fields:org-gs1:gpcCategoryName" : "", + "sources_fields:org-gs1:isAllergenRelevantDataProvided" : "", + "sources_fields:org-gs1:lastChangeDateTime" : "", + "sources_fields:org-gs1:partyName" : "", + "sources_fields:org-gs1:productionVariantDescription" : "", + "sources_fields:org-gs1:publicationDateTime" : "", + "stores" : "", + "stores_tags" : "", + "sugars_unit" : "g", + "sugars_value" : "53", + "traces" : "", + "traces_tags" : "", + "trans-fat_unit" : "", + "trans-fat_value" : "", + "vitamin-a_unit" : "", + "vitamin-a_value" : "", + "vitamin-b12_unit" : "", + "vitamin-b12_value" : "", + "vitamin-b1_unit" : "", + "vitamin-b1_value" : "", + "vitamin-b2_unit" : "", + "vitamin-b2_value" : "", + "vitamin-b6_unit" : "", + "vitamin-b6_value" : "", + "vitamin-b9_unit" : "", + "vitamin-b9_value" : "", + "vitamin-c_unit" : "", + "vitamin-c_value" : "", + "vitamin-pp_unit" : "", + "vitamin-pp_value" : "" +} diff --git a/t/expected_test_results/ingredients/fi-do-not-match-myanmar.json b/t/expected_test_results/ingredients/fi-do-not-match-myanmar.json index 810e597365000..40cb5abde91ee 100644 --- a/t/expected_test_results/ingredients/fi-do-not-match-myanmar.json +++ b/t/expected_test_results/ingredients/fi-do-not-match-myanmar.json @@ -74,12 +74,12 @@ ], "ingredients_hierarchy" : [ "en:spice", - "en:condiment", + "en:condiment", "en:turmeric", "en:ginger", "en:spice-or-bell-pepper", "en:vegetable", - "en:bell-pepper", + "en:bell-pepper", "en:garlic", "en:root-vegetable", "en:coriander", @@ -104,12 +104,12 @@ "ingredients_percent_analysis" : 1, "ingredients_tags" : [ "en:spice", - "en:condiment", + "en:condiment", "en:turmeric", "en:ginger", "en:spice-or-bell-pepper", "en:vegetable", - "en:bell-pepper", + "en:bell-pepper", "en:garlic", "en:root-vegetable", "en:coriander", diff --git a/t/expected_test_results/ingredients/fr-epices-irradiees.json b/t/expected_test_results/ingredients/fr-epices-irradiees.json index 564e2c3d1ab41..b22bc2c600668 100644 --- a/t/expected_test_results/ingredients/fr-epices-irradiees.json +++ b/t/expected_test_results/ingredients/fr-epices-irradiees.json @@ -39,7 +39,7 @@ ], "ingredients_hierarchy" : [ "en:spice", - "en:condiment", + "en:condiment", "en:sesame", "en:seed", "en:thyme", @@ -57,8 +57,8 @@ ], "ingredients_percent_analysis" : 1, "ingredients_tags" : [ - "en:spice", - "en:condiment", + "en:spice", + "en:condiment", "en:sesame", "en:seed", "en:thyme", diff --git a/t/expected_test_results/recipes/fr-margherita-pizzas.fr-margherita-pizza-1.json b/t/expected_test_results/recipes/fr-margherita-pizzas.fr-margherita-pizza-1.json index a1303a5237afe..1e4eadf2f429f 100644 --- a/t/expected_test_results/recipes/fr-margherita-pizzas.fr-margherita-pizza-1.json +++ b/t/expected_test_results/recipes/fr-margherita-pizzas.fr-margherita-pizza-1.json @@ -126,7 +126,7 @@ "en:salt", "en:herb", "en:spice", - "en:condiment" + "en:condiment" ], "ingredients_n" : 9, "ingredients_n_tags" : [ @@ -166,7 +166,7 @@ "en:salt", "en:herb", "en:spice", - "en:condiment" + "en:condiment" ], "ingredients_text" : "Farine de blé*, purée de tomates* 26%, eau, mozzarella râpée* 17%, huile de tournesol*, levure, sel, plantes aromatiques*, épices*. Traces de poissons et fruits à coque. * Ingrédients issus de l'agriculture biologique.", "ingredients_with_specified_percent_n" : 2, diff --git a/t/export.t b/t/export.t new file mode 100644 index 0000000000000..ff52a4252b90b --- /dev/null +++ b/t/export.t @@ -0,0 +1,109 @@ +#!/usr/bin/perl -w + +# This test scripts: +# 1. import some products from a CSV file +# 2. exports the products with various options, and checks that we get the expected exports + +use Modern::Perl '2017'; +use utf8; + +use Test::More; +use Log::Any::Adapter 'TAP', filter => "info"; + +use ProductOpener::Products qw/:all/; +use ProductOpener::Tags qw/:all/; +use ProductOpener::PackagerCodes qw/:all/; +use ProductOpener::Import qw/:all/; +use ProductOpener::Export qw/:all/; +use ProductOpener::Config qw/:all/; +use ProductOpener::Packaging qw/:all/; +use ProductOpener::Ecoscore qw/:all/; +use ProductOpener::ForestFootprint qw/:all/; +use ProductOpener::Test qw/:all/; + +use File::Basename "dirname"; + +use Getopt::Long; +use JSON; + + +my $test_id = "export"; +my $test_dir = dirname(__FILE__); + +my $usage = < \$update_expected_results) + or die("Error in command line arguments.\n\n" . $usage); + +# Remove all products + +ProductOpener::Test::remove_all_products(); + +# Import test products + +init_emb_codes(); +init_packager_codes(); +init_geocode_addresses(); +init_packaging_taxonomies_regexps(); + +if ((defined $options{product_type}) and ($options{product_type} eq "food")) { + load_agribalyse_data(); + load_ecoscore_data(); + load_forest_footprint_data(); +} + +my $import_args_ref = { + user_id => "test", + csv_file => $test_dir . "/inputs/export/products.csv", + no_source => 1, +}; + +my $stats_ref = import_csv_file( $import_args_ref ); + +# Export products + +my $query_ref = {}; +my $separator = "\t"; + +# CSV export + +my $exported_csv_file = "/tmp/export.csv"; +open (my $exported_csv, ">:encoding(UTF-8)", $exported_csv_file) or die("Could not create $exported_csv_file: $!\n"); + +my $export_args_ref = {filehandle=>$exported_csv, separator=>$separator, query=>$query_ref, cc => "fr" }; + +export_csv($export_args_ref); + +close($exported_csv); + +ProductOpener::Test::compare_csv_file_to_expected_results($exported_csv_file, $test_dir . "/expected_test_results/export", $update_expected_results); + +# Export more fields + +$exported_csv_file = "/tmp/export_more_fields.csv"; +open ($exported_csv, ">:encoding(UTF-8)", $exported_csv_file) or die("Could not create $exported_csv_file: $!\n"); + +$export_args_ref->{filehandle} = $exported_csv; +$export_args_ref->{export_computed_fields} = 1; +$export_args_ref->{export_canonicalized_tags_fields} = 1; + +export_csv($export_args_ref); + +close($exported_csv); + +ProductOpener::Test::compare_csv_file_to_expected_results($exported_csv_file, $test_dir . "/expected_test_results/export_more_fields", $update_expected_results); + + +done_testing(); diff --git a/t/inputs/export/products.csv b/t/inputs/export/products.csv new file mode 100644 index 0000000000000..a724714dfde88 --- /dev/null +++ b/t/inputs/export/products.csv @@ -0,0 +1,29 @@ +code producer_product_id producer_version_id lc product_name_de product_name_en product_name_es product_name_fr product_name_pt abbreviated_product_name_en abbreviated_product_name_fr generic_name_en generic_name_fr generic_name_pt quantity serving_size packaging packaging_tags brands brands_tags brand_owner categories categories_tags labels labels_tags countries countries_tags stores stores_tags obsolete obsolete_since_date origins origins_tags manufacturing_places manufacturing_places_tags emb_codes emb_codes_tags ingredients_text_en ingredients_text_es ingredients_text_fr ingredients_text_pt allergens allergens_tags traces traces_tags nutrition_data_per nutrition_data_prepared_per energy-kj_value energy-kj_unit energy-kcal_value energy-kcal_unit fat_value fat_unit saturated-fat_value saturated-fat_unit carbohydrates_value carbohydrates_unit sugars_value sugars_unit fiber_value fiber_unit proteins_value proteins_unit salt_value salt_unit sodium_value sodium_unit energy_value energy_unit monounsaturated-fat_value monounsaturated-fat_unit polyunsaturated-fat_value polyunsaturated-fat_unit trans-fat_value trans-fat_unit cholesterol_value cholesterol_unit vitamin-a_value vitamin-a_unit vitamin-c_value vitamin-c_unit vitamin-b1_value vitamin-b1_unit vitamin-b2_value vitamin-b2_unit vitamin-pp_value vitamin-pp_unit vitamin-b6_value vitamin-b6_unit vitamin-b9_value vitamin-b9_unit vitamin-b12_value vitamin-b12_unit potassium_value potassium_unit calcium_value calcium_unit iron_value iron_unit manganese_value manganese_unit fruits-vegetables-nuts-estimate_value fruits-vegetables-nuts-estimate_unit conservation_conditions_fr preparation_fr customer_service_fr link off:nutriscore_grade off:nutriscore_score off:ecoscore_grade off:ecoscore_score off:ecoscore_data.agribalyse.code sources_fields:org-database-usda:available_date sources_fields:org-database-usda:fdc_category sources_fields:org-database-usda:fdc_data_source sources_fields:org-database-usda:fdc_id sources_fields:org-database-usda:modified_date sources_fields:org-database-usda:publication_date sources_fields:org-gs1:gln sources_fields:org-gs1:gpcCategoryCode sources_fields:org-gs1:gpcCategoryName sources_fields:org-gs1:isAllergenRelevantDataProvided sources_fields:org-gs1:lastChangeDateTime sources_fields:org-gs1:partyName sources_fields:org-gs1:productionVariantDescription sources_fields:org-gs1:publicationDateTime data_sources +3661344653573 fr Yaourt Crémeuh Café Les 2 vaches les-2-vaches Produits laitiers, Desserts, Desserts lactés, Crèmes dessert, Crèmes dessert café en:dairies,en:desserts,en:dairy-desserts,en:dessert-creams,en:coffee-custard-dessert Bio, Bio européen, Commerce équitable, FR-BIO-01, Max Havelaar, Nutriscore, Nutriscore C en:organic,en:eu-organic,en:fair-trade,en:fr-bio-01,en:max-havelaar,en:nutriscore,en:nutriscore-grade-c France en:france 0 FR 14.370.001 EC fr-14-370-001-ec Lait entier pasteurisé équitable (73,4%), sucre de canne'; équiltable (9,5%), crème'; équitable amidon* de mais, lait écrémé en poudre, cale'; lyophilise équitable (1,2%). ';Issu de l'agriculture biologique, Lait Origine France. Commerce équitable contrilé Fair For Life: 90.7% des ingrédients d'origine agricole. Café issu du commerce équitable certifié Fairtrade/Max Havelaar. 'poudre de lait origine France Meuglez-nous au 0 801 803 804 CERTI AGRIC FR 14.370.001 CE CRÊMEUH CAFE Lait en:milk 100g 100g 137 kcal 5 g 3,5 g 19,2 g 15 g 3,9 g 0,4 g 0,16 g 137 kcal c 6 unknown App - yuka, Apps, App - Open Food Facts +3564703999971 fr Huile d’olive Marque Repère marque-repere Matières grasses en:fats Bio en:organic France en:france Leclerc leclerc 0 HUILE D'OLIVE VIERGE EXTRA ISSUE DE L'AGRICULTURE BIOLOGIQUE - HUILE POUR FRITURE ET ASSAISONNEMENT - HUILE D'OLIVE DE CATÉGORIE SUPÉRIEURE OBTENUE DIRECTEMENT DES OLIVES ET UNIQUEMENT PAR DES PROCÉDÉS MÉCANIQUES TUNISIE 100g 100g 819 kcal 91 16 0 0 0 0 0 0 g 819 kcal d 12 unknown App - yuka, Apps +8722700472575 CU AM SLDDRE CAESAR 6X1L PBOT FR fr Amora Sauce caesar salade & sandwich bouteille 1L Amora sauce caesar 1l Sauce Salade & Sandwich Caesar 1000 ml 30 ml (Portion) Plastique, Bouteille, en:test en:plastic,en:bottle,en:test Amora amora Epicerie, Condiments, Sauces, Sauces salades, Sauces caesar, Assaisonnements en:groceries,en:condiments,en:sauces,en:salad-dressings,en:caesar-sauces,en:seasonings Sans colorants artificiels, Sans exhausteur de goût en:no-artificial-colors,en:no-flavour-enhancer France en:france Intermarché intermarche 0 Eau, huile de tournesol, vinaigre d'alcool, FROMAGE 3,2%, LAIT écrémé en poudre, jaune d'ŒUF de poules élevées en plein air 2,3%, ail 2,2%, amidon modifié de maïs, sel, jus de citron concentré, sucre, ANCHOIS 0,27%, conservateur : sorbate de potassium, épaississant : gomme xanthane, poivre noir, antioxydant : E385, sirop de sucre inverti, concentré de carthame. Peut contenir : sésame, moutarde. Œufs, Poisson, Lait en:eggs,en:fish,en:milk Moutarde, Graines de sésame en:mustard,en:sesame-seeds 100g 100g 1137 kJ 273 kcal 27 g 3,8 g 4,8 g 3,2 g 0 g 2,8 g 1,6 g 0,64 g 1137 kJ A conserver au sec, à l'abri de la lumière et à température ambiante (<25°C).Après ouverture, se conserve au réfrigérateur dans un délai de 1 mois. Bien agiter avant emploi. UNILEVER France Food Solutions Relation Consommateurs, Unilever France Food Solutions, 20 rue des Deux Gares 92842 Rueil-Malmaison Cedex http://www-unileverfoodsolutions-com.s3.amazonaws.com/ext%2Fdownload%2Fmis%2Ffr%2F8_72270_047257_5_fr.pdf d 13 d 29 11187 8711200996988 10000200 Assaisonnements/Sauces Froides (Longue Conservation) true 2022-01-12T19:08:58+01:00 UNILEVER FRANCE RHD CU AM SLDDRE CAESAR 6X1L PBOT FR 2022-01-12T19:08:58+01:00 App - yuka, Apps, Producers, Producer - unilever-france-rhd, Database - Equadis, Database - GDSN, Databases +5050083706622 fr Trésor goût Chocolat Noisettes Céréales fourrées chocolat noisette 400 g 30 g Carton en:cardboard Kellogg's, kellogs kellogg-s,kellogs Aliments et boissons à base de végétaux, Aliments d'origine végétale, Céréales et pommes de terre, Petit-déjeuners, Céréales et dérivés, Céréales pour petit-déjeuner, Céréales extrudées, Céréales au chocolat, Céréales fourrées en:plant-based-foods-and-beverages,en:plant-based-foods,en:cereals-and-potatoes,en:breakfasts,en:cereals-and-their-products,en:breakfast-cereals,en:extruded-cereals,en:chocolate-cereals,en:filled-cereals France en:france 0 Farines de céréales (Blé{26%}, Avoine complète{17%}, Riz{12%}), Fourrage Chocolat Noisettes (Sucre, Huiles végétaleles [Colza, Palme], Chocolat {4%}[Sucre, Pâte de cacao], Maltodextrine, Noisettes{2%),Cacao maigre en poudre, Petit-lait en poudre, lait écrémé en poudre, Émulsifiant([Lécithine de tournesol], Arôme naturel), Sucre, Sel, Colorant (Charoténoides, Rocou), Antioxydant (Palmitate d'ascorbyle, Alpha-tocophérol). Vitamines et Minéraux : Vitamines (niacine, B6, B2, Bl, acide folique, B12), Fer. Gluten, Lait, Fruits à coque en:gluten,en:milk,en:nuts Fruits à coque en:nuts 100g 100g 450 kcal 16 g 4 g 68 g 29 g 1 g 6,9 g 1,14 g 0,456 g 450 kcal 0,28 mg 0,35 mg 4 mg 0,35 mg 50 µg 0,63 µg 2,4 mg d 18 c 44 32135 App - yuka, Apps, App - Open Food Facts +3256220513173 fr Sirop de thé pêche Sirop de Thé Pêche 75 cl 200 ml Métal, Bidon en:metal,en:jug U u Boissons, Sirops, Boissons avec sucre ajouté en:beverages,en:syrups,en:sweetened-beverages Point Vert, Sans conservateurs, Transformé en France en:green-dot,en:no-preservatives,en:transformed-in-france France en:france Super U, Magasins U super-u,magasins-u 0 Sucre, jus de fruits à base de concentrés 40% (pêche 20%, citron), eau, arômes, acidifiant : acide citrique, colorants : lutéine et anthocyanes, stabilisant : E445. 100g 100g 1402 kJ 330 kcal 0,1 g 0,1 g 80 g 79 g 0,5 g 0,1 g 0,01 g 0,004 g 1402 kJ e 20 unknown Producer - Systeme U, Producers, App - yuka, Apps +3173990027337 fr FOURRÉS MYRTILLES France en:france 0 100g 100g 455 kcal 15 g 1,6 g 70 g 34 g 5,7 g 0,43 g 0,172 g 455 kcal unknown App - yuka, Apps +7804659650035 es Not mayo 12 g Notco notco Comestibles, Salsas, Mayonesas en:groceries,en:sauces,en:mayonnaises Vegetariano, Vegano en:vegetarian,en:vegan Chile, Francia, España en:chile,en:france,en:spain 0 "Aceite de canola, agua, garbanzos, lupino, semillas de mostaza, vinagre de uva, jugo de limón, sal, azúcar rubia, pimienta blanca, ajo en polvo, EDTA._x000D_ +_x000D_ +Ingredients list (English):_x000D_ +Canola Oil, Water, Garbanzo Beans, Lupin (bean), Mustard Seeds, Grape Vinegar, Lemon Juice, Salt, White Sugar, White Pepper, Garlic Powder, EDTA." Altramuces, Mostaza en:lupin,en:mustard 100g 100g 582 kcal 58 g 3 g 9,3 g 1 g 0 g 1 g 640 mg 256 mg 582 kcal 39 g 3 g d 11 d 29 11054 App - yuka, Apps +5410803950689 fr Sauce algérienne Sauce émulsionnée froide piquante aux oignons rôtis 500 ml Plastique, Flacon en:plastic,en:vial Halal maïza halal-maiza Epicerie, Sauces, Sauces algériennes en:groceries,en:sauces,en:algerian-sauces Halal en:halal France en:france 0 100g 100g 521 kcal 49,4 4,2 17,1 12,8 1,9 2,1 0,84 g 521 kcal e 21 unknown App - yuka, Apps +27096765 fr Lait crème 5x40g 40g Métal, Plastique, en:Recyclable Metals, Aluminium en:metal,en:plastic,en:recyclable-metals,en:aluminium château chateau Snacks, Snacks sucrés, Cacao et dérivés, Biscuits et gâteaux, Gâteaux, Chocolats, Chocolats au lait, Gâteaux au chocolat en:snacks,en:sweet-snacks,en:cocoa-and-its-products,en:biscuits-and-cakes,en:cakes,en:chocolates,en:milk-chocolates,en:chocolate-cakes Agriculture durable, en:UTZ Certified en:sustainable-farming,en:utz-certified Belgique, France en:belgium,en:france 0 sugar, cocoa butter, cream powder (milk) (15.9%), cocoa paste, whole milk powder (5.5%), skim milk powder, lactose, emulsifier: lecithin (soy), vanilla extract, sucre, beurre de cacao, crème en poudre (lait) (15,9%), pâte de cacao, lait entier en poudre (5,5%), lait écrémé en poudre, lactose, émulsifiant : lécithine (soja), extrait de vanille, Lait, Soja en:milk,en:soybeans Fruits à coque, Arachides en:nuts,en:peanuts 100g 100g 563 kcal 35 g 22 g 52 g 51 g 8 g 0,24 g 0,096 g 563 kcal e 28 d 30 23585 App - yuka, Apps, App - InFood +3270160503070 fr Oignons rouges émincés surgelés Oignons surgelés 450g Plastique, Surgelé en:plastic,en:frozen Picard picard Aliments et boissons à base de végétaux, Aliments d'origine végétale, Epicerie, Condiments, Aliments à base de fruits et de légumes, Plantes condimentaires, Surgelés, Légumes et dérivés, Aliments à base de plantes surgelés, Légumes surgelés en:plant-based-foods-and-beverages,en:plant-based-foods,en:groceries,en:condiments,en:fruits-and-vegetables-based-foods,en:culinary-plants,en:frozen-foods,en:vegetables-based-foods,en:frozen-plant-based-foods,en:frozen-vegetables France en:france Picard picard 0 France, Bénélux en:france,fr:benelux EMB 62863C emb-62863c Oignons rouges 100% 100g 100g 41 kcal 0,2 0,1 7,9 5,6 1,4 1,2 0,01 0,004 g 41 kcal a -5 unknown App - Yuka, Apps +3451790834080 29135200 fr UHT sterilised semi-skimmed milk enriched with vitamins B1, B2, B5, B12 and D - Long life Lait demi ecrémé Vitamin enriched milk Semi-skimmed milk Lait demi-écrémé stérilisé UHT enrichi en vitamines B1, B2, B5, B12 et D - longue conservation 1 l Plastique, Bouteille en Polyéthylène, Bouchon en polyéthylène, Opercule en matériau composite, Étiquette en papier en:plastic,fr:bouteille-en-polyethylene,fr:bouchon-en-polyethylene,fr:opercule-en-materiau-composite,fr:etiquette-en-papier Elle & Vire,Savencia, Elle&Vire International elle-vire,savencia,elle-vire-international Savencia Produits laitiers, Crèmes, Laits, Laits homogénéisés, Laits demi-écrémés, Laits UHT, Crèmes entières, Crèmes cuisson en:dairies,en:creams,en:milks,en:homogenized-milks,en:semi-skimmed-milks,en:uht-milks,fr:cremes-entieres,fr:cremes-cuisson Enrichi en vitamines, Fabriqué en France en:enriched-wih-vitamins,en:made-in-france France en:france Toutes enseignes GMS toutes-enseignes-gms 0 France en:france France, Somme france,somme FR 80.001.002 EC, FR 50.139.001 EC fr-80-001-002-ec,fr-50-139-001-ec Milk Leche _Lait_ demi-écrémé stérilisé UHT enrichi en vitamines B1, B2, B5, B12 et D. Leite Lait en:milk 100g 100g 193 kJ 46 kcal 1,55 g 1,1 g 4,8 g 4,8 g 0 g 3,2 g 0,13 g 0,052 g 193 kJ 120 mg 21,875 https://www.elle-et-vire.com/en/produits/lait/bouteilles/lait-demi-ecreme-vitamine-uht/ b 1 b 61 19041 App - yuka, Apps, Producers, Producer - elle-vire +3760178254021 fr Chocolat au lait France en:france 0 100g 100g 148 kcal 9,2 g 5,4 g 13 g 13 g 3,4 g 148 kcal unknown App - yuka, Apps +29161690 fr 100 % Almond Buter 227 g France en:france 0 100g 100g 635 kcal 54,9 g 5,4 g 27,6 g 3,4 g 21 g 635 kcal unknown App - yuka, Apps +3770013801303 fr Limonade Boissons, Boissons gazeuses, Sodas, Limonades en:beverages,en:carbonated-drinks,en:sodas,en:lemonade Bio en:organic France en:france 0 100g 100g 31,2 kcal 1 g 1 g 7,5 g 7,5 g 1 g 0,7 g 31,2 kcal not-applicable App - yuka, Apps +25000044984 en Simply lemonade Simply Lemonade 8 OZA (240 ml) The Minute Maid Company Beverages, Carbonated drinks, Sodas, Lemonade, Sweetened beverages en:beverages,en:carbonated-drinks,en:sodas,en:lemonade,en:sweetened-beverages France, United States en:france,en:united-states 0 Contains pure filtered water, lemon juice, cane sugar, natural flavors. CONTAINS PURE FILTERED WATER, LEMON JUICE, CANE SUGAR, NATURAL FLAVORS. 100g 100g 50 kcal 0 g 0 g 12,5 g 11,67 g 0 g 0,0159 g 0,00636 g 50 kcal e 15 not-applicable 2019-07-29T00:00:00Z Soda LI 678078 2019-07-29T00:00:00Z 2019-12-06T00:00:00Z App - yuka, Apps, Databases, database-usda, App - InFood +80650904 fr Olio aromatizzato funghi e tartufo France en:france 0 100g 100g unknown App - yuka, Apps +9002355004345 de Tiroler Früchteküche Marillen 420 g Glas en:glass Tiroler Früchteküche tiroler-fruchtekuche Pflanzliche Lebensmittel und Getränke, Pflanzliche Lebensmittel, Frucht- und gemüsebasierte Lebensmittel, Brotaufstriche, Frühstücke, Fruchtbasierte Lebensmittel, Pflanzliche Brotaufstriche, Süße Brotaufstriche, Konfitüren und Marmeladen, Konfitüren en:plant-based-foods-and-beverages,en:plant-based-foods,en:fruits-and-vegetables-based-foods,en:spreads,en:breakfasts,en:fruits-based-foods,en:plant-based-spreads,en:sweet-spreads,en:fruit-and-vegetable-preserves,en:jams Frankreich, Deutschland en:france,en:germany 0 100g 100g 224 kcal 0 g 0 g 54 g 53 g 0 g 0 g 0 g 224 kcal c 7 c 43 31024 App - yuka, Apps +26281742 en stawberry jam Strawberry conserve 500 g serving fr:bocal verre fr:bocal-verre GRANDESSA grandessa Plant-based foods and beverages, Plant-based foods, Spreads, Breakfasts, Plant-based spreads, Sweet spreads, Fruit and vegetable preserves en:plant-based-foods-and-beverages,en:plant-based-foods,en:spreads,en:breakfasts,en:plant-based-spreads,en:sweet-spreads,en:fruit-and-vegetable-preserves Made in Belgium en:made-in-belgium France en:france 0 made in belgium made-in-belgium Eggs, Milk en:eggs,en:milk serving 100g 171 kcal 0,1 g 0,1 g 9,9 g 9,9 g 0,1 g 2,54 g 1,016 g 171 kcal e 30 unknown App - yuka, Apps +3250392332105 fr Thon catalane Netto netto France en:france 0 100g 100g 84 kcal 3 g 0,2 g 4,1 g 4,1 g 8,9 g 1,1 g 0,44 g 84 kcal unknown App - yuka, Apps +3259330020135 en Tofu en flan Plant-based foods and beverages, Plant-based foods, Legumes and their products, Meat analogues, Tofu en:plant-based-foods-and-beverages,en:plant-based-foods,en:legumes-and-their-products,en:meat-analogues,en:tofu France en:france 0 Graines de soja sans OGM, eau, glucono delta lactone (E575) chlorure de calcium (E509), sulfate de calcium (E516) 100g 100g b 77 20904 App - yuka, Apps +5601009974337 pt Iogurte morango banana Iogurte Líquido Meio Gordo com sumo e polpa de morango (4,4%) e polpa de banana (1%). 170 g Plástico, HDPE - Polietileno de alta densidade en:plastic,en:hdpe-high-density-polyethylene Pingo Doce,Gelgurte pingo-doce,gelgurte Laticínios, Alimentos Fermentados, Produtos lácteos fermentados, Iogurtes en:dairies,en:fermented-foods,en:fermented-milk-products,en:yogurts França, Portugal en:france,en:portugal Pingo Doce pingo-doce 0 Portugal en:portugal Guarda,Portugal guarda,portugal PT ILT 39 EC pt-ilt-39-ec _Leite_ pasteurizado desnatado, _leite_ pasteurizado, açucar, sumo de morango reconstituído e polpa de morango, polpa de banana, _leite_ em pó magro, dextrose, aroma banana, aroma morango, corantes da fruta (antocianinas, beta-caroteno), amido de milho, espessantes (pectina amidada, goma xantana), fermentos lácticos, regulador de acidez (citrato trissódico), conservante da fruta (sorbato de potássio). Leite en:milk 100g 100g 78 kcal 1,4 g 0,9 g 13,7 g 11,1 g 0 g 2,7 g 0,1 g 0,04 g 78 kcal b 1 unknown App - yuka, Apps +77000001 fr Pâte à tartiner chocolat et noisettes 300 g Alex Olivier alex-olivier Produits à tartiner, Petit-déjeuners, Produits à tartiner sucrés, Pâtes à tartiner, Pâtes à tartiner aux noisettes, Pâtes à tartiner au chocolat, Pâtes à tartiner aux noisettes et au cacao en:spreads,en:breakfasts,en:sweet-spreads,fr:pates-a-tartiner,en:hazelnut-spreads,en:chocolate-spreads,en:cocoa-and-hazelnuts-spreads France en:france 0 100g 100g 49 d 20 31032 +8712423020221 fr The Tasty Decaf Unilever unilever France en:france 0 100g 100g 1 kcal 0 0 0 0 0 0 0 g 1 kcal unknown App - yuka, Apps +71464240608 en 100% fruit juice smoothie, green goodness Green goodness smoothie 8 OZA (240 ml) Bolthouse Farms bolthouse-farms Wm. Bolthouse Farms Inc. Plant-based foods and beverages, Beverages, Plant-based beverages en:plant-based-foods-and-beverages,en:beverages,en:plant-based-beverages France, United States en:france,en:united-states 0 Pineapple juice from concentrate (water, pineapple juice concentrate), apple juice from concentrate (water, apple juice concentrate), mango puree from concentrate (water, mango puree concentrate), banana puree, kiwi puree, spirulina powder, natural flavor, green tea extract, spinach powder, broccoli powder, barley grass powder, wheat grass powder, garlic powder, jerusalem artichoke powder, nova scotia dulse powder. 100g 100g 58 kcal 0 g 0 g 13,75 g 12,5 g 0,8 g 0,83 g 30 mg 12 mg 58 kcal 0 g 0 mg 417 IU 12,5 mg 0,071 mg 0,125 mg 0,62 µg 175 mg 17 mg 0,45 mg 1 mg e 18 unknown 2018-02-14T00:00:00Z Fruit & Vegetable Juice, Nectars & Fruit Drinks LI 653042 2018-02-14T00:00:00Z 2019-12-06T00:00:00Z App - yuka, Apps, Databases, database-usda +4083637 fr Lait concentré non sucré entier 410 g Régilait regilait Produits laitiers, Laits concentrés, Laits concentrés non sucrés, Laits entiers concentrés en:dairies,en:evaporated-milks,fr:laits-concentres-non-sucres,fr:laits-entiers-concentres Fabriqué en Allemagne en:made-in-germany France en:france 0 DE RP-25 EC de-rp-25-ec lait entier (origine UE), stabilisants : phosphates de sodium, carraghénanes Lait en:milk 100g 100g 132 kcal 7,5 g 5 g 10 g 10 g 6,1 g 0,25 g 0,1 g 132 kcal c 5 b 64 19026 App - yuka, Apps diff --git a/t/update_tests_results.sh b/t/update_tests_results.sh new file mode 100755 index 0000000000000..7e44764f8deef --- /dev/null +++ b/t/update_tests_results.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Update the expected results with the content of the actual results +# git diff can then be used to review the differences + +perl attributes.t --results expected_test_results/attributes/ +perl ecoscore.t --results expected_test_results/ecoscore/ +perl forest_footprint.t --results expected_test_results/forest_footprint/ +perl import_gs1.t --results expected_test_results/import_gs1/ +perl ingredients.t --results expected_test_results/ingredients/ +perl nutriscore.t --results expected_test_results/nutriscore/ +perl packaging.t --results expected_test_results/packaging/ +perl recipes.t --results expected_test_results/recipes/