earthaccess icon indicating copy to clipboard operation
earthaccess copied to clipboard

`search_data` & `search_datasets` documentation parameter list is incomplete

Open mfisher87 opened this issue 2 years ago • 8 comments

Currently, kwargs are passed from search_data to a DataGranules object's parameters method, which also accepts kwargs. The possible keys are fixed by the methods on DataGranules, and populated dynamically by matching keys to method names.

https://github.com/nsidc/earthaccess/blob/ff0c59a79003df67265dfbfec8c51e1921739a18/earthaccess/api.py#L116-L119

The same technique is used for both data & dataset search functions.

However, the interface is untyped and the documentation is generated from a hand-maintained docstring. I feel we should move towards fully typing the interface and generating the docs from the annotations. Python's type system feels like a toy at times like this. How do we ensure that a DataGranules method exists for each parameter on the search_data interface? Maybe we should instead collect the parameter methods in a dict? Just thinking out loud.

mfisher87 avatar Nov 09 '23 15:11 mfisher87

I am currently working on updating the earthaccess docs. My focus is on the "Getting Started", "User Guide" and "How Tos". I can think about how we can do this as part of my doc work, so I'll assign it to myself. But it seems like this API documentation might be automated, I will need to learn about this.

andypbarrett avatar Nov 09 '23 20:11 andypbarrett

Hi, i have the same difficulties. I wanted to download AST L1T data and download it with a filter based on cloud coverage. Is it possible to print a dataframe with the dates and specifications such as Day/ night and cloud coverage? Thanks in advance

paolodep36 avatar Nov 15 '23 11:11 paolodep36

Hey @paolodep36, thanks for posting your question! Is there a specific parameter you're expecting to see in the docs for search_data()? If not, let's move your question to another place so we can focus on it better:

  • If you think you have a bug on your hands (or would like to request a new feature), can you please open a new issue?

  • If you're looking for more general support (i.e. you aren't sure whether you found a bug or need help), can you please post on our Q&A discussion board?

MattF-NSIDC avatar Nov 15 '23 17:11 MattF-NSIDC

More confusion that I think comes from this docs problem: https://github.com/nsidc/earthaccess/discussions/478

In this case the undocumented parameter was point.

mfisher87 avatar Mar 01 '24 19:03 mfisher87

More pain for our users: https://github.com/nsidc/earthaccess/issues/504#issuecomment-2026873110

I'm going to pin this.

mfisher87 avatar Mar 30 '24 23:03 mfisher87