Skip to content
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

search_data & search_datasets documentation parameter list is incomplete #345

Open
mfisher87 opened this issue Nov 9, 2023 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@mfisher87
Copy link
Member

mfisher87 commented Nov 9, 2023

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.

if earthaccess.__auth__.authenticated:
query = DataGranules(earthaccess.__auth__).parameters(**kwargs)
else:
query = DataGranules().parameters(**kwargs)

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 mfisher87 changed the title search_data documentation includes cloud_hosted parameter in example, but not in parameter list search_data documentation parameter list is incomplete Nov 9, 2023
@mfisher87 mfisher87 added the documentation Improvements or additions to documentation label Nov 9, 2023
@andypbarrett
Copy link
Collaborator

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 andypbarrett self-assigned this Nov 9, 2023
@paolodep36
Copy link

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
Copy link
Member

MattF-NSIDC commented Nov 15, 2023

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?

@mfisher87
Copy link
Member Author

mfisher87 commented Mar 1, 2024

More confusion that I think comes from this docs problem: #478

In this case the undocumented parameter was point.

@mfisher87
Copy link
Member Author

More pain for our users: #504 (comment)

I'm going to pin this.

@mfisher87 mfisher87 pinned this issue Mar 30, 2024
@mfisher87 mfisher87 changed the title search_data documentation parameter list is incomplete search_data & search_datasets documentation parameter list is incomplete Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: 🆕 New
Development

No branches or pull requests

4 participants