openPMD / openPMD-validator

:ballot_box_with_check: Validator and Example Scripts
ISC License
4 stars 8 forks source link

test_attr: user-friendly type list #51

Closed ax3l closed 4 years ago

ax3l commented 4 years ago

Checking the allowed types for attributes such as timeOffset gave a sub-optimal user-hint of the form:

Error: Attribute timeOffset in `/data/0/particles/electron/positionOffset`
is not of type '<map object at 0x11aa73050>' (is 'str')!`

Let's concat the types properly to

Error: Attribute timeOffset in `/data/0/particles/electron/positionOffset`
is not of type 'float32' or 'float64' (is 'str')!

Thanks for the report, @rfbird! :sparkles: