From 6ad1d910f588252aae5d2125de17a9329250a2c8 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Sat, 2 Dec 2023 21:17:43 +0100 Subject: [PATCH] DX: remove `figure_formats = ["svg"]` statement (#368) * DOC: remove duplicate widget rendering * DOC: plot with SVG where needed --- .pre-commit-config.yaml | 2 +- docs/usage.ipynb | 1 - docs/usage/amplitude.ipynb | 2 +- docs/usage/dynamics.ipynb | 2 +- docs/usage/dynamics/analytic-continuation.ipynb | 2 +- docs/usage/dynamics/custom.ipynb | 2 +- docs/usage/dynamics/k-matrix.ipynb | 7 +++++-- docs/usage/helicity/formalism.ipynb | 1 - docs/usage/helicity/spin-alignment.ipynb | 1 - docs/usage/interactive.ipynb | 2 +- docs/usage/kinematics.ipynb | 1 - docs/usage/modify.ipynb | 1 - docs/usage/symplot.ipynb | 2 +- 13 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index adba74a73..069d7a0ca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.1.4 + rev: 0.1.5 hooks: - id: check-dev-files args: diff --git a/docs/usage.ipynb b/docs/usage.ipynb index 8bcbe17bd..471bcc5ad 100644 --- a/docs/usage.ipynb +++ b/docs/usage.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" diff --git a/docs/usage/amplitude.ipynb b/docs/usage/amplitude.ipynb index a4f69cd25..a14a312ad 100644 --- a/docs/usage/amplitude.ipynb +++ b/docs/usage/amplitude.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" @@ -77,6 +76,7 @@ }, "outputs": [], "source": [ + "%config InlineBackend.figure_formats = ['svg']\n", "import sympy as sp\n", "from IPython.display import Math\n", "\n", diff --git a/docs/usage/dynamics.ipynb b/docs/usage/dynamics.ipynb index b49669145..34fd56954 100644 --- a/docs/usage/dynamics.ipynb +++ b/docs/usage/dynamics.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" @@ -114,6 +113,7 @@ }, "outputs": [], "source": [ + "%config InlineBackend.figure_formats = ['svg']\n", "import logging\n", "import warnings\n", "\n", diff --git a/docs/usage/dynamics/analytic-continuation.ipynb b/docs/usage/dynamics/analytic-continuation.ipynb index e0823bee1..7b94fd021 100644 --- a/docs/usage/dynamics/analytic-continuation.ipynb +++ b/docs/usage/dynamics/analytic-continuation.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" @@ -109,6 +108,7 @@ }, "outputs": [], "source": [ + "%config InlineBackend.figure_formats = ['svg']\n", "import warnings\n", "\n", "import sympy as sp\n", diff --git a/docs/usage/dynamics/custom.ipynb b/docs/usage/dynamics/custom.ipynb index dc81b30e7..0d44c6cfe 100644 --- a/docs/usage/dynamics/custom.ipynb +++ b/docs/usage/dynamics/custom.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" @@ -77,6 +76,7 @@ }, "outputs": [], "source": [ + "%config InlineBackend.figure_formats = ['svg']\n", "from __future__ import annotations\n", "\n", "import graphviz\n", diff --git a/docs/usage/dynamics/k-matrix.ipynb b/docs/usage/dynamics/k-matrix.ipynb index 7854630f0..666eedcef 100644 --- a/docs/usage/dynamics/k-matrix.ipynb +++ b/docs/usage/dynamics/k-matrix.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" @@ -1135,6 +1134,7 @@ }, "tags": [ "hide-input", + "remove-output", "scroll-input" ] }, @@ -1787,7 +1787,9 @@ "cell_type": "code", "execution_count": null, "metadata": { - "tags": [] + "tags": [ + "remove-output" + ] }, "outputs": [], "source": [ @@ -1809,6 +1811,7 @@ "source_hidden": true }, "tags": [ + "full-width", "remove-input" ] }, diff --git a/docs/usage/helicity/formalism.ipynb b/docs/usage/helicity/formalism.ipynb index bac6ae565..7c9f22dbf 100644 --- a/docs/usage/helicity/formalism.ipynb +++ b/docs/usage/helicity/formalism.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" diff --git a/docs/usage/helicity/spin-alignment.ipynb b/docs/usage/helicity/spin-alignment.ipynb index add30e167..96f26d69e 100644 --- a/docs/usage/helicity/spin-alignment.ipynb +++ b/docs/usage/helicity/spin-alignment.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" diff --git a/docs/usage/interactive.ipynb b/docs/usage/interactive.ipynb index 31e38f57f..4ecefc178 100644 --- a/docs/usage/interactive.ipynb +++ b/docs/usage/interactive.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" @@ -480,6 +479,7 @@ }, "outputs": [], "source": [ + "%config InlineBackend.figure_formats = ['svg']\n", "import matplotlib.pyplot as plt\n", "import mpl_interactions.ipyplot as iplt\n", "\n", diff --git a/docs/usage/kinematics.ipynb b/docs/usage/kinematics.ipynb index 915ef7426..7eb6453aa 100644 --- a/docs/usage/kinematics.ipynb +++ b/docs/usage/kinematics.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" diff --git a/docs/usage/modify.ipynb b/docs/usage/modify.ipynb index 9c30f6643..e201e6904 100644 --- a/docs/usage/modify.ipynb +++ b/docs/usage/modify.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" diff --git a/docs/usage/symplot.ipynb b/docs/usage/symplot.ipynb index 93d58631e..71a8c5ad2 100644 --- a/docs/usage/symplot.ipynb +++ b/docs/usage/symplot.ipynb @@ -43,7 +43,6 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_formats = ['svg']\n", "import os\n", "\n", "STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" @@ -189,6 +188,7 @@ }, "outputs": [], "source": [ + "%config InlineBackend.figure_formats = ['svg']\n", "import matplotlib.pyplot as plt\n", "import mpl_interactions.ipyplot as iplt\n", "import numpy as np\n",