Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Naruyoko committed Dec 25, 2023
2 parents 822bc31 + 2654a07 commit 383640e
Show file tree
Hide file tree
Showing 397 changed files with 22,559 additions and 3,986 deletions.
57 changes: 41 additions & 16 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,48 @@
"dockerComposeFile": [
"../docker-compose.yml",
"../docker/dev.yml",
"../docker/admin-uis.yml",
"../docker/vscode.yml"
"../docker/devcontainer.yml"
],
"containerUser": "root",
"capAdd": [
"SYS_PTRACE"
],
"securityOpt": [
"seccomp=unconfined"
],
"service": "backend",
"runServices": [
"memcached",
"postgres",
"mongodb",
"dynamicfront",
"frontend",
"incron",
"minion",
"redis"
],
"workspaceFolder": "/opt/product-opener",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"richterger.perl",
"d9705996.perl-toolbox",
"redhat.vscode-yaml",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"syler.sass-indented",
"mrorz.language-gettext"
]
}
},
"runArgs": ["-u", "vscode", "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
"extensions": [
"mortenhenriksen.perl-debug",
"d9705996.perl-toolbox",
"redhat.vscode-yaml",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"syler.sass-indented",
"mrorz.language-gettext",
"eg2.vscode-npm-script"
]
}
"features": {
"ghcr.io/devcontainers/features/git:1":{},
"ghcr.io/devcontainers/features/github-cli:1":{},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "libterm-readline-gnu-perl"
}
}
}
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ ROBOTOFF_URL=http://robotoff.openfoodfacts.localhost:5500 # connect to Robotoff
QUERY_URL=http://query:5510
EVENTS_URL=
FACETS_KP_URL = https://facets-kp.openfoodfacts.org/render-to-html
# use this to push products to openfoodfacts-search
# in dev: searchredis:6379 (with openfoodfacts-search running in docker in same network)
# we push updated products to Redis stream so that every service is notified
# when a product is updated/deleted/created
# use `redis:6379` locally if you want to enable Redis
REDIS_URL=
GOOGLE_CLOUD_VISION_API_KEY=
CROWDIN_PROJECT_IDENTIFIER=
Expand Down
60 changes: 33 additions & 27 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ MongoDB:
- scripts/checkmongodb.pl
- scripts/update_all_products_from_dir_in_mongodb.pl
- scripts/update_all_products_revisions_from_dir_in_mongodb.pl
- scripts/mongodb_dump.sh

Stores:
- taxonomies/unused/stores.txt
Expand All @@ -31,7 +32,7 @@ Stores:
- html/files/tagline-off-ios-v2.json
- html/files/tagline-off-android-v2.json

Taxonomies:
🧬 Taxonomies:
- taxonomies/**/*
- scripts/build_tags_taxonomy.pl
- scripts/test_taxonomies.pl
Expand All @@ -42,7 +43,7 @@ Taxonomies:
- scripts/add_descriptions_to_taxonomy_from_eu_translations.pl
- cgi/translate_taxonomy.pl

Taxonomies - Rebuild:
🧬 Taxonomies - Rebuild:
- taxonomies/additives.result.sto
- taxonomies/additives.result.txt
- taxonomies/allergens.result.sto
Expand All @@ -61,7 +62,7 @@ WikiData:
- scripts/build_languages_taxonomy_from_wikidata.pl
- scripts/create_wikipedia_properties_for_taxonomy.pl

Allergens:
🥜 Allergens:
- taxonomies/allergens.result.sto
- taxonomies/allergens.result.txt
- tests/unit/allergens.t
Expand Down Expand Up @@ -145,7 +146,7 @@ Icons:
CSS:
- scss/**/*

Translations:
🌐 Translations:
- po/**/*
- po/common/**/*
- po/openfoodfacts/**/*
Expand All @@ -166,7 +167,7 @@ Translations:
- t/**/*
- lib/ProductOpener/Test.pm

dependencies:
Dependencies:
- package.json
- package-lock.json

Expand All @@ -176,7 +177,7 @@ Template::Toolkit:
SCSS:
- scss/_footer.scss

footer:
Footer:
- html/images/illustrations/footer-orange.svg
- html/images/illustrations/footer-planet.svg
- scss/_footer.scss
Expand All @@ -186,8 +187,9 @@ footer:
- scripts/generate_perl_html_doc_from_pod.pl
- po/README.md

OpenAPI:
📚 OpenAPI:
- docs/assets/api-rapidoc.html
- docs/api/ref/schemas/product_base.yaml

🐋 Docker:
- docker/**/*
Expand All @@ -211,7 +213,7 @@ Attributes:
Display:
- lib/ProductOpener/Display.pm

Eco-Score:
🌱 Eco-Score:
- lib/ProductOpener/Ecoscore.pm
- ecoscore/**/*
- tests/unit/ecoscore.t
Expand Down Expand Up @@ -243,6 +245,7 @@ Agribalyse:
Export:
- lib/ProductOpener/Export.pm
- t/expected_test_results/export/**/*
- scripts/mongodb_dump.sh

Food.pm:
- lib/ProductOpener/Food.pm
Expand Down Expand Up @@ -277,12 +280,12 @@ GS1:
- scripts/convert_gs1_json_to_off_csv.pl
- scripts/convert_gs1_xml_to_json_in_dir.pl

data import:
Data import:
- lib/ProductOpener/Import.pm
- lib/ProductOpener/ImportConvert.pm
- scripts/convert_csv_file.pl

ingredients:
🥗 Ingredients:
- lib/ProductOpener/Ingredients.pm
- taxonomies/ingredients.txt
- tests/unit/ingredients.t
Expand All @@ -296,7 +299,7 @@ ingredients:
- tests/unit/ingredients_tags.t
- scripts/test_ingredient_parser.pl

ingredients analysis:
Ingredients analysis:
- templates/web/pages/product/includes/ingredients_analysis.tt.html
- templates/api/knowledge-panels/health/ingredients/ingredients_analysis_help.tt.json
- templates/api/knowledge-panels/health/ingredients/ingredients_analysis_details.tt.json
Expand All @@ -315,7 +318,7 @@ Labels:
Categories:
- taxonomies/categories.txt

📍 origins:
📍 Origins:
- taxonomies/origins.txt

📖 Knowledge panels:
Expand Down Expand Up @@ -365,7 +368,7 @@ Categories:
- tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels-fr.json
- docs/api/ref/schemas/knowledge_panels/**

serving size:
Serving size:
- templates/api/knowledge-panels/health/nutrition/serving_size.tt.json
- tests/unit/food_normalize_serving_size.t

Expand Down Expand Up @@ -396,7 +399,7 @@ Numbers:
🏭 Orgs:
- lib/ProductOpener/Orgs.pm

Packager Codes:
📍🏭 Packager Codes:
- lib/ProductOpener/PackagerCodes.pm
- tests/unit/packager_codes.t
- scripts/packager-codes/de-packagers-refresh.pl
Expand All @@ -410,6 +413,8 @@ Packager Codes:
- scripts/test_normalize_packaging_codes.pl
- scripts/update_emb_codes_in_mongodb.pl
- packager-codes/**
- tests/integration/expected_test_results/facets/packager-code_fr-85-222-003-ec.json
- tests/integration/expected_test_results/facets/packager-code_fr-85-222-003-ce.json

📦 Packaging:
- lib/ProductOpener/Packaging.pm
Expand Down Expand Up @@ -471,15 +476,15 @@ Packager Codes:
- scripts/remove_all_private_products_for_owner.pl
- scripts/gen_pro_users_emails_list.pl
- cgi/import_products_categories_from_public_database.pl
- scripts/agena3000/run_agena3000_import.sh
- scripts/imports/agena3000/run_agena3000_import.sh
- scripts/bayard-import/run_bayard_import.sh
- scripts/codeonline-import/run_codeonline_import.sh
- scripts/codeonline-import/split_gs1_codeonline_json.pl
- scripts/codeonline-import/stats_gs1_codeonline_json.pl
- scripts/equadis-import/run_equadis_import.sh

🏭 AGENA3000:
- scripts/agena3000/run_agena3000_import.sh
- scripts/imports/agena3000/run_agena3000_import.sh

🏭 Bayard:
- scripts/bayard-import/run_bayard_import.sh
Expand All @@ -492,11 +497,11 @@ Packager Codes:
🏭 EQUADIS:
- scripts/equadis-import/run_equadis_import.sh

store:
Store:
- lib/ProductOpener/Store.pm
- tests/unit/store.t

images:
🖼️ Images:
- lib/ProductOpener/Images.pm
- cgi/product_image_crop.pl
- cgi/product_image_move.pl
Expand Down Expand Up @@ -529,6 +534,7 @@ Web:
- html/donate/tt.html
- templates/web/common/includes/donate_banner.tt.html
- html/donate/fr.helloasso.html
- html/donate/en.html

✏️ Editing:
- templates/web/pages/product_edit/product_edit_form.tt.html
Expand All @@ -551,7 +557,7 @@ Product page:
- cgi/reset_password.pl
- cgi/reset_password_for_user.pl

Spellcheck:
✔︎ Spellcheck:
- templates/web/pages/spellcheck/spellcheck_test.tt.html
- scripts/test_spellchecker.pl
- cgi/spellcheck_test.pl
Expand Down Expand Up @@ -633,15 +639,15 @@ OCR:
Scanbot:
- scripts/scanbot.pl

Gamification:
🕹️ Gamification:
- lib/ProductOpener/Missions.pm
- lib/ProductOpener/MissionsConfig.pm
- scripts/compute_missions.pl
- scripts/compute_missions_for_user.pl
- scripts/export_battle_food.pl
- cgi/top_translators.pl

config:
Config:
- lib/ProductOpener/Config2_docker.pm
- lib/ProductOpener/Config2_sample.pm
- lib/ProductOpener/Config_off.pm
Expand Down Expand Up @@ -673,7 +679,7 @@ NOVA:
Vitamins:
- tests/unit/vitamins.t

checkbot:
Checkbot:
- scripts/checkbot.pl

👮 Moderation:
Expand All @@ -695,7 +701,7 @@ update all products:
- scripts/update_all_products_from_dir_in_mongodb.pl
- scripts/update_all_products_revisions_from_dir_in_mongodb.pl

exports:
Exports:
- scripts/extract_ingredients_test_set.pl
- scripts/extract_nutrition_images_and_crop_data.pl
- scripts/extract_nutrition_test_set.pl
Expand Down Expand Up @@ -724,7 +730,7 @@ exports:
- tests/integration/expected_test_results/api_cgi_suggest/categories-term-strawberry.json
- tests/integration/expected_test_results/api_cgi_suggest/no-tagtype.json

subdomains:
Subdomains:
- scripts/list_subdomains.pl

🧪 integration tests:
Expand All @@ -746,7 +752,7 @@ subdomains:
- tests/unit/templates.t
- tests/unit/text.t

multilingual products:
Multilingual products:
- cgi/product_jqm_multilingual.pl
- cgi/product_multilingual.pl
- html/js/product-multilingual.js
Expand Down Expand Up @@ -786,10 +792,10 @@ API WRITE:
monitoring:
- scripts/api_stats.pl

averages by categories:
Averages by categories:
- scripts/create_small_categories_nutriments_per_country_for_testing.pl

static content:
Static content:
- scripts/copy_text_files.pl

# TODO: find or create proper labels for those
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -50,4 +50,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
if: matrix.env == 'off-net'
run: |
# direct container access
echo "REDIS_URL=searchredis:6379" >> $GITHUB_ENV
echo "REDIS_URL=redis:6379" >> $GITHUB_ENV
echo "MONGODB_HOST=10.1.0.200" >> $GITHUB_ENV
echo "ROBOTOFF_URL=https://robotoff.openfoodfacts.net" >> $GITHUB_ENV
echo "QUERY_URL=http://10.1.0.200:5511" >> $GITHUB_ENV
Expand Down Expand Up @@ -269,7 +269,7 @@ jobs:
cd ${{ matrix.env }} && \
make prune
- uses: frankie567/[email protected]
- uses: basos9/[email protected]
if: ${{ always() }}
with:
apiHost: https://grafana.openfoodfacts.org
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Deploy API documentation to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.4.3
uses: JamesIves/github-pages-deploy-action@v4.5.0
# we only deploy on push to main
if: |
github.event_name == 'push' && github.event.ref == 'refs/heads/main'
Expand Down
Loading

0 comments on commit 383640e

Please sign in to comment.