Logging from a Pluto notebook into the REPL from which it launched

Is there a way for a Pluto notebook to print/log into the REPL from which I launched it? I would need that to track progress of notebook CI runs

I am not at the pc to try but setting this flag to false should work:

2 Likes

Thanks for the pointer.

Since I’m using static-export-template I had to do a little more digging to modify the GitHub action, and I’m still stuck:

  • The export action calls PlutoSliderServer.github_action:
  • The function github_action is a shortcut for export_directory, which is itself a shortcut for run_directory. I can’t figure out if run_directory can accept the same kwargs as Pluto.run?

I can’t figure out if run_directory can accept the same kwargs as Pluto.run?

You would need to prefix the keyword arguments with Pluto_<option_type>_ (here option_type = evaluation) so:

PlutoSliderServer.github_action(".";
  Export_cache_dir="pluto_state_cache",
  Export_baked_notebookfile=false,
  Export_baked_state=false,
  Pluto_evaluation_capture_stdout=false,
  # more parameters can go here
)

There may need to enable Pluto_evaluation_workspace_use_distributed_stdlib=true since Malt (the new notebook process manager does not have stdout forwarding).

Even locally with

Pluto.run(
    capture_stdout=false,
    workspace_use_distributed_stdlib=true
)

the print statements don’t display in my REPL. Anything else I might be missing?

EDIT: I was inside a @progress for loop from ProgressLogging.jl, removing the macro enabled the prints for some reason. Thanks for your help!

1 Like