Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coverage Point Calculator Integration with mobile-verifier (#830)
* include coverage point calculator in mobile-verifier * derive Debug for nested types will help with the switchover * CoveragePoints uses CoveragePoint2 internally This makes coverage points async internally. When cleanup is done there will be a single instance of CoveragePoints. * add coverage map to compute rank * unignore mobile verifier integration tests * update with rename SubscriberThreshold -> RadioThreshold thresholds being met for a radio are not only about subscribers. * filter for boosted hexes during report generation It's the responsibility of the report to only include hexes with active boost values * calculator uses hex_assignments crate * clean values for reports * Start adding coverage-map in mobile-verifier Keep disctinction between SignalLevel in coverage and coverage-map, this way coverage-map doesn't need to bring in sqlx as a dependency * break out coverage map for drop in replacement testing * Remove coverage map trait * use RankedCoverage from coverage-map * Skip a radio for rewards if it cannot be constructed properly rewards should never fail. but we can skip a radio and have an alert that says something went wrong. * use new coverage_map for testing * bring up to date with coverage-point-calculator * remove unused fields now that coverage-map is stabilized * remove innner coverage map wrapper * rename after move from unwrapping * lift coverage points one more time * starting to conslidate radio information into single map * total coverage points is now provided pre-truncated * simplify coverage points to use only radio_infos * hotspot_points no longer needs to be &mut self * clean up trust_score construction and long types Move zipping trust scores with their distances to heartbeatreward. Leave I put the use statements above where they are in the function because the names of the types kind of overlap with the names used in the mobile verifier, and I wanted to make it extra clear to anyone reading, this function is transforming those values into calculator types. * name test function more explicitly * DateTime<Utc> implements Copy, no need to Clone * remove need for cloning radio_info we can clone the speed_tests and trust_scores as they enter the calculator, but everything else can work with a reference for much longer. * Remove replaced coverage point code * rename coverage points constructor The constructor no longer tries to calculate points, it collects information about radios and coverage. All the pointing happens in into_rewards. * remove async where possible from CoveragePoints * remove unneccessary `this` binding * Rename CoveragePoints -> CoverageShares This matches with the other reward structs `MapperShares`, `ServiceProviderShares`. And reflects more that we're talking about `reward_shares`, where `coverage_points` is starting to mean points provided towards shares relating only to coverage (excluding backhaul (speedtests)). * remove unneeded derive for debug * remove location trust score calculation This all lives in the coverage-point-calculator now * rename to differentiate argument from local bindings * construct coverage map inside block scope We can insert coverage objects directly after iterating over them, radio_info only needs to know if the radio `is_indoor`. Moving that binding to the top helps hint that it's set by something in the block and returned. And we don't need to carry around covered_hexes for any longer than necessary. * function call now small enough to inline * rename coverage variables to match with struct * handle potential lack of speedtest for radio
- Loading branch information