ANIALLATOR114 / SimplyTransport

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

Statistics creation and service #131

Closed ANIALLATOR114 closed 2 months ago

ANIALLATOR114 commented 2 months ago

Initial groundwork for statistics.

Ability to generate statistics. Template placeholders. Migration.

Summary by Sourcery

This pull request introduces the ability to generate and display various statistics related to the database. It includes a new CLI command for generating statistics, a new web endpoint for viewing them, and the necessary backend services and repositories to support these features. Additionally, it includes a database migration to create a new table for storing statistics and updates the application version.

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request introduces the initial groundwork for generating and displaying statistics within the SimplyTransport application. It includes the implementation of a new statistics service, database migrations to support the new statistics table, and updates to the CLI and web interface to generate and display these statistics.

File-Level Changes

Files Changes
SimplyTransport/domain/database_statistics/repo.py
SimplyTransport/domain/services/statistics_service.py
SimplyTransport/domain/database_statistics/model.py
SimplyTransport/domain/database_statistics/statistic_type.py
SimplyTransport/domain/database_statistics/__init__.py
Implemented the core functionality for generating and managing database statistics, including repository, service, model, and enumeration definitions.
SimplyTransport/templates/stats/index.html
SimplyTransport/templates/stats/operator_data.html
SimplyTransport/templates/stats/static_data.html
SimplyTransport/templates/stats/stop_features_data.html
Added new templates for displaying statistics on the web interface.

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.