Skip to content

Commit

Permalink
DX: remove figure_formats = ["svg"] statement (#221)
Browse files Browse the repository at this point in the history
* DOC: plot with SVG where needed
* MAINT: sort and clean up `pip install` statements
  • Loading branch information
redeboer authored Dec 2, 2023
1 parent 67b82b9 commit 0bf491a
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
)$
- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.1.4
rev: 0.1.5
hooks:
- id: check-dev-files
args:
Expand Down
1 change: 0 additions & 1 deletion docs/report/000.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
2 changes: 1 addition & 1 deletion docs/report/001.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -255,6 +254,7 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"x = sp.Symbol(\"x\")\n",
"expr = ComplexSqrt(x)\n",
"p1 = sp.plot(sp.re(expr), (x, -1, 2), show=False, line_color=\"red\")\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/report/002.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -77,7 +76,7 @@
},
"outputs": [],
"source": [
"%pip install -q ampform==0.9.1 numpy==1.19.5 pandas==1.2.4 pandas==1.2.4 qrules==0.8.2 sympy==1.8 tensorwaves[jax]==0.2.9 git+https://github.com/zfit/phasespace@7131fbd"
"%pip install -q ampform==0.9.1 numpy==1.19.5 pandas==1.2.4 qrules==0.8.2 sympy==1.8 tensorwaves[jax]==0.2.9 git+https://github.com/zfit/phasespace@7131fbd"
]
},
{
Expand All @@ -93,6 +92,7 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"from __future__ import annotations\n",
"\n",
"import inspect\n",
Expand Down
3 changes: 2 additions & 1 deletion docs/report/003.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -114,6 +113,7 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import inspect\n",
"import warnings\n",
"from functools import partial\n",
Expand Down Expand Up @@ -391,6 +391,7 @@
"source_hidden": true
},
"tags": [
"full-width",
"remove-output",
"hide-cell"
]
Expand Down
1 change: 0 additions & 1 deletion docs/report/004.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/005.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
22 changes: 9 additions & 13 deletions docs/report/006.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -239,7 +238,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -333,7 +334,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Simplest option is to use the [`ipywidgets.interact()`](https://ipywidgets.readthedocs.io/en/stable/examples/Using%20Interact.html) function:"
"Simplest option is to use the [`ipywidgets.interact()`](https://ipywidgets.readthedocs.io/en/stable/examples/Using%20Interact.html) function:\n",
"\n",
"{{ run_interactive }}"
]
},
{
Expand Down Expand Up @@ -370,15 +373,6 @@
" fig2.canvas.draw_idle()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"{{ run_interactive }}\n",
"\n",
"![ipywidgets interactive output with interact()](https://user-images.githubusercontent.com/29308176/164993432-3003e5b4-e49f-4e24-b4ee-dbcfdd0805b5.svg)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -397,7 +391,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
Expand Down
1 change: 0 additions & 1 deletion docs/report/007.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/008.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/009.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/010.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/011.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/012.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
2 changes: 1 addition & 1 deletion docs/report/013.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -87,6 +86,7 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import logging\n",
"import warnings\n",
"\n",
Expand Down
3 changes: 1 addition & 2 deletions docs/report/014.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -69,7 +68,7 @@
},
"outputs": [],
"source": [
"%pip install -q git+https://github.com/ComPWA/ampform@3ed3ed5 qrules[viz]==0.9.7 sympy==1.9"
"%pip install -q qrules[viz]==0.9.7 sympy==1.9 git+https://github.com/ComPWA/ampform@3ed3ed5"
]
},
{
Expand Down
1 change: 0 additions & 1 deletion docs/report/015.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/016.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
2 changes: 1 addition & 1 deletion docs/report/017.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -86,6 +85,7 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"from __future__ import annotations\n",
"\n",
"import warnings\n",
Expand Down
1 change: 0 additions & 1 deletion docs/report/018.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
1 change: 0 additions & 1 deletion docs/report/019.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down
2 changes: 1 addition & 1 deletion docs/report/020.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
Expand Down Expand Up @@ -88,6 +87,7 @@
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"import logging\n",
"import os\n",
"import warnings\n",
Expand Down
Loading

0 comments on commit 0bf491a

Please sign in to comment.