Internal API

ExampleJuggler.docplutostatichtmlFunction
docplutostatichtml(example_dir, notebooks;
                   pluto_project = nothing, 
                   ntasks = Threads.nthreads())

Document notebooks via PlutoStaticHTML.jl. Implemented in extension ExampleJugglerPlutoStaticHTMLExt.

Parameters:

  • example_dir: Directory where notebooks reside.
  • notebooks: Vector of notebook file names relative to example_dir.

Keyword arguments:

  • pluto_project: passed as ENV[PLUTO_PROJECT] to notebooks. See testplutonotebooks for explanation.
  • ntasks: number of parallel tasks.

Returns: Vector of markdown file names (one for each notebook) ready to be passed to makedocs.

source
ExampleJuggler.docplutosliderserverFunction
docplutosliderserver(example_dir, notebooks; 
                     pluto_project = nothing, 
                     ntasks = Threads.nthreads(),
                     source_prefix = "",
                     iframe_height = "500px",
                     force = true)

Document notebooks via PlutoSliderServer.jl Implemented in extension ExampleJugglerPlutoSliderServerExt. Rendered notebooks will appear in iframes.

Parameters:

  • example_dir: Directory where notebooks reside
  • notebooks: Vector of notebook file names relative to example_dir

Keyword arguments:

  • pluto_project: passed as ENV[PLUTO_PROJECT] to notebooks. See testplutonotebooks for explanation.
  • ntasks: number of parallel tasks.
  • source_prefix: Prefix of notebook source file on github.
  • iframe_height: Height of iframe.
  • force: force ovewriting of already rendered notebooks.

Returns: Vector of markdown file names (one for each notebook) ready to be passed to makedocs.

source
ExampleJuggler.@testscriptMacro
@testscript(script, kwargs)

Wrap script (or Pluto notebook seen as script) into a custom module and evaluate it in the context of the calling module. If the script contains a function runtests, call runtests(;kwargs...), It is assumed that the script uses Test.@test to test correctness.

source
ExampleJuggler.@testmoduleMacro
@testmodule(source, kwargs...)

Include script defining a module in the context of the calling module and call the runtests method if it is defined in this module, passing kwargs....

source
ExampleJuggler.@plotmoduleMacro
@plotmodule(modules, kwargs...)

Include module into context of calling module and execute generateplots(;kwargs...) if it exists.

source
ExampleJuggler.docmodulesFunction
     docmodules(example_dir, example_modules; kwargs...)

Generate markdown files for use with documenter from list of Julia code examples in example_dir via Literate.jl in form of modules.

Keyword arguments:

  • use_module_titles: use titles from module input files
  • use_script_titles: use titles from script input files

See ExampleModule.jl for an example.

source
ExampleJuggler.@plotscriptMacro
@plotscript(script, kwargs...)

Wrap script into a custom module and evaluate it in the context of the calling module. If the script contains a function generateplots, call it as generateplots(output_dir; kwargs...) where output_dir is the name of the directory where the plot files should be written.

source
ExampleJuggler.example_md_dirFunction
 example_md_dir(subdir)

Return full path to the subdirectory of docs/src where the markdown files should be placed which later will be scanned by Documenter. Creates the directory if it doesn't already exist.

source