Skip to content

Commit dfe56b3

Browse files
committed
add taxonomies for obf, opff & opf
1 parent 610d3ee commit dfe56b3

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/openfoodfacts/taxonomy.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,32 @@
6969
)
7070
+ "/data/taxonomies/other_nutritional_substances.full.json",
7171
},
72-
Flavor.obf: {},
73-
Flavor.opff: {},
74-
Flavor.opf: {},
72+
Flavor.obf: {
73+
TaxonomyType.category: URLBuilder.static(Flavor.opf, Environment.org)
74+
+ "/data/taxonomies/categories.full.json",
75+
TaxonomyType.ingredient: URLBuilder.static(Flavor.off, Environment.org)
76+
+ "/data/taxonomies/ingredients.full.json",
77+
TaxonomyType.label: URLBuilder.static(Flavor.off, Environment.org)
78+
+ "/data/taxonomies/labels.full.json",
79+
TaxonomyType.brand: URLBuilder.static(Flavor.off, Environment.org)
80+
+ "/data/taxonomies/brands.full.json",
81+
TaxonomyType.allergen: URLBuilder.static(Flavor.off, Environment.org)
82+
+ "/data/taxonomies/allergens.full.json",
83+
},
84+
Flavor.opff: {
85+
TaxonomyType.category: URLBuilder.static(Flavor.opf, Environment.org)
86+
+ "/data/taxonomies/categories.full.json",
87+
TaxonomyType.ingredient: URLBuilder.static(Flavor.off, Environment.org)
88+
+ "/data/taxonomies/ingredients.full.json",
89+
},
90+
Flavor.opf: {
91+
TaxonomyType.category: URLBuilder.static(Flavor.opf, Environment.org)
92+
+ "/data/taxonomies/categories.full.json",
93+
TaxonomyType.label: URLBuilder.static(Flavor.off, Environment.org)
94+
+ "/data/taxonomies/labels.full.json",
95+
TaxonomyType.brand: URLBuilder.static(Flavor.opf, Environment.org)
96+
+ "/data/taxonomies/brands.full.json",
97+
},
7598
}
7699

77100

0 commit comments

Comments
 (0)