Open VaiTon opened 4 years ago
Right now obf, opff and opf taxonomies are very messy. I guess they aren't even loaded.
Tags.pm is what deals with taxonomies in Product Opener and in retrieve_tags_taxonomy() we only load open food facts taxonomies: https://github.com/openfoodfacts/openfoodfacts-server/blob/f4774d12cf833c3a94b408e91f4561d767f851de/lib/ProductOpener/Tags.pm#L1577
Tags.pm
retrieve_tags_taxonomy()
We should make rearrange the directory structure like this:
taxonomies |-- openfoodfacts | |-- labels.txt | +-- etc... |-- openbeautyfacts | |-- labels.txt | +-- etc... |-- openpetfoodfacts | |-- labels.txt | +-- etc... |-- openproductfacts | |-- labels.txt | +-- etc... |-- labels.common.txt |-- categories.common.txt +-- ....common.txt
And then, when we build taxonomies, we should combine common taxonomies with site-specific ones and put them in a dir like taxonomies/openfoodfacts/build.
taxonomies/openfoodfacts/build
Then at software startup only relevant taxonomies would be loaded.
Stale issue message
Issue
Right now obf, opff and opf taxonomies are very messy. I guess they aren't even loaded.
Tags.pm
is what deals with taxonomies in Product Opener and inretrieve_tags_taxonomy()
we only load open food facts taxonomies: https://github.com/openfoodfacts/openfoodfacts-server/blob/f4774d12cf833c3a94b408e91f4561d767f851de/lib/ProductOpener/Tags.pm#L1577Proposal
We should make rearrange the directory structure like this:
And then, when we build taxonomies, we should combine common taxonomies with site-specific ones and put them in a dir like
taxonomies/openfoodfacts/build
.Then at software startup only relevant taxonomies would be loaded.