-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: add support for downloading obsolete product dump in ProductDataset #281
feat: add support for downloading obsolete product dump in ProductDataset #281
Conversation
Tested locally, it works !
|
openfoodfacts/types.py
Outdated
@@ -870,6 +870,7 @@ def check_user_agent(self): | |||
class DatasetType(str, enum.Enum): | |||
csv = "csv" | |||
jsonl = "jsonl" | |||
obsolete = "obsolete" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically, its a jsonl
type.. so maybe rename to obsolete_jsonl
instead ?
I'll let @raphael0202 decide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather add an obsolete
parameter to the function that having a new dataset type. It does not really make sense here to add obsolete
as dataset type, as dataset type currently indicates the export format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i also think an additional parameter is more logical.
1 possible issue : it currently only applies to the off
flavor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the implementation to use an obsolete
parameter instead of adding a new DatasetType. Please review the changes! @raphael0202
Thanks
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
Description
Currently, the ProductDataset class does not support downloading the obsolete product dump. This feature allows users to access the obsolete product data from Open Food Facts.
Solution
Added support for downloading the obsolete product dump in ProductDataset. Introduced a new DatasetType.obsolete and updated relevant functions to handle this dataset.
Related issue(s)