-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Adding Pyplot visualization #1139
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
Conversation
This looks awsome! Could you add a few example screenshots? |
Updated the code, Added Documentation |
Codecov Report
@@ Coverage Diff @@
## main #1139 +/- ##
==========================================
+ Coverage 89.30% 89.48% +0.18%
==========================================
Files 19 20 +1
Lines 1253 1294 +41
Branches 256 255 -1
==========================================
+ Hits 1119 1158 +39
- Misses 98 100 +2
Partials 36 36
Continue to review full report at Codecov.
|
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.
This is great @vineetvermait, thanks! I requested a few changes. A major concern is ensuring the graphs render cleanly.
Fixed |
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.
@vineetvermait could you please correct the failing checks and squash your commits so it is one commit.
@rht Can you please give it a second look
Then it should be good to merge
The CI fails because
|
If the 3 TODOs are addressed, then this LGTM. |
@@ -0,0 +1,24 @@ | |||
let PyPlotModule = function(canvas_width, canvas_height) { |
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.
This should be const
.
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.
And all the vars inside this function need to be declared with const
/let
. Default to const
unless if it needs to be re-declared.
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.
PyPlotModule
must be const
.
Not yet addressed. |
Resolved issues |
Not yet addressed. Also the new const comments not yet addressed. |
Anything pending?? |
|
Here is an example UX in Pandas. I was trying to use the
We could use this concise error message instead of the long one I suggested. |
def render(self, model: Model): | ||
fig = self.img_func(model) | ||
io_bytes = io.BytesIO() | ||
fig.savefig(io_bytes, format="jpg") |
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.
The format should be "svg" instead.
@vineetvermait are you still availabe for the remaining small points? If not would you mind me finishing the PR for you so we can get this merged? |
It has been 2 days. @Corvince you should just go for it. |
Bump. |
Thanks for the bump, I totally forgot about this! |
Closing, because I think the next-gent frontend for Mesa should be based on Streamlit/Panel/ipywidgets. This would result in simpler code (plus for maintainability), and that it is easier to be customized by the user. Followup discussion on #1622. |
This visualization allows the developer to add any pyplot visualization. removes all dependencies on the js components