ANIALLATOR114 / SimplyTransport

SimplyTransport - API - Website - Ingesting and presenting Transport Information
https://simplytransport.ie
Apache License 2.0
2 stars 3 forks source link

Change statistic sorting #136

Closed ANIALLATOR114 closed 1 month ago

ANIALLATOR114 commented 1 month ago

Summary by Sourcery

Update the statistics sorting method to sort by value instead of percentage across various statistics endpoints.

Enhancements:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request updates the sorting logic in the statistics service and its usage in the controllers. The primary change involves renaming the sort_stats_by_percentage method to sort_stats_by_value and modifying the sorting key from percentage to value. Corresponding changes were made in the controllers to use the updated method.

File-Level Changes

Files Changes
SimplyTransport/controllers/stats.py
SimplyTransport/domain/services/statistics_service.py
Updated sorting logic to use value instead of percentage across multiple functions and methods.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.