Skip to content
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

New table to store challenge configuration #691

Closed
raphodn opened this issue Jan 26, 2025 · 2 comments · Fixed by #758 or #759
Closed

New table to store challenge configuration #691

raphodn opened this issue Jan 26, 2025 · 2 comments · Fixed by #758 or #759

Comments

@raphodn
Copy link
Member

raphodn commented Jan 26, 2025

What

After launching the first challenge in the frontend, and if we wish to launch more challenges in the future, then we need to start storing the data in the backend.

Related issues & discussions

@TTalex
Copy link
Collaborator

TTalex commented Feb 15, 2025

What needs to be stored for UI

  • challenge_id (Autoincrement)
  • state ("Upcoming", "Currently Running", "Archived". To filter which ones to display by default or hide)
  • title (example: "Nutella")
  • icon (example: "🌰", could be part of title)
  • subtitle (example: "(and other hazelnut spreads)", could be part of title)
  • startDate (example: "2025-01-20")
  • endDate (example: "2025-02-20")
  • categories (example: ["en:hazelnut-spreads"])
  • exampleProofUrl (example: "https://prices.openfoodfacts.org/img/0029/nCWeCVnpQJ.webp")

Bonus at the end of challenge

  • Rankings, top contributors according to
    • Overall pictures uploaded
    • Price tags photographed
    • Prices added
  • Stats
    • Total number of prices added (could be computed on the fly, as currently done on frontend)
    • Total number of pictures (could be computed on the fly, as currently done on frontend)
    • Total number of contributors
  • Reuses/articles links
  • Source (I guess it could be interesting to keep track of where the challenge idea came from, if it was linked to an event like OFF Days for example)

@raphodn raphodn changed the title New model to store challenge configuration New Django model to store challenge configuration Feb 23, 2025
@raphodn raphodn changed the title New Django model to store challenge configuration New table to store challenge configuration Feb 23, 2025
@github-actions github-actions bot added the ⭐ top issue Top issue. label Mar 6, 2025
@raphodn raphodn added the 🎯 P0 label Mar 8, 2025
@raphodn
Copy link
Member Author

raphodn commented Mar 12, 2025

generate a flat parquet file from the data generated during the challenge (with OFF full product data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
3 participants