Skip to content

Commit ac289cf

Browse files
rgbkrkrdblue
authored andcommitted
Create a header section, clean up various sections (#4)
1 parent d1bc419 commit ac289cf

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

README.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,30 @@
33
[![Build Status](https://travis-ci.org/jupyter/jvm-repr.svg?branch=master)](https://travis-ci.org/jupyter/jvm-repr)
44
[![JVM repr on jitpack](https://jitpack.io/v/jupyter/jvm-repr.svg)](https://jitpack.io/#jupyter/jvm-repr)
55

6-
Standardizing REPL outputs for across JVM kernels (Scala, Clojure, Groovy, ...)
6+
[**Configuration**](#configuration) | [**Usage for Library Authors**](#usage---library-authors) | [**Usage for Kernel Authors**](#usage---kernel-authors)
77

8-
## Purpose
8+
Standardizing object representation and inspection across JVM kernels (Scala, Clojure, Groovy, ...).
99

10-
JVM languages use various conventions to convert REPL outputs to forms that can be displayed. This project is an attempt to standardize by providing an API that libraries can use to register display methods for any REPL project, like Jupyter console or nteract.
10+
## Purpose
1111

12-
## Using this API
12+
JVM languages use various conventions to convert REPL outputs to forms that can be displayed. This project is an attempt to standardize by providing an API that libraries can use to register display methods for any jupyter frontend, whether console, notebook,
13+
or dashboard.
1314

1415
This API has two main uses:
15-
* For library authors to provide conversions from a library's JVM objects to useful representations by MIME type
16-
* To provide a common way for kernel implementers to convert any JVM object to useful representations by MIME type
1716

18-
### Library authors
17+
* For library authors to provide a way to convert from a library's JVM objects to useful representations by MIME type
18+
* For kernel authors to convert any JVM object to useful representations by MIME type
19+
20+
As it is with IPython, this is a contract between the libraries within the ecosystem,
21+
the kernel that inspects the objects, and the frontends that display them.
22+
23+
## Configuration
24+
25+
See [instructions on JitPack](https://jitpack.io/#jupyter/jvm-repr) for gradle, maven, sbt, or leiningen.
26+
27+
## Usage
28+
29+
### Usage - Library authors
1930

2031
Library authors can register conversion code by implementing a `Displayer` and registering it with `Displayers`.
2132

@@ -43,22 +54,27 @@ import vegas.DSL.ExtendedUnitSpecBuilder
4354
})
4455
```
4556

46-
Any kernel implementation can use the method to display Vegas graphs for the DSL objects.
57+
Any kernel implementation can use the method to display Vegas graphs for the DSL
58+
objects.
4759

48-
Library authors can optionally implement `setMimeTypes(String...)` to receive hints for the MIME types that the kernel or front-end supports. It is recommended that library authors use these hints to avoid expensive conversions.
60+
Library authors can optionally implement `setMimeTypes(String...)` to receive
61+
hints for the MIME types that the kernel or front-end supports. It is
62+
recommended that library authors use these hints to avoid expensive conversions.
4963

50-
### Kernel implementers
64+
### Usage - Kernel authors
5165

52-
Kernel implementors can use this API to display registered objects:
66+
Kernel authors can use this API to display registered objects:
5367

5468
```java
5569
import java.util.Map
5670

57-
...
71+
// ...
5872

5973
Object result = interpreter.eval(code);
6074
Map<String, String> resultByMIME = Displayers.display(result);
6175
Kernel.this.display(resultByMIME);
6276
```
6377

64-
Kernel implementers can optionally call `Displayers.setMimeTypes(String...)` to send hints to display implementations with the set of MIME types that can be used by the kernel or front-end.
78+
Kernel authors can optionally call `Displayers.setMimeTypes(String...)` to send
79+
hints to display implementations with the set of MIME types that can be used by
80+
the kernel or front-end.

0 commit comments

Comments
 (0)