You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The documentation of Hazard and Impact states that the event_name attribute is supposed to be a list of strings. However, this is never enforced within the code base. In particular, some unit tests actually check if "mixed-type" lists work. In #894, we decided that
a write method should not proceed if event_name contains other values than strings
a read method should warn if event_name is not stored as strings and try to convert the values to strings.
Describe the solution you'd like
Apply the above decisions to all readers and writers of Hazard and Impact.
peanutfun
changed the title
Ensure proper handling of event_name attribute in Hazard and Impact.
Ensure proper handling of event_name attribute in Hazard and ImpactJul 9, 2024
Is your feature request related to a problem? Please describe.
The documentation of
Hazard
andImpact
states that theevent_name
attribute is supposed to be a list of strings. However, this is never enforced within the code base. In particular, some unit tests actually check if "mixed-type" lists work. In #894, we decided thatevent_name
contains other values than stringsevent_name
is not stored as strings and try to convert the values to strings.Describe the solution you'd like
Apply the above decisions to all readers and writers of
Hazard
andImpact
.Describe alternatives you've considered
event_name
values to strings before writing might lead to nonsense, see Explicitly convertevent_name
to strings inImpact.from_hdf5
#894 (comment). Therefore, writing non-stringevent_name
values should fail.Additional context
None
The text was updated successfully, but these errors were encountered: