python3Packages.boltztrap2: enable tests
Some tests are failing on aarch64 platforms because they assume the CPU under test == CPU used to dump "golden" numpy arrays.
This commit is contained in:
@@ -1,18 +1,19 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchPypi,
|
fetchFromGitLab,
|
||||||
|
stdenv,
|
||||||
spglib,
|
spglib,
|
||||||
numpy,
|
numpy,
|
||||||
scipy,
|
scipy,
|
||||||
matplotlib,
|
matplotlib,
|
||||||
ase,
|
ase,
|
||||||
netcdf4,
|
netcdf4,
|
||||||
pythonOlder,
|
|
||||||
cython,
|
cython,
|
||||||
cmake,
|
cmake,
|
||||||
setuptools,
|
setuptools,
|
||||||
setuptools-scm,
|
setuptools-scm,
|
||||||
|
pytestCheckHook,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@@ -26,12 +27,11 @@ buildPythonPackage rec {
|
|||||||
setuptools-scm
|
setuptools-scm
|
||||||
];
|
];
|
||||||
|
|
||||||
disabled = pythonOlder "3.5";
|
src = fetchFromGitLab {
|
||||||
|
owner = "sousaw";
|
||||||
src = fetchPypi {
|
repo = "BoltzTraP2";
|
||||||
pname = "boltztrap2";
|
tag = "v${version}";
|
||||||
inherit version;
|
hash = "sha256-eocstudmgMkuxa94txU8uqIp8HpNEuWQys7WvRRZ4as=";
|
||||||
hash = "sha256-JUIGh/6AF+xYLmF3QN47/A5E9zPKdhO2lhn97giZJ48=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@@ -57,11 +57,29 @@ buildPythonPackage rec {
|
|||||||
netcdf4
|
netcdf4
|
||||||
];
|
];
|
||||||
|
|
||||||
# pypi release does no include files for tests
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
pythonImportsCheck = [ "BoltzTraP2" ];
|
pythonImportsCheck = [ "BoltzTraP2" ];
|
||||||
|
|
||||||
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
preInstallCheck = ''
|
||||||
|
tar xf data.tar.xz
|
||||||
|
rm -rf BoltzTraP2
|
||||||
|
'';
|
||||||
|
|
||||||
|
pytestFlags = [ "tests" ];
|
||||||
|
|
||||||
|
disabledTests = lib.optionals (stdenv.system != "x86_64-linux") [
|
||||||
|
# Tests np.load numpy arrays from disk that were, apparently, saved on
|
||||||
|
# x86_64-linux. Then these files are used to compare results of
|
||||||
|
# calculations, which won't work as expected if running on a different
|
||||||
|
# platform.
|
||||||
|
"test_DOS_Si"
|
||||||
|
"test_BTPDOS_Si"
|
||||||
|
"test_calc_cv_Si"
|
||||||
|
"test_fermiintegrals_Si"
|
||||||
|
"test_fitde3D_saved_noder"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Band-structure interpolator and transport coefficient calculator";
|
description = "Band-structure interpolator and transport coefficient calculator";
|
||||||
mainProgram = "btp2";
|
mainProgram = "btp2";
|
||||||
|
|||||||
Reference in New Issue
Block a user