-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XDMF Scripts: Fix Replacements & Offset #2309
XDMF Scripts: Fix Replacements & Offset #2309
Conversation
Fix the particle offset naming since the introduction of openPMD and fix missing ".format()" replacements with multi-line strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I would recommend a plus sign to combine strings, but that is optional.
Your name is missing in the license header, please indicate wether you want to add it or leave it as it is. I will merge after your decision.
node_text = "/Xdmf/Domain/Grid/{}Attribute[@Name='{}']/" + \ | ||
"DataItem[1]".format(extra_grid, orig_name) | ||
node_text = ("/Xdmf/Domain/Grid/{}Attribute[@Name='{}']/" | ||
"DataItem[1]").format(extra_grid, orig_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OPTIONAL:
A plus sign +
is optional here but would improve readability of the code to emphasize that here the second string is attached.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not add it since it is superfluous like additional brackets.
the way it is now is the common way to do it properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
Fix the particle offset naming since the introduction of openPMD and fix missing
.format()
replacements with multi-line strings.The latter issue was introduces with #2145, the former with release
0.2.0
.