lol

python312Packages.pymatgen: 2025.1.9 -> 2025.1.24

Diff: https://github.com/materialsproject/pymatgen/compare/refs/tags/v2025.1.9...v2025.1.24

Changelog: https://github.com/materialsproject/pymatgen/releases/tag/v2025.1.24

+103 -26
+103 -26
pkgs/development/python-modules/pymatgen/default.nix
··· 1 1 { 2 2 lib, 3 - ase, 3 + stdenv, 4 4 buildPythonPackage, 5 + pythonAtLeast, 6 + fetchFromGitHub, 7 + 8 + # build-system 9 + setuptools, 10 + 11 + # nativeBuildInputs 5 12 cython, 6 - fetchFromGitHub, 7 13 glibcLocales, 14 + 15 + # dependencies 8 16 joblib, 9 17 matplotlib, 10 18 monty, 11 19 networkx, 12 - oldest-supported-numpy, 20 + numpy, 13 21 palettable, 14 22 pandas, 15 23 plotly, 16 24 pybtex, 17 - pydispatcher, 18 - pytest-xdist, 19 - pytestCheckHook, 20 - pythonOlder, 21 25 requests, 22 26 ruamel-yaml, 23 27 scipy, 24 - seekpath, 25 - setuptools, 26 28 spglib, 27 29 sympy, 28 30 tabulate, 31 + tqdm, 29 32 uncertainties, 33 + 34 + # optional-dependencies 35 + netcdf4, 36 + ase, 37 + pytest, 38 + pytest-cov, 39 + invoke, 40 + sphinx, 41 + sphinx-rtd-theme, 42 + numba, 43 + vtk, 44 + 45 + # tests 46 + addBinToPathHook, 47 + pytest-xdist, 48 + pytestCheckHook, 30 49 }: 31 50 32 51 buildPythonPackage rec { 33 52 pname = "pymatgen"; 34 - version = "2025.1.9"; 53 + version = "2025.1.24"; 35 54 pyproject = true; 36 55 37 - disabled = pythonOlder "3.8"; 56 + disabled = pythonAtLeast "3.13"; 38 57 39 58 src = fetchFromGitHub { 40 59 owner = "materialsproject"; 41 60 repo = "pymatgen"; 42 61 tag = "v${version}"; 43 - hash = "sha256-mbXnuqgve8YjktJ2PSaMNk8ADioaGe+W12bYm/chpzE="; 62 + hash = "sha256-0P3/M6VI2RKPArMwXD95sjW7dYOTXxUeu4tOliN0IGk="; 44 63 }; 45 64 46 65 build-system = [ setuptools ]; ··· 51 70 ]; 52 71 53 72 dependencies = [ 73 + joblib 54 74 matplotlib 55 75 monty 56 76 networkx 57 - oldest-supported-numpy 77 + numpy 58 78 palettable 59 79 pandas 60 80 plotly 61 81 pybtex 62 - pydispatcher 63 82 requests 64 83 ruamel-yaml 65 84 scipy 66 85 spglib 67 86 sympy 68 87 tabulate 88 + tqdm 69 89 uncertainties 70 90 ]; 71 91 72 92 optional-dependencies = { 93 + abinit = [ netcdf4 ]; 73 94 ase = [ ase ]; 74 - joblib = [ joblib ]; 75 - seekpath = [ seekpath ]; 95 + ci = [ 96 + pytest 97 + pytest-cov 98 + # pytest-split 99 + ]; 100 + docs = [ 101 + invoke 102 + sphinx 103 + # sphinx_markdown_builder 104 + sphinx-rtd-theme 105 + ]; 106 + electronic_structure = [ 107 + # fdint 108 + ]; 109 + mlp = [ 110 + # chgnet 111 + # matgl 112 + ]; 113 + numba = [ numba ]; 114 + vis = [ vtk ]; 76 115 }; 116 + 117 + pythonImportsCheck = [ "pymatgen" ]; 77 118 78 119 nativeCheckInputs = [ 120 + addBinToPathHook 79 121 pytestCheckHook 80 122 pytest-xdist 81 123 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 82 124 83 - preCheck = '' 125 + preCheck = 84 126 # ensure tests can find these 85 - export PMG_TEST_FILES_DIR="$(realpath ./tests/files)" 86 - # some tests cover the command-line scripts 87 - export PATH=$out/bin:$PATH 88 - ''; 127 + '' 128 + export PMG_TEST_FILES_DIR="$(realpath ./tests/files)" 129 + ''; 89 130 90 - pythonImportsCheck = [ "pymatgen" ]; 131 + disabledTests = 132 + [ 133 + # Flaky 134 + "test_numerical_eos_values" 135 + "test_pca" 136 + "test_static_si_no_kgrid" 137 + "test_thermal_conductivity" 138 + ] 139 + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ 140 + # AttributeError: 'NoneType' object has no attribute 'items' 141 + "test_mean_field" 142 + ] 143 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ 144 + # Fatal Python error: Aborted 145 + # matplotlib/backend_bases.py", line 2654 in create_with_canvas 146 + "test_angle" 147 + "test_as_dict_from_dict" 148 + "test_attributes" 149 + "test_basic" 150 + "test_core_state_eigen" 151 + "test_eos_func" 152 + "test_get_info_cohps_to_neighbors" 153 + "test_get_plot" 154 + "test_get_point_group_operations" 155 + "test_matplotlib_plots" 156 + "test_ph_plot_w_gruneisen" 157 + "test_plot" 158 + "test_proj_bandstructure_plot" 159 + "test_structure" 160 + "test_structure_environments" 161 + ]; 91 162 92 - meta = with lib; { 163 + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 164 + # Crash when running the pmg command 165 + # Critical error: required built-in appearance SystemAppearance not found 166 + "tests/cli/test_pmg_plot.py" 167 + ]; 168 + 169 + meta = { 93 170 description = "Robust materials analysis code that defines core object representations for structures and molecules"; 94 171 homepage = "https://pymatgen.org/"; 95 - changelog = "https://github.com/materialsproject/pymatgen/releases/tag/${src.tag}"; 96 - license = licenses.mit; 97 - maintainers = with maintainers; [ psyanticy ]; 172 + changelog = "https://github.com/materialsproject/pymatgen/releases/tag/v${version}"; 173 + license = lib.licenses.mit; 174 + maintainers = with lib.maintainers; [ psyanticy ]; 98 175 }; 99 176 }