Skip to content

DataCollection.abstract and DataCollection.concept_id should be attributes not methods #999

Description

@andypbarrett

earthaccess.results.DataCollection has abstract, concept_id, and attribute-type information as methods. I suggest that it is more intuitive that this information is stored as attributes.

In [31]: result = earthaccess.search_datasets(keyword="sea ice")

In [32]: len(result)
Out[32]: 780

cloud_hosted is an attribute, which seems intuitive.

In [33]: result[0].cloud_hosted
Out[33]: False

But concept_id, abstract, and summary are all methods are not. Trying to access them as an attribute dumps the entire DataCollection object because of missing the ().

In [34]: result[0].concept_id()
Out[34]: 'C2564625052-NSIDC_ECS'

I suggest, the intuitive access is

In[]: result[0].concept_id
Out[]: 'C2564625052-NSIDC_ECS'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementUse this label for requests for new features or improvements to existing functionalities.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions