SciQLop / speasy

Space Physics made EASY! A simple Python package to deal with main Space Physics WebServices (CDA,SSC,AMDA,..)
Other
24 stars 7 forks source link

The type of is_public should be boolean and not str #67

Closed menouarazib closed 1 year ago

menouarazib commented 1 year ago

Description

speasy/webservices/amda/ws.py line 44:
collection[xmlid].is_public

The type of is_public should be boolean and not str. In my case I have user_parameter and _is_user_prod returns always False because of this condition return not collection[xmlid].is_public then I checked the type of is_public and I found that it is a str and not boolean.

What I Did

spz.amda.get_data(amda_list_user_parameters[0],
                                           start_time, end_time)
jeandet commented 1 year ago

@menouarazib, Ok I found the root cause, there are two implementations of "is_public" one which is right here and the faulty one you spotted. In the mean time, you can use this:

In [8]: spz.amda.get_user_parameter(spz.amda.list_user_parameters()[0], "2018-01-01", "2018-01-01T01")
Out[8]: <speasy.products.variable.SpeasyVariable at 0x7fd4f8267d00>