Accepting request 1062691 from devel:languages:python:jupyter

- Modify Example.ipynb because nbval 0.10 abolished saving the
  input history (forwarded request 1062690 from bnavigator)

OBS-URL: https://build.opensuse.org/request/show/1062691
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jupyterlab-pygments?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2023-02-03 21:05:35 +00:00 committed by Git OBS Bridge
commit 5a87007923
3 changed files with 14 additions and 4 deletions

View File

@ -18,6 +18,7 @@
"metadata": {},
"outputs": [],
"source": [
"mycode = \"\"\"\n",
"class PythonCode:\n",
" def __init__(self, value):\n",
" self.value = value\n",
@ -25,7 +26,9 @@
" def _repr_html_(self, **kwargs):\n",
" formatter = HtmlFormatter(style=JupyterStyle)\n",
" html = highlight(self.value, PythonLexer(), formatter)\n",
" return f'<div class=\"highlight\">{html}</div>'"
" return f'<div class=\"highlight\">{html}</div>'\n",
"\"\"\"\n",
"exec(mycode)"
]
},
{
@ -41,7 +44,7 @@
"metadata": {},
"outputs": [],
"source": [
"PythonCode(In[2])"
"PythonCode(mycode)"
]
}
],

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 2 17:16:28 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Modify Example.ipynb because nbval 0.10 abolished saving the
input history
-------------------------------------------------------------------
Sun Dec 25 11:39:59 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -33,7 +33,8 @@ License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/jupyterlab/jupyterlab_pygments
Source: https://files.pythonhosted.org/packages/py2.py3/j/jupyterlab-pygments/jupyterlab_pygments-%{version}-py2.py3-none-any.whl
Source1: https://raw.githubusercontent.com/jupyterlab/jupyterlab_pygments/%{version}/notebooks/Example.ipynb
# Slightly modified from https://github.com/jupyterlab/jupyterlab_pygments/blob/0.2.2/notebooks/Example.ipynb
Source1: Example.ipynb
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: fdupes