conda-forge / kwant-feedstock

A conda-smithy repository for kwant.
BSD 3-Clause "New" or "Revised" License
0 stars 10 forks source link

WIP: try kwant 1.4.2 #75

Closed akhmerov closed 4 years ago

akhmerov commented 4 years ago

Checklist

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

akhmerov commented 4 years ago

@conda-forge-admin please rerender

akhmerov commented 4 years ago

@conda-forge-admin please rerender

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to re-render for you, but it looks like there was nothing to do.

basnijholt commented 4 years ago

Windows is failing 😅

But it's just a test that is a bit outside of its tolerance:

________________________________ test_kwant_op ________________________________

    def test_kwant_op():
        """Check that the kwant.operator.Density gives the same result as the
        identity operator.
        """
        syst = make_chain()
        kwant_op = kwant.operator.Density(syst)
        spectrum_syst = make_spectrum(syst, p, operator=kwant_op, rng=1)

        ham = syst.hamiltonian_submatrix()
        identity = np.identity(dim)
        spectrum = make_spectrum(ham, p, operator=identity, rng=1)

        assert spectrum_syst.densities.shape[1] == ham.shape[0]
        # same algorithms are used so these arrays are equal up to TOL
        assert_allclose(np.sum(spectrum_syst.densities, axis=1),
>                       spectrum.densities)

..\_test_env\lib\site-packages\kwant\tests\test_kpm.py:422: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

arr1 = array([1.48245754e-01-1.13305112e-12j, 2.70321150e-02-3.30411886e-13j,
       1.07551259e-02-1.90250281e-13j, 1.971087....47758357e-14j, 9.97496981e-03-1.46812494e-14j,
       2.22703778e-02-8.73750670e-14j, 1.34796591e-01-2.95570643e-13j])
arr2 = array([1.48245754e-01, 2.70321150e-02, 1.07551259e-02, 1.97108730e-02,
       2.42624212e-02, 1.28219230e-02, 3.219773...3.51066462e-03, 9.79814214e-03, 2.05305631e-02,
       1.87794066e-02, 9.97496981e-03, 2.22703778e-02, 1.34796591e-01])

    def assert_allclose(arr1, arr2):
>       np.testing.assert_allclose(arr1, arr2, rtol=0., atol=TOL)
E       AssertionError: 
akhmerov commented 4 years ago

What worries me more in the failing test is not the tolerance, but that the dtypes are different.

basnijholt commented 4 years ago

Should we disable building on Windows for now?

akhmerov commented 4 years ago

Rather let's patch it. I'd like to investigate the type mismatch, but it doesn't look important.

basnijholt commented 4 years ago

I have patched the test.

akhmerov commented 4 years ago

Still TODO: wait until tagging, point the source to pypi.

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe:

basnijholt commented 4 years ago

@conda-forge-admin, please rerender

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

akhmerov commented 4 years ago

@basnijholt let's use pypi for canonical source, so that bots can pick it up from there.

basnijholt commented 4 years ago

This PR is superseded by #79 because some CI tasks refuse to update using conda-smithy.