diff --git a/docs/api/draco.ipynb b/docs/api/draco.ipynb index 56f642c6..5f47758f 100644 --- a/docs/api/draco.ipynb +++ b/docs/api/draco.ipynb @@ -219,18 +219,6 @@ "source": [ "d.get_violations(invalid_spec)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a39a62c1", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/api/facts.ipynb b/docs/api/facts.ipynb index 00a761d5..82030ab3 100644 --- a/docs/api/facts.ipynb +++ b/docs/api/facts.ipynb @@ -71,7 +71,15 @@ "outputs": [ { "data": { - "text/plain": "['attribute(mark,root,bar).',\n 'entity(encoding,root,0).',\n 'attribute((encoding,channel),0,x).',\n 'attribute((encoding,field),0,condition).',\n 'entity(encoding,root,1).',\n 'attribute((encoding,channel),1,y).',\n 'attribute((encoding,aggregate),1,count).']" + "text/plain": [ + "['attribute(mark,root,bar).',\n", + " 'entity(encoding,root,0).',\n", + " 'attribute((encoding,channel),0,x).',\n", + " 'attribute((encoding,field),0,condition).',\n", + " 'entity(encoding,root,1).',\n", + " 'attribute((encoding,channel),1,y).',\n", + " 'attribute((encoding,aggregate),1,count).']" + ] }, "execution_count": 5, "metadata": {}, @@ -120,18 +128,6 @@ " print(answer_set)\n", " pprint(answer_set_to_dict(answer_set))" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "10185d26023b46108eb7d9f57d49d2b3", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/api/run.ipynb b/docs/api/run.ipynb index e9e4915f..f358a8e6 100644 --- a/docs/api/run.ipynb +++ b/docs/api/run.ipynb @@ -86,18 +86,6 @@ " print(model.answer_set[0])\n", " print(model.answer_set[1])" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "toxic-silicon", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/applications/debug_draco.ipynb b/docs/applications/debug_draco.ipynb index 716cd3c5..f501d436 100644 --- a/docs/applications/debug_draco.ipynb +++ b/docs/applications/debug_draco.ipynb @@ -7,35 +7,6 @@ "# Draco Debugging" ] }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "ExecuteTime": { - "end_time": "2023-07-25T15:03:35.145025Z", - "start_time": "2023-07-25T15:03:32.637995Z" - }, - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], - "source": [ - "%pip install -q toml ipywidgets" - ] - }, { "cell_type": "code", "execution_count": 2, @@ -465,7 +436,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2023-07-25T15:03:36.386746Z", @@ -474,17 +445,11 @@ }, "outputs": [], "source": [ - "import warnings\n", - "\n", "from IPython.display import display\n", "from vega_datasets import data\n", "\n", "from draco.renderer import AltairRenderer\n", "\n", - "# Suppressing warnings raised by altair in the background\n", - "# (iteration-related deprecation warnings)\n", - "warnings.filterwarnings(\"ignore\")\n", - "\n", "# Setting up renderer and demo data\n", "renderer = AltairRenderer()\n", "weather_data = data.seattle_weather()\n", @@ -1983,7 +1948,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -1997,12 +1962,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" - }, - "vscode": { - "interpreter": { - "hash": "ad2bdc8ecc057115af97d19610ffacc2b4e99fae6737bb82f5d7fb13d2f2c186" - } + "version": "3.12.7" } }, "nbformat": 4, diff --git a/docs/applications/design_space_exploration.ipynb b/docs/applications/design_space_exploration.ipynb index e3f8bd7f..1d7d299a 100644 --- a/docs/applications/design_space_exploration.ipynb +++ b/docs/applications/design_space_exploration.ipynb @@ -16,26 +16,6 @@ "of recommendations, and we will investigate the produced designs using the debugger module." ] }, - { - "cell_type": "code", - "execution_count": 1, - "id": "e010c7ae-4d1f-4783-9b83-9f5414f392de", - "metadata": { - "ExecuteTime": { - "end_time": "2023-08-04T07:31:46.736324Z", - "start_time": "2023-08-04T07:31:46.627931Z" - }, - "tags": [] - }, - "outputs": [], - "source": [ - "# Suppressing warnings raised by altair in the background\n", - "# (iteration-related deprecation warnings)\n", - "import warnings\n", - "\n", - "warnings.filterwarnings(\"ignore\")" - ] - }, { "cell_type": "code", "execution_count": 2, diff --git a/docs/applications/draco1_vs_draco2.ipynb b/docs/applications/draco1_vs_draco2.ipynb index e2aba562..6ba56530 100644 --- a/docs/applications/draco1_vs_draco2.ipynb +++ b/docs/applications/draco1_vs_draco2.ipynb @@ -56,23 +56,6 @@ "We'll be installing a forked version of _Draco 1_, specifically named `draco1`. This is to prevent any conflicts with the currently installed `draco` package, which refers to _Draco 2_ (i.e., this repository). It's important to note that the `draco1` fork doesn't modify the original functionality of Draco 1 - it's simply a renaming of the package. This way, we can clearly distinguish between the two versions of Draco for our comparison and we can interact with them within the same notebook." ] }, - { - "cell_type": "code", - "execution_count": 2, - "id": "267359fa-ca9f-4387-849c-08dabbb45a3c", - "metadata": { - "ExecuteTime": { - "end_time": "2023-07-30T15:57:47.788023Z", - "start_time": "2023-07-30T15:57:40.546816Z" - } - }, - "outputs": [], - "source": [ - "# Installing `clyngor` prior to `draco1`, as it is a build requirement\n", - "!pip -qq install --upgrade pip && pip -qq install clyngor\n", - "!pip install -qq 'git+https://github.com/peter-gy/draco.git@named-to-draco1#draco1'" - ] - }, { "cell_type": "code", "execution_count": 3, @@ -1927,7 +1910,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -1941,7 +1924,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.12.7" } }, "nbformat": 4, diff --git a/docs/applications/recommendation.ipynb b/docs/applications/recommendation.ipynb index 55fcb4da..d410d3ab 100644 --- a/docs/applications/recommendation.ipynb +++ b/docs/applications/recommendation.ipynb @@ -29,7 +29,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2023-04-27T07:42:57.610386Z", @@ -42,17 +42,11 @@ }, "outputs": [], "source": [ - "import warnings\n", - "\n", "from IPython.display import display\n", "from vega_datasets import data\n", "\n", "from draco.renderer import AltairRenderer\n", "\n", - "# Suppressing warnings raised by altair in the background\n", - "# (iteration-related deprecation warnings)\n", - "warnings.filterwarnings(\"ignore\")\n", - "\n", "# Setting up renderer and demo data\n", "renderer = AltairRenderer()\n", "weather_data = data.seattle_weather()" @@ -115,8 +109,66 @@ }, { "data": { - "text/html": "\n
\n", - "text/plain": "alt.Chart(...)" + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.Chart(...)" + ] }, "metadata": {}, "output_type": "display_data" @@ -221,8 +273,66 @@ }, { "data": { - "text/html": "\n
\n", - "text/plain": "alt.Chart(...)" + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.Chart(...)" + ] }, "metadata": {}, "output_type": "display_data" diff --git a/docs/applications/renderer.ipynb b/docs/applications/renderer.ipynb index e54f302a..cb979d3a 100644 --- a/docs/applications/renderer.ipynb +++ b/docs/applications/renderer.ipynb @@ -22,24 +22,6 @@ "In what follows, we provide examples for both specification formats using a very simple dataset." ] }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } - }, - "outputs": [], - "source": [ - "# Suppressing warnings raised by altair in the background\n", - "# (iteration-related deprecation warnings)\n", - "import warnings\n", - "\n", - "warnings.filterwarnings(\"ignore\")" - ] - }, { "cell_type": "code", "execution_count": 22, diff --git a/docs/facts/examples.ipynb b/docs/facts/examples.ipynb index 55a68d24..183ff701 100644 --- a/docs/facts/examples.ipynb +++ b/docs/facts/examples.ipynb @@ -10,25 +10,6 @@ "Draco's specification of visualizations (i.e. charts) support single view and multi view charts. The specification is inspired by [Vega-Lite](https://vega.github.io/vega-lite/)." ] }, - { - "cell_type": "code", - "execution_count": 1, - "id": "250c30ea", - "metadata": { - "ExecuteTime": { - "end_time": "2023-04-10T11:39:10.621334Z", - "start_time": "2023-04-10T11:39:09.614980Z" - } - }, - "outputs": [], - "source": [ - "# Suppressing warnings raised by altair in the background\n", - "# (iteration-related deprecation warnings)\n", - "import warnings\n", - "\n", - "warnings.filterwarnings(\"ignore\")" - ] - }, { "cell_type": "code", "execution_count": 2,