Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix help_links #39

Merged
merged 1 commit into from
Aug 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions lib/core/JupyterShellMessage.ml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,19 @@ type language_info =
nbconverter_exporter : string option;
} [@@deriving yojson { strict = false }]

type help_link =
{
text : string;
url : string;
} [@@deriving yojson { strict = false }]

type kernel_info_reply =
{
protocol_version : string;
implemenation : string;
implementation_version : string;
banner : string option;
help_links : Yojson.Safe.json;
help_links : help_link list;
language_info : language_info;
language : string;
} [@@deriving yojson { strict = false }]
Expand All @@ -135,7 +141,12 @@ let kernel_info_reply =
implemenation = "ocaml-jupyter";
implementation_version = JupyterVersion.kernel_version;
banner = None;
help_links = `Assoc [];
help_links = [
{
text = "ocaml-jupyter";
url = "https://akabe.github.io/ocaml-jupyter/";
};
];
language = "OCaml";
language_info =
{
Expand Down
6 changes: 3 additions & 3 deletions test/Fixture.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end
module KernelInfoReply =
struct
let key = "167ff8c8-fe494afc147b4fa62758ed82"
let hmac = "7cd42e8ad6577c8dcd56eebac4f5d516311160df81f0a06d6ea22ec898dd0b94"
let hmac = "94ef4fd43f3611069e32d96512b0db3a20aa8be73a435dd2c7458b073e254452"
let header = "{\"msg_id\":\"3a21737c-0287-30f3-bfa9-12e193dfd00a\",\
\"msg_type\":\"kernel_info_reply\",\
\"session\":\"A32B9A2038D043F2A0718550AAAFC9DA\",\
Expand All @@ -77,7 +77,7 @@ struct
\"implemenation\":\"ocaml-jupyter\",\
\"implementation_version\":\"5.0.0\",\
\"banner\":null,\
\"help_links\":{},\
\"help_links\":[],\
\"language_info\":{\
\"name\":\"OCaml\",\
\"version\":\"4.04.1\",\
Expand Down Expand Up @@ -114,7 +114,7 @@ struct
implemenation = "ocaml-jupyter";
implementation_version = "5.0.0";
banner = None;
help_links = `Assoc [];
help_links = [];
language = "OCaml";
language_info =
{
Expand Down