Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ileasile committed Dec 26, 2019
1 parent 7878984 commit 8e7b96a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ The following line magics are supported:
- `%use <lib1>, <lib2> ...` - injects code for supported libraries: artifact resolution, default imports, initialization code, type renderers
- `%trackClasspath` - logs any changes of current classpath. Useful for debugging artifact resolution failures
- `%trackExecution` - logs pieces of code that are going to be executed. Useful for debugging of libraries support
- `%output [--max-cell-size=N] [--max-buffer=N] [--max-buffer-newline=N] [--max-time=N] [--no-stdout] [--reset-to-defaults]` -
output capturing settings.
- `max-cell-size` specifies the characters count which may be printed to stdout. Default is 100000.
- `max-buffer` - max characters count stored in internal buffer before being sent to client. Default is 10000.
- `max-buffer-newline` - same as above, but trigger happens only if newline character was encountered. Default is 100.
- `max-time` - max time in milliseconds before the buffer is sent to client. Default is 100.
- `no-stdout` - don't capture output. Default is false.
- `reset-to-defaults` - reset all output settings that were set with magics to defaults

### Supported Libraries

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/org/jetbrains/kotlin/jupyter/magics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum class ReplLineMagics(val desc: String, val argumentsUsage: String? = null,
trackClasspath("log current classpath changes"),
trackExecution("log code that is going to be executed in repl", visibleInHelp = false),
dumpClassesForSpark("stores compiled repl classes in special folder for Spark integration", visibleInHelp = false),
output("setup output settings", "--max 1000 --no-stdout --time-interval-ms 100 --buffer-limit 400")
output("setup output settings", "--max-cell-size=1000 --no-stdout --max-time=100 --max-buffer=400")
}

fun processMagics(repl: ReplForJupyter, code: String): String {
Expand Down

0 comments on commit 8e7b96a

Please sign in to comment.