-
Notifications
You must be signed in to change notification settings - Fork 3
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
[WIP] Pretty printing #60
Conversation
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.
There are some suggestions from my side, which we should discuss. I change the status of this PR to draft for the discussion, such that it is not accidentally merged.
@szabo137 Please have a look again. I reworked the printing and implemented the I've also removed most of the jldoctests and only kept the ones that I think add actual value for the documentation, showing an example construction of a |
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! Thanks again for this, I like the look and feel now :-)
As discussed in QEDjl-project/QEDprocesses.jl#60 the pretty printing should overload the 2 argument versions of `Base.show` instead of the 3 argument versions. This PR fixes that for QEDbase.jl
Adds pretty printing for:
Essentially, adding similar functionality to QEDjl-project/QEDbase.jl#61 for the QEDprocesses types.
I'm using the jldoctests to test, I'm not sure if it's really necessary to test in a separate test as well. Putting single jldoctests for these prints in every type definition would clutter the documentation a bit so I've not done that. If we really want tests for each
show()
we should probably do it in a test file.Also, I'm not sure if there's a better way for the print functions than alternating the
show
for objects andprint
for strings. Interpolating doesn't work unless we also overload theprint
. (I think it is print, the number of string output related functions in Julia is confusing)