-
Notifications
You must be signed in to change notification settings - Fork 11
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
x-bte operations: replace BioThings list_filter
with jmespath
#733
Comments
Note: saw post on jmespath design in the JQ stuff, the info may be helpful here. In particular, there's a link to a function's doc string (which may be helpful for understanding what to do for jmespath): https://github.com/biothings/biothings.api/blob/7b83617c40c2f12513a7db6842e5d14adf694039/biothings/web/query/formatter.py#L400 |
jmespath
in BioThings x-bte annotation?jmespath
/ JQ "filtering"
Rohan mentioned in this post (a reply to this comment) and starting here that JQ may be able to do similar behavior. My impression is that:
But we'd need more discussion before deciding how to proceed + what we want to cover with this issue |
jmespath
/ JQ "filtering"jmespath
/ JQ "filtering"
@colleenXu that sounds like a good plan to proceed. |
jmespath
/ JQ "filtering"list_filter
with jmespath
Narrowing the scope of this issue to just replacing |
Note: jmespath seems to be like list_filter, where the fields being acted upon must be included in the initial response (using the parameters.fields). See internal Slack discussion here
|
There's only 1 API/situation where we are using Progress so far:
Example query without the jmespath param set
|
Done updating all current operations to use filter/jmespath. (1 operation, rest of operations, merging/adding new chem -> gene operations) Going to open a different issue to track writing reverse operations (have a possible way to do it). There's also a separate issue for chem-gene data that doesn't have the action_type field #904 |
I've heard that
jmespath
should be used in replacement oflist_filter
for BioThings API querying (internal lab Slack thread). At the moment,list_filter
behavior is still working and @newgene said a switch-over was not urgent.However, to do this replacement / use
jmespath
moving forward, I'd need to review the documentation. I have some links here (some are internal lab slack threads):I'm not sure if there is other documentation / info out there, or other info I'd need to adjust existing x-bte annotation and use this going forward...
list_filter
was used for biothings/pending.api#101, and was considered part of biothings/pending.api#100 and biothings/mychem.info#153.I had asked about an enhancement / update to
list_filter
: biothings/pending.api#101 (comment) and this internal lab slack thread and was told thatjmespath
could potentially address this...The text was updated successfully, but these errors were encountered: