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
This commit is contained in:
Todd R 2019-04-26 20:02:17 +00:00 committed by Git OBS Bridge
commit fb9265fd59
5 changed files with 147 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
nbval-0.9.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3f18b87af4e94ccd073263dd58cd3eebabe9f5e4d6ab535b39d3af64811c7eda
size 64476

22
python-nbval.changes Normal file
View File

@ -0,0 +1,22 @@
-------------------------------------------------------------------
Thu Apr 25 01:59:57 UTC 2019 - Todd R <toddrme2178@gmail.com>
- 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

98
python-nbval.spec Normal file
View File

@ -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