{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/knowledge-repo/issues/393","repository_url":"https://api.github.com/repos/airbnb/knowledge-repo","labels_url":"https://api.github.com/repos/airbnb/knowledge-repo/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/knowledge-repo/issues/393/comments","events_url":"https://api.github.com/repos/airbnb/knowledge-repo/issues/393/events","html_url":"https://github.com/airbnb/knowledge-repo/pull/393","id":310361742,"node_id":"MDExOlB1bGxSZXF1ZXN0MTc4NzUyMzQ0","number":393,"title":" Rewrite to rmd.py converter to add plotly divs and js, and to add plotly js dependency","user":{"login":"dorianbrown","id":7283679,"node_id":"MDQ6VXNlcjcyODM2Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/7283679?v=4","gravatar_id":"","url":"https://api.github.com/users/dorianbrown","html_url":"https://github.com/dorianbrown","followers_url":"https://api.github.com/users/dorianbrown/followers","following_url":"https://api.github.com/users/dorianbrown/following{/other_user}","gists_url":"https://api.github.com/users/dorianbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/dorianbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dorianbrown/subscriptions","organizations_url":"https://api.github.com/users/dorianbrown/orgs","repos_url":"https://api.github.com/users/dorianbrown/repos","events_url":"https://api.github.com/users/dorianbrown/events{/privacy}","received_events_url":"https://api.github.com/users/dorianbrown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-04-01T23:15:11Z","updated_at":"2018-06-01T07:20:33Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/airbnb/knowledge-repo/pulls/393","html_url":"https://github.com/airbnb/knowledge-repo/pull/393","diff_url":"https://github.com/airbnb/knowledge-repo/pull/393.diff","patch_url":"https://github.com/airbnb/knowledge-repo/pull/393.patch"},"body":"Description of changeset:\r\n\r\nIn order to handle plotly plots, we use the rmarkdown::render function, which is a bit more capable than knitr. We render the Rmd to html format, with the option to keep the intermediate .md file. This is almost the same as the knitr output, but contains divs and a json description of the plots.\r\n\r\nAdditionally some javascript is necessary to have the actual plots rendered. I have a somewhat lazy check for whether we need to add the dependency. This could be improved on by check each code block for either library(plotly) or plotly::.\r\n\r\nI also introduced a new dependency (python-frontmatter) to add the javascript tags after the frontmatter. There might be another way of doing this where this additional package isn't needed.\r\n\r\nTest Plan:\r\nA new post is included with three different plotly plots.\r\n\r\nAuto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj\r\n"},"comment":{"url":"https://api.github.com/repos/airbnb/knowledge-repo/issues/comments/393788529","html_url":"https://github.com/airbnb/knowledge-repo/pull/393#issuecomment-393788529","issue_url":"https://api.github.com/repos/airbnb/knowledge-repo/issues/393","id":393788529,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzc4ODUyOQ==","user":{"login":"AppVeyorBot","id":17834419,"node_id":"MDQ6VXNlcjE3ODM0NDE5","avatar_url":"https://avatars0.githubusercontent.com/u/17834419?v=4","gravatar_id":"","url":"https://api.github.com/users/AppVeyorBot","html_url":"https://github.com/AppVeyorBot","followers_url":"https://api.github.com/users/AppVeyorBot/followers","following_url":"https://api.github.com/users/AppVeyorBot/following{/other_user}","gists_url":"https://api.github.com/users/AppVeyorBot/gists{/gist_id}","starred_url":"https://api.github.com/users/AppVeyorBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppVeyorBot/subscriptions","organizations_url":"https://api.github.com/users/AppVeyorBot/orgs","repos_url":"https://api.github.com/users/AppVeyorBot/repos","events_url":"https://api.github.com/users/AppVeyorBot/events{/privacy}","received_events_url":"https://api.github.com/users/AppVeyorBot/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T07:20:33Z","updated_at":"2018-06-01T07:20:33Z","author_association":"NONE","body":":white_check_mark: [Build knowledge-repo 1.0.474 completed](https://ci.appveyor.com/project/matthewwardrop/knowledge-repo/build/1.0.474) (commit https://github.com/airbnb/knowledge-repo/commit/9a8855e80a by @dorianbrown)"}}
{"actor":{"display_login":"AppVeyorBot"}}