-
Notifications
You must be signed in to change notification settings - Fork 37
feat#79: comprehensive analytics #84
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi boss @augustin-v a lovely implementation, thanks a lot for your contribution we really appreciate, Just need a few improvement; firstly I will love you to implement functions to track individual user performance over time, and also implement historical data aggregation per user. secondly, considering that results are returned in insertion order only, can you implement sorting capabilities. I noticed that only basic vote counting cache was implemented, can you implement comprehensive caching for complex queries, Can you also provide aggregation of participation trends, popular genres, etc. this is because there is a missing platform-wide analysis
so there is no overflow protection when adding vote weights. can you fix this
with unwrap(), let’s use a proper error handling. Just using unwrap() could cause panic, consider using expect('').
Thanks for you help. I do really appreciate |
|
Hello @augustin-v been waiting for your responds |
|
Hi @CollinsC1O thanks for the review! |
2097a63 to
9743674
Compare
|
Hey @CollinsC1O, I've addressed most of the points in the updated changes, sorry it took a bit longer than I expected. Here's a quick summary:
Let me know if this covers everything or if I missed something, I'll be on it right away |
|
Hello @augustin-v can you resolve the conflict pls |
9743674 to
a56bbf2
Compare
Hi @CollinsC1O |
|
hello @augustin-v can you use scarb fmt to format your code |
Related issue: #79
Description
This PR implements sophisticated query functions that enable efficient data retrieval and analytics for the Season and Audition contract. The implementation addresses the lack of filtering and query capabilities that made it difficult to build rich user interfaces and provide meaningful insights.
Features
Storage:
season_count,audition_count) for efficient iterationall_season_ids,all_audition_ids) for ordered accessaudition_vote_counts,performer_total_weights) for fast lookupsNew Query Functions:
get_seasons_by_genre(),get_auditions_by_genre()get_active_auditions(),get_auditions_in_time_range()get_auditions_by_season()get_audition_vote_count(),get_total_vote_weight_for_performer()get_seasons_by_ids(),get_auditions_by_ids()get_auditions_by_criteria()is_audition_active(),get_audition_status(),count_votes_for_audition()Updated Core Functions:
create_season()to maintain count and ID trackingcreate_audition()to maintain count and ID trackingrecord_vote()to update analytics cacheTesting
Comprehensive test suite covering:
Breaking Changes
None. All existing functionality remains unchanged. New functions are additive only.
The query system provides a solid foundation for building sophisticated dApps on top of the Season and Audition contract.