-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update/add show functions VTK objects #61
Conversation
Updated show functions for the following objects: VTKFile, VTKDataArray, PVTKFile, PVDFile, VTKData, PVTKData, and PVTKDataArray.
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.
Thanks! I don't know why our CI tests fail...
I fixed the CI issues in #61 |
Could you please run the formatter? import Pkg; Pkg.activate(temp = true); Pkg.add(name = "JuliaFormatter", version = v"1.0.45"); using JuliaFormatter; format(".") |
@ranocha I've added the test you requested and ran the formatter, let me know if you think it needs anything else! |
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.
Thanks 🙂
The following pull request updates and adds
show
methods for various VTK objects, following this issue: #60Updated and added methods are given for the following objects:
VTKFile
,VTKDataArray
,PVTKFile
,PVDFile
,VTKData
,PVTKData
, andPVTKDataArray
.Where possible, I have tried to copy the style of the original
show
method defined forVTKFile
objects.The following subsections show a comparison of the original
show
output verses the proposed newshow
output (generated from files in the test suite).VTKFile
objectsOriginal output
Proposed new output
Notes
The proposed changes are only slightly different than the current implementation. The only difference is using the
repr
representation for thevtk_file.version::VersionNumber
.VTKDataArray
objectsOriginal output
Proposed new output
Notes
The new
show
method lists the parametric types associated with the object, listing the data type encoding, the size of the second dimension, and the encodingformat. It also lists the other data fields, with a shortened expression for the
vtk_filefield (shortened similarly to the method defined for
VTKFile`).PVTKFile
objectsOriginal output
Proposed new output
Notes
Similar format to
VTKFile
, but including a list representation for the fieldvtk_filenames::Vector{String}
.PVDFile
objects:Original output
Proposed new output
Notes
Similar format to
VTKFile
, but many of the fields now have shortened expressions.VTKData
objects:Original output
Proposed new output
Notes
Here the new method shows the array for
names::Vector{String}
, and only short expressions for the other fields.PVTKData
objects:Original output
Proposed new output
Notes
Similar to
VTKData
, but here the fielddata::Vector{VTKData}
uses thesummary
method for the shown string.PVTKDataArray
objects:Original output
Proposed new output
Notes
Similar to
PVTKData
, where the fielddata::Vector{VTKDataArray}
uses thesummary
method for the shown string.Reasoning and justification for changes
Informative
show
methods help new users understand the functionality of the package, and help debugging.Comments
Where possible, I have tried to copy the style and code formatting of the original
show
method defined forVTKFile
objects. This is my first attempt at changes, and I'm happy to take on feedback, thank you!