-
Notifications
You must be signed in to change notification settings - Fork 31
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
query args order #31
Comments
I'm fine with it. I definitely templated on QueryEngine and had no logical reason for the order. I personally try and use named args whenever I use it so that it doesn't matter. |
Cool, I'll submit a PR soon. |
Great. I think we should switch. I personally use named args every time only because I want to put criteria first. :) I might get time for this after pre-workshop stuff, but if anyone wants to tackle this with a PR, self-assign this issue. I'll de-assign @shyamd now. |
well played, @montoyjh... I should have refreshed the page before submitting that comment. :) |
I know that we've discussed this at least once before, but I think we should reconsider the argument order for criteria and properties for Store.query and Store.query_one. I think criteria should be first and properties should be second. As far as I can tell, the main reason we have properties first is because QueryEngine used to, and as far as I can tell no one who is building dbs for MP using maggma has much experience with or love for QueryEngine.
Basically, I want to be able to teach people how to use maggma by appealing to their knowledge of the MPRester query (or if they've got experience with pymongo, pymongo.Collections.find) by saying "this is basically the same as those things", rather than "this is the same as those things, except the argument order is reversed to keep in line with some other thing we used a long time ago".
The text was updated successfully, but these errors were encountered: