From 78bde4551d6c54a2c7473a90b3ead64e551bc4dfb421516064509a5e2ae67dd5 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Wed, 25 Sep 2024 09:10:18 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbval?expand=0&rev=26 --- .gitattributes | 23 +++++++++ .gitignore | 1 + _multibuild | 3 ++ nbval-0.11.0.tar.gz | 3 ++ python-nbval.changes | 114 +++++++++++++++++++++++++++++++++++++++++++ python-nbval.spec | 109 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 253 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 nbval-0.11.0.tar.gz create mode 100644 python-nbval.changes create mode 100644 python-nbval.spec 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/_multibuild b/_multibuild new file mode 100644 index 0000000..ec2fdbb --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + \ No newline at end of file diff --git a/nbval-0.11.0.tar.gz b/nbval-0.11.0.tar.gz new file mode 100644 index 0000000..4d19e5e --- /dev/null +++ b/nbval-0.11.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77c95797607b0a968babd2597ee3494102d25c3ad37435debbdac0e46e379094 +size 62718 diff --git a/python-nbval.changes b/python-nbval.changes new file mode 100644 index 0000000..8625fdc --- /dev/null +++ b/python-nbval.changes @@ -0,0 +1,114 @@ +------------------------------------------------------------------- +Fri Mar 8 13:20:47 UTC 2024 - Ben Greiner + +- Update to 0.11.0 + * no release notes + * pure maintenance +- Skip python39: no longer supported since ipython 8.19 (via + ipykernel) + +------------------------------------------------------------------- +Sun Jan 15 20:30:34 UTC 2023 - Ben Greiner + +- Update to 0.10.0 + * no release notes +- Drop nbval-filter-mpldeprecation.patch +- Drop nbval-sanitize-figure-size.patch +- Drop 0001-Make-tests-pass-with-ipykernel-6.0.0.patch + +------------------------------------------------------------------- +Sat Aug 20 17:48:52 UTC 2022 - Ben Greiner + +- Remove python36 skiptest code +- Add nbval-sanitize-figure-size.patch + * gh#computationalmodelling/nbval#183 + +------------------------------------------------------------------- +Mon Nov 15 18:46:36 UTC 2021 - Ben Greiner + +- Multibuild test flavor: avoid (possible) build cycle + +------------------------------------------------------------------- +Sun Aug 29 13:12:23 UTC 2021 - Ben Greiner + +- Add 0001-Make-tests-pass-with-ipykernel-6.0.0.patch from Arch + +------------------------------------------------------------------- +Wed Apr 14 13:53:04 UTC 2021 - Ben Greiner + +- Add nbval-filter-mpldeprecation.patch for new Matplotlib 3.4 + deprecation warnings -- gh#computationalmodelling/nbval#167 + +------------------------------------------------------------------- +Fri Feb 26 22:34:46 UTC 2021 - Ben Greiner + +- Don't test numpy and matplotlib with Python 3.6: There is no + python36-numpy and python36-matplotlib in TW. (NEP 29) + +------------------------------------------------------------------- +Thu Dec 17 12:12:35 UTC 2020 - Benjamin Greiner + +- Update to 0.9.6 + * fix compatibility with pytest >= 6 and python 3.8 +- enable tests + +------------------------------------------------------------------- +Tue Dec 15 12:52:44 UTC 2020 - Benjamin Greiner + +- Provide the old jupyter package name only for the primary + Python3 interpreter -- gh#openSUSE/python-rpm-macros#66 + +------------------------------------------------------------------- +Mon Feb 24 15:50:14 UTC 2020 - Todd R + +- Update to 0.9.5 + * Add Python 3.8 to Appveyor + * Allow Python nightly fail in Travis + * Fix coverage for coverage.py >=5 + * Add Python 3.8 to Travis + +------------------------------------------------------------------- +Wed Jan 15 15:07:57 UTC 2020 - Todd R + +- Update to 0.9.4 + * Mark nbval as incompatible with coverage + * Workaround for Python 3.7 on Travis no longer needed + * Drop Python 2.7 testing on Windows again + +------------------------------------------------------------------- +Tue Nov 12 17:32:31 UTC 2019 - Todd R + +- Update to 0.9.3 + * Use a MULTILINE anchored regex when removing carriage returns +- Drop python2 support due to python-notebook dropping python2 support + +------------------------------------------------------------------- +Mon Jul 29 02:33:24 UTC 2019 - Todd R + +- Update to 0.9.2 + * Update latex tests' output + * Do not compare widget views + * Replace deprecated warning API + +------------------------------------------------------------------- +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..fb2dc67 --- /dev/null +++ b/python-nbval.spec @@ -0,0 +1,109 @@ +# +# spec file for package python-nbval +# +# Copyright (c) 2024 SUSE LLC +# +# 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/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + +Name: python-nbval%{psuffix} +Version: 0.11.0 +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 base >= 3.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-coverage +Requires: python-ipykernel +Requires: python-jupyter-client +Requires: python-nbformat +Requires: python-pytest >= 7 +Provides: python-jupyter_nbval = %{version} +Obsoletes: python-jupyter_nbval < %{version} +BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module matplotlib} +BuildRequires: %{python_module nbdime} +BuildRequires: %{python_module nbval = %{version}} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module sympy} +%endif +%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3" +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 +%autosetup -p1 -n nbval-%{version} +sed -i 's/\r$//' README.md + +%if ! %{with test} +%build +export LANG=en_US.UTF-8 +%pyproject_wheel + +%install +export LANG=en_US.UTF-8 +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%if %{with test} +%check +# see dodo.py for call signature +%{pytest tests/ --nbval \ + --nbval-current-env \ + --nbval-sanitize-with tests/sanitize_defaults.cfg \ + --ignore tests/ipynb-test-samples +} +%endif + +%if ! %{with test} +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/nbval +%{python_sitelib}/nbval-%{version}.dist-info +%endif + +%changelog From 4970a2e2d90805ffbf0ebdf5ce5d42adea2c7f5652c77b5e86dbaeb5869d2567 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Wed, 25 Sep 2024 11:23:27 +0000 Subject: [PATCH 2/2] - Add %{?sle15_python_module_pythons} OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbval?expand=0&rev=27 --- python-nbval.changes | 5 +++++ python-nbval.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/python-nbval.changes b/python-nbval.changes index 8625fdc..91fed0b 100644 --- a/python-nbval.changes +++ b/python-nbval.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Sep 25 08:26:49 UTC 2024 - ecsos + +- Add %{?sle15_python_module_pythons} + ------------------------------------------------------------------- Fri Mar 8 13:20:47 UTC 2024 - Ben Greiner diff --git a/python-nbval.spec b/python-nbval.spec index fb2dc67..3b3653c 100644 --- a/python-nbval.spec +++ b/python-nbval.spec @@ -25,6 +25,7 @@ %bcond_with test %endif +%{?sle15_python_module_pythons} Name: python-nbval%{psuffix} Version: 0.11.0 Release: 0