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

Flowmachine unique location count #979

Merged
merged 17 commits into from
Jun 26, 2019
Merged

Conversation

BhavinPanch
Copy link
Contributor

@BhavinPanch BhavinPanch commented Jun 25, 2019

Closes #949

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

Unique location count was added to FlowAPI's joined_spatial_aggregate endpoint.

Copy link
Member

@greenape greenape left a comment

Choose a reason for hiding this comment

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

Couple of tweaks, otherwise this looks good. Thanks!



def unique_location_counts(
*, start_date, end_date, aggregation_unit, subscriber_subset=None
Copy link
Member

Choose a reason for hiding this comment

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

These need to be type annotated.

@@ -134,13 +134,13 @@ def _make_query(self):
get_columns_for_level(self.ul.level, self.ul.column_name)
)
sql = """
Copy link
Member

Choose a reason for hiding this comment

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

Can we change this to an f-string while we're here?

@greenape greenape added enhancement New feature or request FlowClient Issues related to FlowClient FlowMachine Issues related to FlowMachine labels Jun 25, 2019
@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #979 into master will increase coverage by 0.02%.
The diff coverage is 93.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #979      +/-   ##
==========================================
+ Coverage   93.33%   93.36%   +0.02%     
==========================================
  Files         136      137       +1     
  Lines        6861     6892      +31     
  Branches      697      699       +2     
==========================================
+ Hits         6404     6435      +31     
+ Misses        333      332       -1     
- Partials      124      125       +1
Flag Coverage Δ
#flowapi_unit_tests 77.27% <50%> (-0.64%) ⬇️
#flowauth_unit_tests 94.86% <ø> (ø) ⬆️
#flowclient_unit_tests 82.29% <50%> (-0.32%) ⬇️
#flowetl_unit_tests 100% <ø> (ø) ⬆️
#flowkit_jwt_generator_unit_tests 100% <ø> (ø) ⬆️
#flowmachine_unit_tests 91.06% <76%> (-0.08%) ⬇️
#integration_tests 60.16% <93.93%> (+0.31%) ⬆️
Impacted Files Coverage Δ
...e/server/query_schemas/joined_spatial_aggregate.py 100% <100%> (ø) ⬆️
flowclient/flowclient/client.py 93.77% <100%> (+0.06%) ⬆️
...ore/server/query_schemas/unique_location_counts.py 100% <100%> (ø)
...hine/features/subscriber/unique_location_counts.py 100% <100%> (ø) ⬆️
flowapi/flowapi/user_model.py 95.23% <66.66%> (-2.2%) ⬇️
...owmachine/features/utilities/spatial_aggregates.py 96.29% <0%> (+3.7%) ⬆️

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 99d5406...67be84f. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #979 into master will increase coverage by 26.35%.
The diff coverage is 94.11%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #979       +/-   ##
===========================================
+ Coverage   67.01%   93.36%   +26.35%     
===========================================
  Files         136      137        +1     
  Lines        6861     6892       +31     
  Branches      697      699        +2     
===========================================
+ Hits         4598     6435     +1837     
+ Misses       2109      332     -1777     
+ Partials      154      125       -29
Flag Coverage Δ
#flowapi_unit_tests 77.27% <50%> (-0.64%) ⬇️
#flowauth_unit_tests 94.86% <ø> (ø) ⬆️
#flowclient_unit_tests 82.29% <50%> (-0.32%) ⬇️
#flowetl_unit_tests 100% <ø> (ø) ⬆️
#flowkit_jwt_generator_unit_tests 100% <ø> (ø) ⬆️
#flowmachine_unit_tests 91.06% <76.92%> (?)
#integration_tests 60.2% <94.11%> (+0.31%) ⬆️
Impacted Files Coverage Δ
...e/server/query_schemas/joined_spatial_aggregate.py 100% <100%> (ø) ⬆️
flowclient/flowclient/client.py 93.77% <100%> (+0.06%) ⬆️
...ore/server/query_schemas/unique_location_counts.py 100% <100%> (ø)
...hine/features/subscriber/unique_location_counts.py 100% <100%> (+37.5%) ⬆️
flowapi/flowapi/user_model.py 95.23% <66.66%> (-2.2%) ⬇️
flowmachine/flowmachine/core/sqlalchemy_utils.py 73.68% <0%> (+2.63%) ⬆️
.../flowmachine/features/subscriber/daily_location.py 88.88% <0%> (+5.55%) ⬆️
...ne/core/server/query_schemas/base_exposed_query.py 93.75% <0%> (+6.25%) ⬆️
flowmachine/flowmachine/core/server/server.py 87.34% <0%> (+6.32%) ⬆️
... and 81 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 76d5864...cc54a8b. Read the comment docs.

@greenape greenape added the ready-to-merge Label indicating a PR is OK to automerge label Jun 26, 2019
@mergify mergify bot merged commit 37ae591 into master Jun 26, 2019
@mergify mergify bot deleted the flowmachine-unique-location-count branch June 26, 2019 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FlowClient Issues related to FlowClient 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.

Expose UniqueLocationCounts via api
2 participants