commit fb9265fd59811d913d9915782c3dbe1864227c961dc5db695bc51bf59cbabd0e Author: Todd R Date: Fri Apr 26 20:02:17 2019 +0000 Accepting request 698418 from home:TheBlackCat:branches:devel:languages:python:jupyter - Rename to to match python package naming guidelines. - Update to 0.9.1 * Only pass absolute config path if config file exists * Ignore .pytest_cache * Mark cells in generated notebook as run * Rerun sample notebook * Pass coverage config file by absolute path * Respect the --color=no option * Ensure test works on python 2 * Optionally mark run cells with exc. count in tests - Initial version OBS-URL: https://build.opensuse.org/request/show/698418 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbval?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/nbval-0.9.1.tar.gz b/nbval-0.9.1.tar.gz new file mode 100644 index 0000000..4f6c469 --- /dev/null +++ b/nbval-0.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f18b87af4e94ccd073263dd58cd3eebabe9f5e4d6ab535b39d3af64811c7eda +size 64476 diff --git a/python-nbval.changes b/python-nbval.changes new file mode 100644 index 0000000..59854e5 --- /dev/null +++ b/python-nbval.changes @@ -0,0 +1,22 @@ +------------------------------------------------------------------- +Thu Apr 25 01:59:57 UTC 2019 - Todd R + +- Rename to to match python package naming guidelines. + +------------------------------------------------------------------- +Thu Aug 2 17:25:44 UTC 2018 - toddrme2178@gmail.com + +- Update to 0.9.1 + * Only pass absolute config path if config file exists + * Ignore .pytest_cache + * Mark cells in generated notebook as run + * Rerun sample notebook + * Pass coverage config file by absolute path + * Respect the --color=no option + * Ensure test works on python 2 + * Optionally mark run cells with exc. count in tests + +------------------------------------------------------------------- +Fri Apr 20 20:41:39 UTC 2018 - toddrme2178@gmail.com + +- Initial version diff --git a/python-nbval.spec b/python-nbval.spec new file mode 100644 index 0000000..bc8c178 --- /dev/null +++ b/python-nbval.spec @@ -0,0 +1,98 @@ +# +# spec file for package python-nbval +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-nbval +Version: 0.9.1 +Release: 0 +Summary: A pytest plugin to validate Jupyter notebooks +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/computationalmodelling/nbval +Source: https://files.pythonhosted.org/packages/source/n/nbval/nbval-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-certifi +Requires: python-coverage +Requires: python-ipykernel +Requires: python-jupyter_client +Requires: python-nbdime +Requires: python-nbformat +Requires: python-pytest >= 2.8 +Requires: python-six +Recommends: python-matplotlib +Recommends: python-pytest-cov +Recommends: python-pytest-timeout +Recommends: python-sympy +Provides: python-jupyter_nbval = %{version} +Obsoletes: python-jupyter_nbval <= %{version} +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module certifi} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module ipykernel} +BuildRequires: %{python_module jupyter_client} +BuildRequires: %{python_module matplotlib} +BuildRequires: %{python_module nbdime} +BuildRequires: %{python_module nbformat} +BuildRequires: %{python_module notebook} +BuildRequires: %{python_module pyinotify} +BuildRequires: %{python_module pytest >= 2.8} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest-timeout} +BuildRequires: %{python_module six} +BuildRequires: %{python_module sympy} +# /SECTION +%ifpython3 +Provides: jupyter-nbval = %{version} +%endif +%python_subpackages + +%description +The plugin adds functionality to py.test to recognise and collect +Jupyter notebooks. The intended purpose of the tests is to determine +whether execution of the stored inputs match the stored outputs of +the .ipynb file. Whilst also ensuring that the notebooks are running +without errors. + +The tests were designed to ensure that Jupyter notebooks (especially +those for reference and documentation), are executing consistently. + +Each cell is taken as a test, a cell that doesn't reproduce the +expected output will fail. + +%prep +%setup -q -n nbval-%{version} +sed -i 's/\r$//' README.md + +%build +export LANG=en_US.UTF-8 +%python_build + +%install +export LANG=en_US.UTF-8 +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/* + +%changelog