Skip to content

Commit

Permalink
Adding to jupyter.plot_mimetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bidek56 committed Aug 19, 2022
1 parent 722ef81 commit c3584cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion minimal-notebook/Rprofile.site
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add R mimetype to specify how the plot returns from R to the browser.
# https://notebook.community/andrie/jupyter-notebook-samples/Changing%20R%20plot%20options%20in%20Jupyter

options(jupyter.plot_mimetypes = c('text/plain', 'image/svg+xml', 'application/pdf'))
options(jupyter.plot_mimetypes = c('text/plain', 'image/png', 'image/jpeg', 'image/svg+xml', 'application/pdf'))
2 changes: 1 addition & 1 deletion tests/R_mimetype_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def mimetypes_check(container: TrackedContainer) -> str:
"""Check if Rscript command can be executed"""
LOGGER.info("Test that R command can be executed ...")
Rcommand = 'if (length(getOption("jupyter.plot_mimetypes")) != 3) {stop("missing jupyter.plot_mimetypes")}'
Rcommand = 'if (length(getOption("jupyter.plot_mimetypes")) != 5) {stop("missing jupyter.plot_mimetypes")}'
logs = container.run_and_wait(
timeout=60,
tty=True,
Expand Down

1 comment on commit c3584cd

@benz0li
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Please sign in to comment.