Open
Description
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
.
Describe alternatives you've considered
- Converting any
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
Activity