Analytics service is now refactored
Created by: IIaKyJIuH
In the refactoring process of the service, the first step was to walk through the code of the service and try to type it so to get some understanding on what's going on there. Then, we would create a bunch of tests to obtain current resulting states and afterwards use them to match answers from the refactored version. At last, the service itself was written in "pythonic" way, i.e. using list/dict comprehensions, standard functions, and trying not to repeat ourselves.
Only two files are relevant:
- app/api/analytics/service.py
- test/unit/test_analytics_service.py