Return a Results class from search and query methods - #1298
Conversation
|
I will automatically update this comment whenever this PR is modified
|
eb932d5 to
78dcc49
Compare
Results class from search and query methods
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com>
78dcc49 to
6b3f8cc
Compare
Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
I don't think this is an API we should commit to, we want to move towards exposing a query object. The _query attribute is also private right now because we want to think through what the query object itself should look like before exposing as a public API.
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com>
Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Trey Stafford <19692879+trey-stafford@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com> Co-authored-by: Jessica Scheick <11756442+JessicaS11@users.noreply.github.com> Co-authored-by: Joseph H Kennedy <7882693+jhkennedy@users.noreply.github.com> Co-authored-by: Julia Lober <72712672+julober@users.noreply.github.com>
I don't think this is an API we should commit to, we want to move towards exposing a query object. The _query attribute is also private right now because we want to think through what the query object itself should look like before exposing as a public API.
dff6214 to
2cde854
Compare
|
Discussed during earthaccess community call today:
|
Co-authored-by: Matt Fisher <mfisher87@users.noreply.github.com> Co-authored-by: Trey Stafford <trey-stafford@users.noreply.github.com> Co-authored-by: Andy Barrett <andypbarrett@users.noreply.github.com> Co-authored-by: Jessica Scheick <JessicaS11@users.noreply.github.com>
* Add init method for base class * Replace `len` calls with `query.hits` in anticipation of generator approach * Update preview/repr methods also in an anticipation of generator approach
…ss into results-object
|
Sorry I couldn't make it to this breakout discussion today -- got totally engrossed in the plugin discussion.
We started this with the intention of moving towards a more object-oriented API (#1250 and described in the "what's next" section of Note: we included the query parameters and options for provenance, but the expectation is that they'd be used by the client when doing searches. That part, I think, is a bit clunky still; we kicked around a full provenance type object but didn't settle on anything.
This is addressed by my comments above. The benefit of sub-classing list is that it's the least breaking change for eathaccess (it already just returns a list).
I could be convinced of this, but I'm not sure it's necessary. Generally, I want user's to be able to use the results -- inculding combining multiple searches into one, etc. That all can be done with an imutable object, so I don't think they are contradictory, but I'd need to think more about the tradeoffs between the two.
makes sense to me.
Yes, human-readable column names would be ideal, but maybe not necessary for a MVP. @mfisher87 what do you think? |
Co-authored-by: Matt Fisher <mfisher87@users.noreply.github.com>
Description
Left to do:
Resultsclass iterableTODOcomments to issues, clean up those commentsto_gdf"Ready for review" checklist
Merge checklist
closes #1)CHANGELOG.mdupdatedREADME.mdupdatedpre-commit.ci autofixif pre-commit is failing)📚 Documentation preview 📚: https://earthaccess--1298.org.readthedocs.build/en/1298/