-
Notifications
You must be signed in to change notification settings - Fork 4
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
GTC-2904: Datamart Endpoint #590
base: develop
Are you sure you want to change the base?
Conversation
60f3899
to
27eb115
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #590 +/- ##
===========================================
- Coverage 81.18% 80.79% -0.40%
===========================================
Files 129 133 +4
Lines 5842 5952 +110
===========================================
+ Hits 4743 4809 +66
- Misses 1099 1143 +44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
27eb115
to
eb8a674
Compare
eb8a674
to
6a6d58e
Compare
|
||
class Gadm(str, Enum): | ||
ISO = "iso" | ||
ADM0 = "adm0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems confusing - adm0 and ISO are the same, right? Should you eliminate one of them (probably ADM0), or add a comment on why you have both of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I was never happy with that, either. I think I remember it having something to do with the existing query params (interface) that made it clunky. I'll see what I can do. Thanks for the review!
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Coarse-grained vs. Fine-grained Services (Endpoints)
API clients must know how to use the fine-grained endpoints (query, etc) to query datasets with tedious SQL. This is great when you are doing ad-hoc work, but once a client settles on and becomes dependent on specific queries, a more coarse-grained endpoint should be created to serve their needs. This Thoughtworks article explains the spirit of what a coarse-grained endpoint should be trying to accomplish.
Issue Number: GTC-2904
What is the new behavior?
This PoC introduces the concept of organized services that are ready for consumption by various clients without needing to know the intricacies of our DB schema. The organization is inspired by Flagship's map navigation:
Testing
You can hit this endpoint using cURL:
An example response:
Does this introduce a breaking change?
Other information
Flagship Integration
The client of this endpoint can be reviewed in this Flagship PR. It demonstrates how much business logic will be removed by embracing a coarse-grained approach.