Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Fixes #216, nbconvert!=5.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Dec 18, 2018
1 parent 2437eed commit 312422f
Show file tree
Hide file tree
Showing 10 changed files with 272 additions and 174 deletions.
39 changes: 9 additions & 30 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@
History
=======

current - 2018-12-10 - 0.00Mb
current - 2018-12-18 - 0.00Mb
=============================

* `215`: add quote_node for quotations (sphinx) (2018-12-18)
* `216`: conversion of notebook including svg fails (2018-12-18)
* `214`: fix issue with neg_pattern in explore_folder_iterfile (2018-12-11)

1.8.2885 - 2018-12-10 - 2.03Mb
==============================

* `213`: removes cmdref from documentation when creating a parser for a function (2018-12-10)
* `212`: issue when the default value is None when building the parser for a specific function (2018-12-09)

1.8.2884 - 2018-12-09 - 2.03Mb
==============================

* `212`: issue when the default value is None when building the parser for a specific function (2018-12-09)
* `211`: automatically git tag when publishing (2018-12-05)
* `210`: add __main__ command line (2018-11-29)

1.8.2876 - 2018-11-25 - 2.02Mb
==============================

* `209`: implements function retrieve_notebooks_in_folder (2018-11-25)
* `208`: update to azure CI (2018-11-25)
* `205`: Slides conversion are missing from the documentation (2018-11-09)
Expand All @@ -28,22 +31,10 @@ current - 2018-12-10 - 0.00Mb
* `202`: make runpython keep context from one execution to the next one (2018-11-01)
* `201`: handle language options in runpython and rst builder (2018-11-01)
* `200`: ignore issue E402 when applying autopep8 (move import at the top of the file) (2018-10-28)

1.8.2827 - 2018-10-14 - 2.02Mb
==============================

* `199`: better logging in synchronisation_folder (2018-10-14)
* `198`: broken links in the documentation (magic command ,example) (2018-10-14)

1.8.2820 - 2018-10-06 - 2.02Mb
==============================

* `197`: do not raise exception if latex is not found when using rst2html (2018-10-06)
* `196`: add function add_rst_links to automatically add links into one string (2018-10-04)

1.8.2814 - 2018-09-22 - 2.02Mb
==============================

* `195`: implement a doctree outputter (2018-09-19)
* `194`: check why call an extension from the setup is different from adding it to the list of extensions (2018-09-19)
* `193`: fix an issue when converting a werzeug object into string (2018-09-17)
Expand All @@ -58,10 +49,6 @@ current - 2018-12-10 - 0.00Mb
* `184`: add tag :orphan: to additional files (2018-09-08)
* `183`: use svg image for formula in HTML and png in latex (2018-08-27)
* `182`: implementation of a backup plan if downloading require.js fails (2018-08-27)

1.8.2747 - 2018-08-25 - 1.99Mb
==============================

* `181`: fix an issue when combining coverage_report after the unit tests passed (2018-08-24)
* `180`: add parameter persistent to get_temp_folder (2018-08-24)
* `179`: put a default value for neg_pattern if it is none to avoid known folders (function check_pep8) (2018-08-23)
Expand All @@ -83,10 +70,6 @@ current - 2018-12-10 - 0.00Mb
* `165`: documentation does not automatically generate .rst for module written in C (2018-08-04)
* `164`: improve autosignature for builtin function (2018-08-03)
* `162`: reduce the impact of RuntimeError: Kernel died before replying to kernel_info (2018-07-29)

1.8.2673 - 2018-07-28 - 1.99Mb
==============================

* `161`: fix unit test test_build_script on appveyor (2018-07-28)
* `160`: notebook server remains open if an exception happens during the execution (2018-07-25)
* `159`: fix a bug with pylint version (2018-07-23)
Expand All @@ -101,10 +84,6 @@ current - 2018-12-10 - 0.00Mb
* `148`: fix unit test test_changes_graph (pandas update) (2018-05-17)
* `146`: remove raise ... (...) from e in setup.py (2018-05-17)
* `145`: add a script to launch scite on windows with the right path (2018-05-13)

1.8.2602 - 2018-05-11 - 1.98Mb
==============================

* `144`: disable sphinx gallery extension if no example (2018-05-11)
* `143`: add setup option to run pylint (2018-05-11)
* `142`: look for the files which makes pylint crash on Windows (2018-05-11)
Expand Down
225 changes: 122 additions & 103 deletions _unittests/ut_helpgen/notebooks_svg/notebook_with_svg.ipynb
Original file line number Diff line number Diff line change
@@ -1,109 +1,128 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Notebook with SVG"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Notebook with SVG and javascript\n",
"\n",
"SVG in a notebook."
]
},
{
"data": {
"image/svg+xml": [
"<svg height=\"391\" viewBox=\"-70.5 -70.5 391 391\" width=\"391\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<defs>\n",
"\t<pattern height=\"50\" id=\"grid\" patternUnits=\"userSpaceOnUse\" width=\"50\">\n",
"\t\t<rect fill=\"#000\" height=\"1\" opacity=\"1.0\" width=\"50\" x=\"0\" y=\"0\"/>\n",
"\t\t<rect fill=\"#000\" height=\"50\" opacity=\"1.0\" width=\"1\" x=\"0\" y=\"0\"/>\n",
"\t</pattern>\n",
"\t<pattern height=\"50\" id=\"dots\" patternUnits=\"userSpaceOnUse\" width=\"50\">\n",
"\t\t<g fill-opacity=\"0.40\" stroke=\"#000\" stroke-dasharray=\"0.3,0.3\">\n",
"\t\t\t<circle cx=\"0\" cy=\"0\" fill=\"red\" r=\"4\"/>\n",
"\t\t\t<circle cx=\"51\" cy=\"0\" fill=\"blue\" r=\"4\"/>\n",
"\t\t\t<circle cx=\"51\" cy=\"51\" fill=\"green\" r=\"4\"/>\n",
"\t\t\t<circle cx=\"0\" cy=\"51\" fill=\"yellow\" r=\"4\"/>\n",
"\t\t</g>\n",
"\t</pattern>\n",
"</defs>\n",
"<rect fill=\"#fff\" height=\"390\" stroke=\"#000\" width=\"390\" x=\"-70\" y=\"-70\"/>\n",
"<rect fill=\"url(#dots)\" height=\"250\" width=\"250\" x=\"0\" y=\"0\"/>\n",
"<rect fill=\"url(#grid)\" height=\"250\" stroke=\"#000\" stroke-width=\"2\" width=\"250\" x=\"0\" y=\"0\"/>\n",
"<text font-family=\"Times New Roman,serif\" font-size=\"16\" text-anchor=\"middle\" x=\"0\" y=\"0\">\n",
"<tspan font-weight=\"bold\" x=\"125\" y=\"-40\">X</tspan>\n",
"<tspan x=\"0\" y=\"-10\">0</tspan>\n",
"<tspan x=\"50\" y=\"-10\">50</tspan>\n",
"<tspan x=\"100\" y=\"-10\">100</tspan>\n",
"<tspan x=\"150\" y=\"-10\">150</tspan>\n",
"<tspan x=\"200\" y=\"-10\">200</tspan>\n",
"<tspan x=\"250\" y=\"-10\">250</tspan>\n",
"</text>\n",
"<text font-family=\"Times New Roman,serif\" font-size=\"16\" text-anchor=\"middle\" x=\"0\" y=\"0\">\n",
"<tspan font-weight=\"bold\" x=\"-50\" y=\"125\">Y</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"0\">0</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"50\">50</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"100\">100</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"150\">150</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"200\">200</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"250\">250</tspan>\n",
"</text>\n",
"<g opacity=\"0.8\">\n",
"\t<rect fill=\"lime\" height=\"200\" stroke=\"pink\" stroke-width=\"4\" width=\"200\" x=\"25\" y=\"25\"/>\n",
"\t<circle cx=\"125\" cy=\"125\" fill=\"orange\" r=\"75\"/>\n",
"\t<polyline fill=\"none\" points=\"50,150 50,200 200,200 200,100\" stroke=\"red\" stroke-width=\"4\"/>\n",
"\t<line stroke=\"blue\" stroke-width=\"4\" x1=\"50\" x2=\"200\" y1=\"50\" y2=\"200\"/>\n",
"</g>\n",
"</svg>"
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg height=\"391\" viewBox=\"-70.5 -70.5 391 391\" width=\"391\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<defs>\n",
"\t<pattern height=\"50\" id=\"grid\" patternUnits=\"userSpaceOnUse\" width=\"50\">\n",
"\t\t<rect fill=\"#000\" height=\"1\" opacity=\"1.0\" width=\"50\" x=\"0\" y=\"0\"/>\n",
"\t\t<rect fill=\"#000\" height=\"50\" opacity=\"1.0\" width=\"1\" x=\"0\" y=\"0\"/>\n",
"\t</pattern>\n",
"</defs>\n",
"<rect fill=\"#fff\" height=\"390\" stroke=\"#000\" width=\"390\" x=\"-70\" y=\"-70\"/>\n",
"<rect fill=\"url(#grid)\" height=\"250\" stroke=\"#000\" stroke-width=\"2\" width=\"250\" x=\"0\" y=\"0\"/>\n",
"<text font-family=\"Granada,Times New Roman,serif\" font-size=\"16\" text-anchor=\"middle\" x=\"0\" y=\"0\">\n",
"<tspan font-size=\"1.2em\" font-weight=\"bold\" x=\"125\" y=\"-40\">x</tspan>\n",
"<tspan x=\"0\" y=\"-10\">0</tspan>\n",
"<tspan x=\"50\" y=\"-10\">50</tspan>\n",
"<tspan x=\"100\" y=\"-10\">100</tspan>\n",
"<tspan x=\"150\" y=\"-10\">150</tspan>\n",
"<tspan x=\"200\" y=\"-10\">200</tspan>\n",
"<tspan x=\"250\" y=\"-10\">250</tspan>\n",
"</text>\n",
"<text font-family=\"Granada,Times New Roman,serif\" font-size=\"16\" text-anchor=\"middle\" x=\"0\" y=\"0\">\n",
"<tspan font-size=\"1.2em\" font-weight=\"bold\" x=\"-50\" y=\"125\">y</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"0\">0</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"50\">50</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"100\">100</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"150\">150</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"200\">200</tspan>\n",
"<tspan dy=\"6\" x=\"-20\" y=\"250\">250</tspan>\n",
"</text>\n",
"<g opacity=\"0.8\">\n",
"\t<rect fill=\"lime\" height=\"200\" stroke=\"pink\" stroke-width=\"4\" width=\"200\" x=\"25\" y=\"25\"/>\n",
"\t<circle cx=\"125\" cy=\"125\" fill=\"orange\" r=\"75\"/>\n",
"\t<polyline fill=\"none\" points=\"50,150 50,200 200,200 200,100\" stroke=\"red\" stroke-width=\"4\"/>\n",
"\t<line stroke=\"blue\" stroke-width=\"4\" x1=\"50\" x2=\"200\" y1=\"50\" y2=\"200\"/>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"text/plain": [
"<IPython.core.display.SVG object>"
"source": [
"from IPython.core.display import SVG\n",
"SVG(url=\"https://upload.wikimedia.org/wikipedia/commons/1/1a/SVG_example_markup_grid.svg\")"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div id=\"M929581e8070743239b9d45c37e5c08e8-cont\"><div id=\"M929581e8070743239b9d45c37e5c08e8\" style=\"width:100%;height:100%;\"></div></div>\n",
"<script>\n",
"\n",
"require(['http://www.xavierdupre.fr/js/vizjs/viz.js'], function() { var svgGraph = Viz(\"digraph{ a-> b; a-> c -> d;}\");\n",
"document.getElementById('M929581e8070743239b9d45c37e5c08e8').innerHTML = svgGraph; });\n",
"\n",
"</script>"
],
"text/plain": [
"<jyquickhelper.jspy.render_nb_js_dot.RenderJsDot at 0x2b475bb2da0>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from jyquickhelper import RenderJsDot\n",
"RenderJsDot('digraph{ a-> b; a-> c -> d;}')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
}
],
"source": [
"from IPython.core.display import SVG\n",
"SVG(url=\"https://upload.wikimedia.org/wikipedia/commons/1/1a/SVG_example_markup_grid.svg\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
"nbformat": 4,
"nbformat_minor": 1
}
Loading

0 comments on commit 312422f

Please sign in to comment.