Add queries to narrow results #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
added queries to hkl routes so that scan results can be narrowed by angle bounds, as in Irakli's example code
Currently in the latest release of the app, most hkl get routes return a large number of results, which must then be filtered by the client to be beamline specific. What this PR attempts to do is add query methods which allow a narrowing of results by angle constraints.
Some key notes: there is a bit of code repetition due to this that I'm not happy with. Maybe I need to write a wrapper around the functions I want to do this with - all of the relevant methods have exactly the same check for the query parameters to be valid, for example.
Additionally, I've introduced a wrapper to turn my synchronous functions into asynchronous ones. This probably shouldn't have been in this PR, however it was bugging me.