nsidc / earthaccess

Python Library for NASA Earthdata APIs
https://earthaccess.readthedocs.io/
MIT License
372 stars 70 forks source link

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

Open mfisher87 opened 8 months ago

mfisher87 commented 8 months ago

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.

andypbarrett commented 8 months ago

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.

paolodep36 commented 7 months ago

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

MattF-NSIDC commented 7 months ago

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:

mfisher87 commented 4 months ago

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 commented 3 months ago

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

I'm going to pin this.