Skip to content

Commit 8efa90a

Browse files
authored
fix: upgrade openfoodfacts sdk to fix bug with brands taxonomies (#1536)
To avoid having openfoodfacts/openfoodfacts-python#319 blocking robotoff workers.
1 parent aeae0fa commit 8efa90a

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ i18n-compile:
231231
# Note it's important to have --no-deps, to avoid launching a concurrent postgres instance
232232
${DOCKER_COMPOSE} run --rm --entrypoint bash --no-deps worker_1 -c "cd i18n && . compile.sh"
233233

234+
update_poetry_lock:
235+
@echo "🥫 Updating poetry.lock"
236+
${DOCKER_COMPOSE} run --rm --no-deps api poetry lock --no-update
237+
234238
unit-tests:
235239
@echo "🥫 Running tests …"
236240
# run tests in worker to have more memory

poetry.lock

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ lark = "~1.1.4"
7474
h5py = "~3.8.0"
7575
opencv-python-headless = "~4.10.0.84"
7676
toml = "~0.10.2"
77-
openfoodfacts = "2.5.0"
77+
openfoodfacts = "2.5.1"
7878
imagehash = "~4.3.1"
7979
peewee-migrate = "~1.12.2"
8080
diskcache = "~5.6.3"

tests/unit/test_taxonomy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
@pytest.mark.parametrize(
77
"taxonomy_type,value,expected",
88
[
9-
(TaxonomyType.brand.name, "carrefour-bio", "Carrefour Bio"),
9+
(TaxonomyType.brand.name, "carrefour-bio", "Carrefour BIO"),
10+
(TaxonomyType.brand.name, "turini", "Turini"),
1011
(TaxonomyType.brand.name, "unknown-brand", None),
1112
(TaxonomyType.label.name, "fr:bio-europeen", "en:eu-organic"),
1213
(

0 commit comments

Comments
 (0)