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

feat: 978 - new prices features (thumbnails, stats) #982

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

monsieurtanuki
Copy link
Contributor

@monsieurtanuki monsieurtanuki commented Oct 4, 2024

What

  • New "total stats" endpoint
  • Thumbnails for proofs
  • New count fields for location, product, user
  • New SHOP_IMPORT proof type

Fixes bug(s)

Files

New files:

  • price_total_stats.dart: Total stats for Prices.
  • price_total_stats.g.dart: generated

Impacted files:

  • api_get_product_test.dart: unrelated minor fix
  • api_prices_test.dart: added test for the new getStats method; added test for thumbnails
  • location.dart: added new count fields
  • location.g.dart: generated
  • open_prices_api_client.dart: new method getStats
  • openfoodfacts.dart: exported new file price_total_stats.dart
  • price_product.dart: added new count fields
  • price_product.g.dart: generated
  • price_user.dart: added new count fields
  • price_user.g.dart: generated
  • proof.dart: added thumbnail field and getter
  • proof.g.dart: generated
  • proof_type.dart: added new "SHOP_IMPORT" value

New file:
* `price_total_stats.dart`: Total stats for Prices.

Impacted files:
* `api_get_product_test.dart`: unrelated minor fix
* `api_prices_test.dart`: added test for the new `getStats` method; added test for thumbnails
* `location.dart`: added new count fields
* `location.g.dart`: generated
* `open_prices_api_client.dart`: new method `getStats`
* `openfoodfacts.dart`: exported new file `price_total_stats.dart`
* `price_product.dart`: added new count fields
* `price_product.g.dart`: generated
* `price_user.dart`: added new count fields
* `price_user.g.dart`: generated
* `proof.dart`: added thumbnail field and getter
* `proof.g.dart`: generated
* `proof_type.dart`: added new "SHOP_IMPORT" value
@teolemon teolemon requested a review from raphodn October 4, 2024 09:07
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 76.80000% with 29 lines in your changes missing coverage. Please review.

Project coverage is 72.66%. Comparing base (820d145) to head (a04dfb7).
Report is 62 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/prices/price_total_stats.g.dart 57.89% 16 Missing ⚠️
lib/src/prices/location.g.dart 57.14% 3 Missing ⚠️
lib/src/prices/price_product.g.dart 57.14% 3 Missing ⚠️
lib/src/prices/price_user.g.dart 57.14% 3 Missing ⚠️
lib/src/prices/price_total_stats.dart 60.00% 2 Missing ⚠️
lib/src/open_prices_api_client.dart 87.50% 1 Missing ⚠️
lib/src/prices/proof.g.dart 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #982      +/-   ##
==========================================
- Coverage   76.34%   72.66%   -3.69%     
==========================================
  Files         239      253      +14     
  Lines        8494     9303     +809     
==========================================
+ Hits         6485     6760     +275     
- Misses       2009     2543     +534     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@monsieurtanuki monsieurtanuki merged commit b007587 into openfoodfacts:master Oct 4, 2024
4 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

New prices features (thumbnails, stats, counts)
3 participants