Skip to content

test_attr: user-friendly type list#51

Merged
ax3l merged 1 commit intoopenPMD:1.1.Xfrom
ax3l:fix-userErrorMessageTypeList
Nov 6, 2019
Merged

test_attr: user-friendly type list#51
ax3l merged 1 commit intoopenPMD:1.1.Xfrom
ax3l:fix-userErrorMessageTypeList

Conversation

@ax3l
Copy link
Copy Markdown
Member

@ax3l ax3l commented Nov 5, 2019

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! ✨

Checking the allowed types for attributes such as `timeOffset` gave
a suboptimal user-hint of the form:
```
Error: Attribute timeOffset in /data/0/particles/electron/positionOffset`
is not of type '<map object at 0x11aa73050>' (is 'float32')!`
```

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! ✨
@ax3l ax3l merged commit 05f7fa9 into openPMD:1.1.X Nov 6, 2019
@ax3l ax3l deleted the fix-userErrorMessageTypeList branch November 6, 2019 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants