Skip to content

Merge pull request #144 from libAtoms/108-JOSS-submission-freiburg #566

Merge pull request #144 from libAtoms/108-JOSS-submission-freiburg

Merge pull request #144 from libAtoms/108-JOSS-submission-freiburg #566

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / JUnit Test Report failed Jun 23, 2023 in 0s

617 tests run, 31 skipped, 2 failed.

Annotations

Check failure on line 1 in TestEAMIO

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestEAMIO.test_savetbl_loadtbl_text

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Raw output
self = <test_io.TestEAMIO testMethod=test_savetbl_loadtbl_text>

    def test_savetbl_loadtbl_text(self):
        n = 12
        a = np.random.random(n)
        b = np.random.random(n)
        t = ['a'*(i+1) for i in range(n)]
        savetbl('test2.out', a=a, b=b, t=t)
    
>       a2, t2, b2 = loadtbl('test2.out', usecols=['a', 't', 'b'], types={'t': np.str_})

test_io.py:78: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/dist-packages/matscipy-0.7.0+308.ge9b94fb-py3.10-linux-x86_64.egg/matscipy/io/tbl.py:123: in <genexpr>
    dtype=types[s] if s in types else np.float,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

attr = 'float'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
            warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
    
        if attr in __former_attrs__:
>           raise AttributeError(__former_attrs__[attr])
E           AttributeError: module 'numpy' has no attribute 'float'.
E           `np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
E           The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
E               https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

/usr/local/lib/python3.10/dist-packages/numpy/__init__.py:313: AttributeError

Check failure on line 1 in TestNeighbourhood

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestNeighbourhood.test_triplets

AssertionError: False is not true
Raw output
self = <test_neighbours.TestNeighbourhood testMethod=test_triplets>

    def test_triplets(self):
        cutoff_pairs = np.array(self.cutoff.get_pairs(self.atoms, "ij")).T
        molecules_pairs = np.array(self.molecule.get_pairs(self.atoms, "ij")).T
        cutoff_d = self.cutoff.get_triplets(self.atoms, "ijk")
        molecule_d = self.molecule.get_triplets(self.atoms, "ijk")
        p = np.array([0, 1, 3, 2, 4, 5])
    
        # We compare the refered pairs, not the triplet info directly
        for c, m in zip(cutoff_d, molecule_d):
            # print("c =", cutoff_pairs[:][c])
            # print("m =", molecules_pairs[:][m])
            self.assertArrayAlmostEqual(cutoff_pairs[:, 0][c],
                                        molecules_pairs[:, 0][m][p], tol=1e-10)
>           self.assertArrayAlmostEqual(cutoff_pairs[:, 1][c],
                                        molecules_pairs[:, 1][m][p], tol=1e-10)

test_neighbours.py:372: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
matscipytest.py:107: in assertArrayAlmostEqual
    self.assertTrue((a == b).all())
E   AssertionError: False is not true