[bug#47906,00/22] Add Spyder

Message ID 20210420051907.470294-1-monego@posteo.net
Headers show
Series Add Spyder | expand

Message

Vinicius Monego April 20, 2021, 5:19 a.m. UTC
Hello Guix.

This series adds the Spyder IDE with all testing dependencies. The spyder package still has some rough edges: there is a warning about the parso version on startup, I had to disable the tests and there's a bug when importing numpy from a script (seems to be an issue with the numpy version). See

https://github.com/numpy/numpy/issues/14384

. Everything else seems to work after brief testing.

I didn't check if the qtconsole, watchdog and qdarkstyle updates would break other packages though.

Vinicius Monego (22):
  gnu: Add python-spyder-kernels.
  gnu: Add python-textdistance.
  gnu: Add python-three-merge.
  gnu: Add python-pyls-black.
  gnu: Add python-pyls-spyder.
  gnu: python-watchdog: Update to 1.0.2.
  gnu: python-qtconsole: Update to 5.0.3.
  gnu: python-qtconsole: Enable tests.
  gnu: Add python-tinycss.
  gnu: Add python-qstylizer.
  gnu: python-language-server: Enable tests.
  gnu: Add python-pytest-qt.
  gnu: Add python-qtawesome.
  gnu: Add python-qtsass.
  gnu: python-qdarkstyle: Update to 3.0.2.
  gnu: Add python-easyprocess.
  gnu: Add python-entrypoint2.
  gnu: Add python-pyvirtualdisplay.
  gnu: Add python-pytest-xvfb.
  gnu: python-diff-match-patch: Update to 20200713.
  gnu: python-language-server: Relax dependency versions.
  gnu: Add spyder.

 gnu/local.mk                  |   3 +-
 gnu/packages/python-check.scm |  76 ++++++-
 gnu/packages/python-web.scm   |  45 ++++-
 gnu/packages/python-xyz.scm   | 366 +++++++++++++++++++++++++++++++---
 gnu/packages/spyder.scm       | 229 ++++++++++++++++++++++
 5 files changed, 693 insertions(+), 30 deletions(-)
 create mode 100644 gnu/packages/spyder.scm

Comments

Nicolas Goaziou May 26, 2021, 9:46 p.m. UTC | #1
Hello,

Vinicius Monego <monego@posteo.net> writes:

> This series adds the Spyder IDE with all testing dependencies. 

I tried to build Spyder but python-qtawesome fails to build with the
following error message. Do you know where it could come from?

--8<---------------cut here---------------start------------->8---
============================= test session starts ==============================
platform linux -- Python 3.8.2, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
PySide2 5.14.2.3 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2
rootdir: /tmp/guix-build-python-qtawesome-1.0.2.drv-0/QtAwesome-1.0.2
plugins: qt-3.3.0
collected 5 items

qtawesome/tests/test_icon_browser.py .FF                                 [ 60%]
qtawesome/tests/test_qtawesome.py ..                                     [100%]

=================================== FAILURES ===================================
__________________________________ test_copy ___________________________________

qtbot = <pytestqt.qtbot.QtBot object at 0x7fffef9dc1c0>
browser = <qtawesome.icon_browser.IconBrowser object at 0x7fffeffb4790>

    def test_copy(qtbot, browser):
        """
        Ensure the copy UX works
        """
        clipboard = QtWidgets.QApplication.instance().clipboard()
    
        clipboard.setText('')
    
        assert clipboard.text() == ""
    
        # Enter a search term and press enter
>       qtbot.keyClicks(browser._lineEdit, 'google')

qtawesome/tests/test_icon_browser.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<PyQt5.QtWidgets.QLineEdit object at 0x7fffeffb4ca0>, 'google')
kwargs = {}

    def result(*args, **kwargs):
>       return qtest_method(*args, **kwargs)
E       TypeError: 'PySide2.QtTest.QTest.keyClicks' called with wrong argument types:
E         PySide2.QtTest.QTest.keyClicks(QLineEdit, str)
E       Supported signatures:
E         PySide2.QtTest.QTest.keyClicks(PySide2.QtWidgets.QWidget, str, PySide2.QtCore.Qt.KeyboardModifiers = PySide2.QtCore.Qt.KeyboardModifier.NoModifier, int = -1)

/gnu/store/ni4pqis58imdjnlj9r29ig2ki0ry29ir-python-pytest-qt-3.3.0/lib/python3.8/site-packages/pytestqt/qtbot.py:626: TypeError
_________________________________ test_filter __________________________________

qtbot = <pytestqt.qtbot.QtBot object at 0x7fffef9e1850>
browser = <qtawesome.icon_browser.IconBrowser object at 0x7fffeffb44c0>

    def test_filter(qtbot, browser):
        """
        Ensure the filter UX works
        """
        initRowCount = browser._listView.model().rowCount()
        assert initRowCount > 0
    
        # Enter a search term
>       qtbot.keyClicks(browser._lineEdit, 'google')

qtawesome/tests/test_icon_browser.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<PyQt5.QtWidgets.QLineEdit object at 0x7fffef987790>, 'google')
kwargs = {}

    def result(*args, **kwargs):
>       return qtest_method(*args, **kwargs)
E       TypeError: 'PySide2.QtTest.QTest.keyClicks' called with wrong argument types:
E         PySide2.QtTest.QTest.keyClicks(QLineEdit, str)
E       Supported signatures:
E         PySide2.QtTest.QTest.keyClicks(PySide2.QtWidgets.QWidget, str, PySide2.QtCore.Qt.KeyboardModifiers = PySide2.QtCore.Qt.KeyboardModifier.NoModifier, int = -1)

/gnu/store/ni4pqis58imdjnlj9r29ig2ki0ry29ir-python-pytest-qt-3.3.0/lib/python3.8/site-packages/pytestqt/qtbot.py:626: TypeError
=============================== warnings summary ===============================
qtawesome/tests/test_icon_browser.py::test_browser_init
qtawesome/tests/test_icon_browser.py::test_browser_init
qtawesome/tests/test_icon_browser.py::test_copy
qtawesome/tests/test_icon_browser.py::test_copy
qtawesome/tests/test_icon_browser.py::test_filter
qtawesome/tests/test_icon_browser.py::test_filter
  /tmp/guix-build-python-qtawesome-1.0.2.drv-0/QtAwesome-1.0.2/qtawesome/icon_browser.py:170: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
    self.setGridSize(QtCore.QSize(tileWidth, tileWidth))

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================== 2 failed, 3 passed, 6 warnings in 0.38s ====================
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "pytest" failed with status 1
--8<---------------cut here---------------end--------------->8---

Note that most of the packages in this patch set have been applied already.

Regards,
Vinicius Monego April 20, 2023, 12:29 a.m. UTC | #2
Leaving here this issue on upstream to track progress on the freedom 
status of python-qtawesome: 
https://github.com/spyder-ide/qtawesome/issues/220