-
-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor product/ingredient import #1666
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows to properly update them during imports. Currently, we were using the code field for OFF products but e.g. USDA products have their own id
Closed
Also, add some error handling for missing folders, urls, etc.
rolandgeider
force-pushed
the
feature/import-usda-products
branch
from
May 20, 2024 14:20
662b38a
to
53230ac
Compare
…sda-products # Conflicts: # wger/nutrition/management/commands/import-off-products.py
Now it is possible to import the OFF dumps or delta files directly from the JSONL files, without needing to import them to mongoDB
rolandgeider
changed the title
Add USDA product import
Refactor product/ingredient import
May 22, 2024
2 tasks
This can run automatically once per day if configured
This is specially important if we regularly import the delta files, since these can have bad quality. We will probably need to add a bit more before putting this live
…nto feature/import-usda-products # Conflicts: # wger/nutrition/off.py
Also, make sure just rename the field and don't accidentally nuke the fibre field ;)
rolandgeider
force-pushed
the
feature/import-usda-products
branch
from
May 22, 2024 14:47
3408cc4
to
234cef4
Compare
Needed because the change of "fibres" to "fiber"
This reverts commit e3214eb.
rolandgeider
force-pushed
the
feature/import-usda-products
branch
from
May 23, 2024 17:03
9e8b555
to
88af124
Compare
Ingredients / products will only be imported through automatic processes. We should just point users in case of missing products to Open Food Facts, and not handle this on our side. Admins can still add entries if they want.
🙇♂️ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Other questions
(e.g. database migration)?
Yes, db migration