Merge pull request #291386 from risicle/ris-pymatgen-2024.2.23

python3Packages.pymatgen: 2022.3.29 -> 2024.2.23, enable tests

authored by Martin Weinelt and committed by GitHub 98ecb2ae 2c53d572

+33 -4
+33 -4
pkgs/development/python-modules/pymatgen/default.nix
··· 1 { lib 2 , buildPythonPackage 3 , fetchFromGitHub 4 , cython 5 , glibcLocales 6 , matplotlib 7 , monty 8 , networkx ··· 12 , plotly 13 , pybtex 14 , pydispatcher 15 , pythonOlder 16 , requests 17 , ruamel-yaml 18 , scipy 19 , spglib 20 , sympy 21 , tabulate ··· 24 25 buildPythonPackage rec { 26 pname = "pymatgen"; 27 - version = "2022.3.29"; 28 format = "setuptools"; 29 30 disabled = pythonOlder "3.8"; ··· 33 owner = "materialsproject"; 34 repo = "pymatgen"; 35 rev= "v${version}"; 36 - hash = "sha256-B2piRWx9TfKlGTPOAAGsq2GxyfHIRBVFpk6dxES0WF0="; 37 }; 38 39 nativeBuildInputs = [ ··· 60 uncertainties 61 ]; 62 63 - # Tests are not detected by pytest 64 - doCheck = false; 65 66 pythonImportsCheck = [ 67 "pymatgen" 68 ]; 69 70 meta = with lib; { 71 description = "A robust materials analysis code that defines core object representations for structures and molecules"; 72 homepage = "https://pymatgen.org/"; 73 license = licenses.mit;
··· 1 { lib 2 + , stdenv 3 , buildPythonPackage 4 , fetchFromGitHub 5 + , ase 6 , cython 7 , glibcLocales 8 + , joblib 9 , matplotlib 10 , monty 11 , networkx ··· 15 , plotly 16 , pybtex 17 , pydispatcher 18 + , pytestCheckHook 19 + , pytest-xdist 20 , pythonOlder 21 , requests 22 , ruamel-yaml 23 , scipy 24 + , seekpath 25 , spglib 26 , sympy 27 , tabulate ··· 30 31 buildPythonPackage rec { 32 pname = "pymatgen"; 33 + version = "2024.2.23"; 34 format = "setuptools"; 35 36 disabled = pythonOlder "3.8"; ··· 39 owner = "materialsproject"; 40 repo = "pymatgen"; 41 rev= "v${version}"; 42 + hash = "sha256-eswoup9ACj/PHVW3obcnZjD4tWemsmROZFtwGGigEYE="; 43 }; 44 45 nativeBuildInputs = [ ··· 66 uncertainties 67 ]; 68 69 + nativeCheckInputs = [ 70 + pytestCheckHook 71 + pytest-xdist 72 + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 73 + preCheck = '' 74 + # hide from tests 75 + mv pymatgen _pymatgen 76 + # ensure tests can find these 77 + export PMG_TEST_FILES_DIR="$(realpath ./tests/files)" 78 + # some tests cover the command-line scripts 79 + export PATH=$out/bin:$PATH 80 + ''; 81 + disabledTests = [ 82 + # presumably won't work with our dir layouts 83 + "test_egg_sources_txt_is_complete" 84 + # borderline precision failure 85 + "test_thermal_conductivity" 86 + ]; 87 + 88 + passthru.optional-dependencies = { 89 + ase = [ ase ]; 90 + joblib = [ joblib ]; 91 + seekpath = [ seekpath ]; 92 + }; 93 94 pythonImportsCheck = [ 95 "pymatgen" 96 ]; 97 98 meta = with lib; { 99 + broken = stdenv.isDarwin; # tests segfault. that's bad. 100 description = "A robust materials analysis code that defines core object representations for structures and molecules"; 101 homepage = "https://pymatgen.org/"; 102 license = licenses.mit;