-
Notifications
You must be signed in to change notification settings - Fork 67
feat: support geo_values (single geo_type) #237
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
Conversation
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.
Everything builds, tests pass, just added note so we don't forget about partial-failures when we fix #195
r = fetch(['11111', '55555']) | ||
self.assertEqual(r['message'], 'success') | ||
self.assertEqual(r['epidata'], [counties[0]]) |
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 is probably the right choice (silently omit bogus geo values from the response) but we should revisit it when we figure out deletion encoding. One of the goals of deletion encoding is to start giving better feedback about "you asked for a bogus county" vs "that information was withheld for privacy reasons", and an error on parts of a query might have to be treated carefully.
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 think it behaves the same way for all kind of parameters that are not existing, e.g., if you specify a wrong data source you just get no results back but it doesn't throw an error. That is the current nature of just generating a where clause
// the wildcard query should return data for all locations in `geo_type` | ||
$condition_geo_value = 'TRUE'; | ||
} else if (is_array($geo_values)) { | ||
// return data for multiple location | ||
$condition_geo_value = filter_strings('t.`geo_value`', $geo_values); | ||
} else { | ||
// return data for a particular location |
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.
If a '*'
is present in the list will it be interpreted literally (matching geo_values
that are '*'
)?
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.
atm. yes, there is the clear distinction see PR comment about the variants
closes #221 (single geo type only for now)
add support for
geo_values
.valid variants:
geo_value=*
geo_value=CA
geo_values=CA,NY