Skip to content
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

Getting 3D visualizations working again #240

Merged
merged 6 commits into from
Sep 13, 2023
Merged

Getting 3D visualizations working again #240

merged 6 commits into from
Sep 13, 2023

Conversation

trevorcampbell
Copy link
Contributor

@trevorcampbell trevorcampbell commented Sep 12, 2023

One potential issue: I see

/home/jovyan/source/classification1.md:786: WARNING: skipping unknown output mime type: application/vnd.plotly.v1+json [mystnb.unknown_mime_type]

@joelostblom if you want you can make similar viz adjustments to these new 3d figs that you made previously

In order to test this, just run the docker container interactively (instead of using build_html.sh), install plotly, and run jupyter-book build source.

NB: we will almost certainly have to have a build flag check for the PDF build and use a stored png version of these instead, but we can cross that bridge when we get to it

@trevorcampbell
Copy link
Contributor Author

Let's not merge this until we merge #241 , so that we can use this PR as a test run for that new workflow

Copy link
Collaborator

@joelostblom joelostblom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, these changes look great and show up as expected in the rendered book!

Based on jupyter-book/jupyter-book#1950, it seems like that warning should not be an issue and can be either suppressed or the plotly rendering engine can be switch to an iframe jupyter-book/jupyter-book#2041

I found different syntax for how to enter the container interactively, so for reference this is what I used docker container run -it --rm -v $(pwd):/home/jovyan ubcdsci/py-intro-to-ds:20230831171718ddf538 /bin/bash

if you want you can make similar viz adjustments to these new 3d figs that you made previously

Hmm,I am not sure which changes you are referring to here.

@trevorcampbell
Copy link
Contributor Author

Hmm,I am not sure which changes you are referring to here.

Just the various syntax formatting stuff you did. It's really unimportant, because all the code is hidden anyway.

@trevorcampbell
Copy link
Contributor Author

I found different syntax for how to enter the container interactively, so for reference this is what I used docker container run -it --rm -v $(pwd):/home/jovyan ubcdsci/py-intro-to-ds:20230831171718ddf538 /bin/bash

No need for container -- you can just do:

 docker run -it --rm -v $(pwd):/home/jovyan ubcdsci/py-intro-to-ds:20230831171718ddf538 /bin/bash

@trevorcampbell
Copy link
Contributor Author

I'm going to close and re-open this to try to trigger the new workflow from #241

@joelostblom
Copy link
Collaborator

Just the various syntax formatting stuff you did. It's really unimportant, because all the code is hidden anyway.

Ah I see, I don't think that applies here since it was mostly altair-specific.

@trevorcampbell
Copy link
Contributor Author

New github actions workflow is working properly, but it will re-build the image on every change to the PR. I've now edited the workflow in e3701aa so that it should only run when the Dockerfile itself is changed, but I'm going to push an empty commit here to test it.

@trevorcampbell
Copy link
Contributor Author

OK, I've got the new workflow working properly. I force-pushed removal of a bunch of garbage commits while debugging, and I'm merging this now.

@trevorcampbell trevorcampbell merged commit 8ec1442 into main Sep 13, 2023
1 check passed
This was referenced Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add plotly to the docker image 3D Plot in Chapter 5 not rendering
3 participants