datasciencecampus / bus-metrics-england

Bus coverage and punctuality metrics for all public services across England
MIT License
5 stars 2 forks source link

9 class real time metrics #14

Closed daniel-coles-ons closed 8 months ago

daniel-coles-ons commented 9 months ago

Description

Added Schedule_builder class. Creates a 'punctuality' metric by comparing real time data against timetabled data.

Added tests for functions, work locally. Failing remote test INVESTIGATE.

Fixes #9

Motivation and Context

Provide a starting point for bus reliability metrics.

Type of change

How Has This Been Tested?

Tests added which pass locally.

Test configuration details:

Advice for reviewer

Checklist:

Additional comments

Test for real time processing fails remotely.

Edward-Jackson-ONS commented 9 months ago

I've committed quite a bit of time on debugging the tests and not got to the actual code. I'd like to spend more time on this. You'll see that I have branched off your PR to make suggestions as part of my review. It passes at the moment but I am skipping one test as referenced in my earlier comment.

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 63.68421% with 69 lines in your changes are missing coverage. Please review.

Project coverage is 66.45%. Comparing base (6ef26c2) to head (8ff0a03).

Files Patch % Lines
src/bus_metrics/aggregation/build_schedules.py 61.73% 44 Missing :warning:
src/bus_metrics/aggregation/preprocessing.py 65.71% 24 Missing :warning:
src/bus_metrics/setup/ingest_realtime_data.py 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #14 +/- ## =========================================== + Coverage 56.09% 66.45% +10.35% =========================================== Files 2 4 +2 Lines 123 310 +187 =========================================== + Hits 69 206 +137 - Misses 54 104 +50 ``` | [Flag](https://app.codecov.io/gh/datasciencecampus/bus-metrics-england/pull/14/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datasciencecampus) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/datasciencecampus/bus-metrics-england/pull/14/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datasciencecampus) | `66.45% <63.68%> (+10.35%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datasciencecampus#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.