Resolve inconsistency between dplyr
and galah
implementations of collapse()
and compute()
#217
Labels
enhancement
New feature or request
As of version 2.0, you can use
collapse()
to convert adata_request
into aquery_set
. Aquery_set
often contains >1query
, with the finalquery
being the one requested by the user, and earlierquery
s being needed to check that it is valid. Finally, callingcompute()
evaluates thequery_set
into a single, valid URL:For occurrence queries, however,
compute()
is actually doing three things:This is not ideal, because it means that for occurrence queries, it is impossible to interrogate the URL before sending, or to see it once it has been sent. Fundamentally, this problem occurs because of a conflict between the principle that
collapse()
shouldn't ping an API, and the need ingalah
to run checks before building a URL. I see two possible solutions:collapse()
to not hit any APIs; thencollapse()
would always return a validquery
(or error if needed), but would also run checkscollapse()
andcompute()
(perhapsprecompute()
?) to build a single URL, but not push the request to the selected atlasMy instinct is that the former is neater, though it does change some behaviour from version 2.0. For context, this is what
dplyr
says about these functions:The text was updated successfully, but these errors were encountered: