Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package jupyter-imatlab for openSUSE:Factory 
checked in at 2021-03-30 20:59:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jupyter-imatlab (Old)
 and      /work/SRC/openSUSE:Factory/.jupyter-imatlab.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jupyter-imatlab"

Tue Mar 30 20:59:05 2021 rev:5 rq:869694 version:0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/jupyter-imatlab/jupyter-imatlab.changes  
2020-01-03 17:37:41.019317203 +0100
+++ 
/work/SRC/openSUSE:Factory/.jupyter-imatlab.new.2401/jupyter-imatlab.changes    
    2021-03-30 20:59:07.500633875 +0200
@@ -1,0 +2,7 @@
+Wed Feb  3 23:26:54 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Fix wheel install path for new python-rpm-macros
+- pyproject_install already recompiles, no need for second time
+- Support testing (if you have MATLAB) 
+
+-------------------------------------------------------------------

New:
----
  test_imatlab.py

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jupyter-imatlab.spec ++++++
--- /var/tmp/diff_new_pack.hLxtMq/_old  2021-03-30 20:59:09.316635870 +0200
+++ /var/tmp/diff_new_pack.hLxtMq/_new  2021-03-30 20:59:09.320635874 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package jupyter-imatlab
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,8 @@
 
 
 %define pythons python3
-%bcond_without  test
+# We can only test if the commercial MATLAB Engine API for Python is installed
+%bcond_with  test
 Name:           jupyter-imatlab
 Version:        0.4
 Release:        0
@@ -26,6 +27,7 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/imatlab/imatlab
 Source0:        
https://files.pythonhosted.org/packages/py3/i/imatlab/imatlab-%{version}-py3-none-any.whl
+Source1:        
https://raw.githubusercontent.com/imatlab/imatlab/master/test_imatlab.py
 BuildRequires:  fdupes
 BuildRequires:  jupyter-ipykernel >= 4.1
 BuildRequires:  jupyter-ipython >= 6
@@ -34,6 +36,10 @@
 BuildRequires:  python3-pip
 BuildRequires:  python3-plotly
 BuildRequires:  unzip
+%if %{with test}
+BuildRequires:  python3-curses
+BuildRequires:  python3-jupyter-kernel-test
+%endif
 Requires:       jupyter-ipykernel >= 4.1
 Requires:       jupyter-ipython >= 6
 Requires:       jupyter-widgetsnbextension >= 1.0
@@ -53,6 +59,7 @@
 
 %prep
 %setup -q -T -c
+cp %{SOURCE1} .
 
 %build
 # Make mock MATLAB engine to allow kernel installation.
@@ -61,16 +68,21 @@
 echo 'EngineError = MatlabExecutionError = Exception' > matlab/engine.py
 
 %install
-cp -a %{SOURCE0} .
+%{python_expand mkdir build; cp -a %{SOURCE0} build/}
 %pyproject_install
-# avoid time-based .pyc files for reproducibility:
-%py3_compile %{buildroot}%{python3_sitelib}
-
 PYTHONPATH=%{buildroot}%{python3_sitelib} python3 -m imatlab install --prefix 
%{buildroot}%{_prefix}
+cp %{buildroot}%{python3_sitelib}/imatlab-%{version}.dist-info/LICENSE.txt .
+%fdupes %{buildroot}%{python3_sitelib}
+
+%check
+%if %{with test}
+export JUPYTER_PATH=%{buildroot}%{_jupyter_prefix}
+%pyunittest -v test_imatlab.py
+%endif
 
 %files
+%license LICENSE.txt
 %{python3_sitelib}/imatlab-%{version}.dist-info
-%license %{python3_sitelib}/imatlab-%{version}.dist-info/LICENSE.txt
 %{python3_sitelib}/imatlab/
 %{_jupyter_kernel_dir}/imatlab/
 


++++++ test_imatlab.py ++++++
# import re

import jupyter_kernel_test as jkt


class IMatlabTests(jkt.KernelTests):

    kernel_name = "imatlab"
    language_name = "matlab"
    file_extension = ".m"
    code_hello_world = "fprintf('hello, world') % some comment"
    code_stderr = "fprintf(2, 'oops')"
    completion_samples = [
        {"text": "matlabroo", "matches": ["matlabroot"]},
        # Not including prefix (only `cursor_start:cursor_end`).
        {"text": "ls setup.", "matches": ["setup.cfg", "setup.py"]},
    ]
    complete_code_samples = [
        "1+1",
        "for i=1:3\ni\nend",
        # FIXME The following should be considered "invalid", but really all
        # that matters is that they are not "incomplete".
        "function test_complete",
        "function test_complete, end",
        "classdef test_complete, end",
    ]
    incomplete_code_samples = [
        "for i=1:3",
        # FIXME We'd rather consider this as "invalid".
        "classdef test_complete",
    ]
    invalid_code_samples = [
        "for end",
    ]
    code_display_data = [
        {"code": "set(0, 'defaultfigurevisible', 'off'); "
                 "imatlab_export_fig('print-png'); "
                 "plot([1, 2]);",
         "mime": "image/png"},
    ]
    code_inspect_sample = "help"

    # FIXME We actually never send "data" back -- only print it.

    # code_generate_error = "[1, 2] + [3, 4, 5];"
    # code_execute_result = [
    #     {"code": "1+1;", "result": ""},
    # ]

    # FIXME History operations are not tested as (as mentioned in the docs)
    # they are unnecessary (re-implemented by the frontends, overly complex).

    # supported_history_operations = ["tail", "range", "search"]
    # code_history_pattern = [
    #     re.escape("1+1"),
    # ]

    # FIXME Not available.

    # code_page_something = None
    # code_clear_output = None

Reply via email to