bkmartinjr/#294 rest sort (#300)

REST API now requires that the server sort all dataframe responses by dimension index (var or obs index), allowing the client (front-end) to assume responses will be sorted. Given that the dataframe usually has a natural ordering, and the server gets to arbitrarily assign indices, this is the most computationally efficient design.

This PR includes changes to the REST API spec, and removing the explicit sort in the front-end code.
This commit is contained in:
Bruce Martin
2018-10-08 12:57:06 -07:00
committed by GitHub
parent 19f2728a18
commit a0aae2e266
2 changed files with 4 additions and 5 deletions
-1
View File
@@ -116,7 +116,6 @@ function RESTv02AnnotationsResponseToInternal(response) {
const keys = ["__index__", ...names];
return _(data)
.map(obs => _.zipObject(keys, obs))
.sortBy("__index__")
.value();
}