Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COVID-19 API endpoints #2253

Merged
merged 22 commits into from
Apr 21, 2020
Merged

COVID-19 API endpoints #2253

merged 22 commits into from
Apr 21, 2020

Conversation

greenape
Copy link
Member

@greenape greenape commented Apr 2, 2020

I have:

  • Formatted any Python files with black
  • Brought the branch up to date with master
  • Added any relevant Github labels
  • Added tests for any new additions
  • Added or updated any relevant documentation
  • Added an Architectural Decision Record (ADR), if appropriate
  • Added an MPLv2 License Header if appropriate
  • Updated the Changelog

Description

Adds api endpoints for indicators in #2244

@greenape greenape added enhancement New feature or request FlowMachine Issues related to FlowMachine FlowAPI Issues related to the FlowKit API labels Apr 2, 2020
@cypress
Copy link

cypress bot commented Apr 2, 2020



Test summary

43 0 0 0


Run details

Project FlowAuth
Status Passed
Commit 5d0a623
Started Apr 21, 2020 11:56 AM
Ended Apr 21, 2020 11:58 AM
Duration 02:07 💡
OS Linux Debian - 8.11
Browser Electron 80

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #2253 into master will decrease coverage by 0.22%.
The diff coverage is 93.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2253      +/-   ##
==========================================
- Coverage   95.35%   95.13%   -0.23%     
==========================================
  Files         226      235       +9     
  Lines        8866     9019     +153     
  Branches      832      833       +1     
==========================================
+ Hits         8454     8580     +126     
- Misses        293      320      +27     
  Partials      119      119              
Flag Coverage Δ
#autoflow_unit_tests 92.91% <ø> (ø)
#flowapi_unit_tests 82.10% <ø> (ø)
#flowauth_unit_tests 94.75% <75.00%> (+0.01%) ⬆️
#flowclient_unit_tests 75.21% <ø> (ø)
#flowetl_unit_tests 100.00% <ø> (ø)
#flowkit_jwt_generator_unit_tests 100.00% <ø> (ø)
#flowmachine_unit_tests 91.44% <92.53%> (+0.09%) ⬆️
#integration_tests 71.14% <93.43%> (+1.27%) ⬆️
Impacted Files Coverage Δ
...features/location/redacted_unique_vistor_counts.py 90.47% <ø> (ø)
flowauth/backend/flowauth/servers.py 97.61% <75.00%> (+0.05%) ⬆️
...hine/core/server/query_schemas/unique_locations.py 75.00% <75.00%> (ø)
...erver/query_schemas/consecutive_trips_od_matrix.py 80.00% <80.00%> (ø)
...chine/core/server/query_schemas/trips_od_matrix.py 80.00% <80.00%> (ø)
...core/server/query_schemas/unique_visitor_counts.py 84.21% <84.21%> (ø)
...ery_schemas/active_at_reference_location_counts.py 85.71% <85.71%> (ø)
...y_schemas/unmoving_at_reference_location_counts.py 85.71% <85.71%> (ø)
...chine/core/server/query_schemas/unmoving_counts.py 88.88% <88.88%> (ø)
.../server/query_schemas/aggregate_network_objects.py 100.00% <100.00%> (ø)
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3b21c4...5d0a623. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #2253 into master will decrease coverage by 0.18%.
The diff coverage is 87.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2253      +/-   ##
==========================================
- Coverage   95.40%   95.22%   -0.19%     
==========================================
  Files         209      219      +10     
  Lines        8538     8727     +189     
  Branches      807      810       +3     
==========================================
+ Hits         8146     8310     +164     
- Misses        280      302      +22     
- Partials      112      115       +3     
Flag Coverage Δ
#autoflow_unit_tests 92.91% <ø> (ø)
#flowapi_unit_tests 82.10% <ø> (ø)
#flowauth_unit_tests 94.75% <75.00%> (+0.01%) ⬆️
#flowclient_unit_tests 77.67% <ø> (ø)
#flowetl_unit_tests 100.00% <ø> (ø)
#flowkit_jwt_generator_unit_tests 100.00% <ø> (ø)
#flowmachine_unit_tests 91.15% <87.24%> (-0.15%) ⬇️
#integration_tests 71.02% <69.89%> (-0.07%) ⬇️
Impacted Files Coverage Δ
flowmachine/flowmachine/features/location/flows.py 94.59% <ø> (ø)
...hine/features/location/redacted_location_metric.py 100.00% <ø> (ø)
...hine/core/server/query_schemas/unique_locations.py 72.00% <72.00%> (ø)
flowauth/backend/flowauth/servers.py 97.61% <75.00%> (+0.05%) ⬆️
...core/server/query_schemas/unique_visitor_counts.py 78.94% <78.94%> (ø)
...rver/query_schemas/active_at_reference_location.py 80.00% <80.00%> (ø)
...ery_schemas/active_at_reference_location_counts.py 82.35% <82.35%> (ø)
...machine/features/location/unique_visitor_counts.py 90.00% <90.00%> (ø)
...features/location/redacted_unique_vistor_counts.py 90.47% <90.47%> (ø)
...eatures/subscriber/active_at_reference_location.py 90.47% <90.47%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adbb6f1...8e49c53. Read the comment docs.

Copy link
Member

@jc-harrison jc-harrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small comments, but this looks good.

*,
aggregation_unit,
subscriber_subset=None,
sampling=None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to have a 'sampling' parameter? It's not used anywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same for TripsODMatrixExposed)

-------
Query
"""
# Note we're not using the redacted version here, because the two composing queries are redacted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reflecting on this, I think RedactedUniqueVisitorCounts should redact after subtracting active residents from unique subscribers, because otherwise a region with 17 unique subscribers, 16 of whom are active residents, will return 1 unique visitor.

On the other hand, one could separately calculate unique_subscriber_counts and active_at_reference_location_counts and do the subtraction outside of FlowKit, so redacting UniqueVisitorCounts wouldn't help. I'm not sure how to get around that.

Copy link
Member

@jc-harrison jc-harrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(My previous comment was meant to be an approval)

@greenape greenape added the ready-to-merge Label indicating a PR is OK to automerge label Apr 21, 2020
@mergify mergify bot merged commit 305448b into master Apr 21, 2020
@mergify mergify bot deleted the indicator-api branch April 21, 2020 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FlowAPI Issues related to the FlowKit API FlowMachine Issues related to FlowMachine ready-to-merge Label indicating a PR is OK to automerge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants