sigma-py / orthopy

:triangular_ruler: Orthogonal polynomials in all shapes and sizes.
181 stars 18 forks source link

Some tests are not passing (unexpected keyword argument 'colorspace') #114

Closed carlosal1015 closed 2 years ago

carlosal1015 commented 2 years ago

Hi, from last friday the test were passing, but today when install I have this message. Thanks in advance for support. This is the full log.

===================================================================================== FAILURES ======================================================================================
_________________________________________________________________________________ code block check __________________________________________________________________________________
line 246, line 246:

import orthopy

orthopy.u3.write_tree("u3.vtk", 5, "quantum mechanic")

get_srgb1() got an unexpected keyword argument 'colorspace'
_________________________________________________________________________________ test_write_single _________________________________________________________________________________

n = 5, r = 3

    def test_write_single(n=5, r=3):
>       orthopy.u3.write_single(f"sph{n}{r}.vtk", n, r, "quantum mechanic")

tests/test_u3.py:142: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

filename = 'sph53.vtk', n = 5, r = 3, scaling = 'quantum mechanic', res = 20

    def write_single(filename, n, r, scaling, res=20):
        """This function creates a sphere mesh with "srgb1" values. Can be views in ParaView
        by disabling "Map Scalars".
        """
        import cplot
        import meshio
        import meshzoo

        points, cells = meshzoo.icosa_sphere(res)

        evaluator = EvalCartesian(points.T, scaling, complex_valued=True)
        vals = next(itertools.islice(evaluator, n, None))[r]

>       srgb1_vals = cplot.get_srgb1(vals, colorspace="cam16")
E       TypeError: get_srgb1() got an unexpected keyword argument 'colorspace'

tmp_install/usr/lib/python3.10/site-packages/orthopy/u3/tools.py:21: TypeError
__________________________________________________________________________________ test_write_tree __________________________________________________________________________________

n = 2

    def test_write_tree(n=2):
>       orthopy.u3.write_tree(f"sph{n}.vtk", n, "quantum mechanic")

tests/test_u3.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

filename = 'sph2.vtk', n = 2, scaling = 'quantum mechanic', res = 20

    def write_tree(filename, n, scaling, res=20):
        import cplot
        import meshio
        import meshzoo

        points, cells = meshzoo.icosa_sphere(res)

        evaluator = EvalCartesian(points.T, scaling, complex_valued=True)
        meshes = []
        for L, level in enumerate(itertools.islice(evaluator, n)):
            for k, vals in enumerate(level):
>               srgb1_vals = cplot.get_srgb1(vals, colorspace="cam16")
E               TypeError: get_srgb1() got an unexpected keyword argument 'colorspace'

tmp_install/usr/lib/python3.10/site-packages/orthopy/u3/tools.py:39: TypeError
================================================================================= warnings summary ==================================================================================
tests/test_cn.py::test_show_tree[2]
tests/test_cn.py::test_show_tree[2]
  /tmp/makepkg/python-orthopy/src/orthopy-0.9.5/tmp_install/usr/lib/python3.10/site-packages/orthopy/cn/tools.py:73: MatplotlibDeprecationWarning: Auto-removal of grids by pcolor() and pcolormesh() is deprecated since 3.5 and will be removed two minor releases later; please call grid(False) first.
    plt.colorbar()

tests/test_enr2.py::test_show_tree[2]
tests/test_enr2.py::test_show_tree[2]
  /tmp/makepkg/python-orthopy/src/orthopy-0.9.5/tmp_install/usr/lib/python3.10/site-packages/orthopy/enr2/tools.py:80: MatplotlibDeprecationWarning: Auto-removal of grids by pcolor() and pcolormesh() is deprecated since 3.5 and will be removed two minor releases later; please call grid(False) first.
    plt.colorbar()

tests/test_t2.py::test_show_tree
tests/test_t2.py::test_show_tree
  /tmp/makepkg/python-orthopy/src/orthopy-0.9.5/tmp_install/usr/lib/python3.10/site-packages/orthopy/t2/tools.py:112: MatplotlibDeprecationWarning: Auto-removal of grids by pcolor() and pcolormesh() is deprecated since 3.5 and will be removed two minor releases later; please call grid(False) first.
    plt.colorbar()

tests/test_s2/test_xu.py::test_show[degrees0]
tests/test_s2/test_xu.py::test_show[degrees0]
tests/test_s2/test_zernike.py::test_show[degrees0]
tests/test_s2/test_zernike2.py::test_show[degrees0]
  /tmp/makepkg/python-orthopy/src/orthopy-0.9.5/tmp_install/usr/lib/python3.10/site-packages/orthopy/s2/tools.py:32: MatplotlibDeprecationWarning: Auto-removal of grids by pcolor() and pcolormesh() is deprecated since 3.5 and will be removed two minor releases later; please call grid(False) first.
    plt.colorbar()

tests/test_s2/test_xu.py::test_show_tree[2]
tests/test_s2/test_xu.py::test_show_tree[2]
tests/test_s2/test_zernike.py::test_show_tree[2]
tests/test_s2/test_zernike.py::test_show_tree[2]
tests/test_s2/test_zernike2.py::test_show_tree[2]
tests/test_s2/test_zernike2.py::test_show_tree[2]
  /tmp/makepkg/python-orthopy/src/orthopy-0.9.5/tmp_install/usr/lib/python3.10/site-packages/orthopy/s2/tools.py:108: MatplotlibDeprecationWarning: Auto-removal of grids by pcolor() and pcolormesh() is deprecated since 3.5 and will be removed two minor releases later; please call grid(False) first.
    plt.colorbar()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================== short test summary info ==============================================================================
FAILED README.md::line 246
FAILED tests/test_u3.py::test_write_single - TypeError: get_srgb1() got an unexpected keyword argument 'colorspace'
FAILED tests/test_u3.py::test_write_tree - TypeError: get_srgb1() got an unexpected keyword argument 'colorspace'
========================================================= 3 failed, 237 passed, 10 skipped, 16 warnings in 65.79s (0:01:05) =========================================================
nschloe commented 2 years ago

Should be fixed now.