lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

python312Packages.nifty8: 8.5.4 -> 8.5.6 (#386061)

authored by

Nick Cao and committed by
GitHub
cb04ce95 95779c4c

+37 -13
+37 -13
pkgs/development/python-modules/nifty8/default.nix
··· 21 21 22 22 # test 23 23 pytestCheckHook, 24 + pytest-xdist, 24 25 mpiCheckPhaseHook, 25 26 openssh, 26 27 }: 27 28 28 29 buildPythonPackage rec { 29 30 pname = "nifty8"; 30 - version = "8.5.4"; 31 + version = "8.5.6"; 31 32 pyproject = true; 32 33 33 34 src = fetchFromGitLab { ··· 35 36 owner = "ift"; 36 37 repo = "nifty"; 37 38 tag = "v${version}"; 38 - hash = "sha256-Q42ZhQ/T8JmkG75BexevbvVKQqfDmMG6+oTYR0Ze718="; 39 + hash = "sha256-DQPCLRVl/UE1zv7nUZtPJa/sRwmAkHgrcDsxRa/ndX4="; 39 40 }; 40 41 42 + # nifty8.re is the jax-backed version of nifty8 (the regular one uses numpy). 43 + # It is not compatible with the latest jax update: 44 + # https://gitlab.mpcdf.mpg.de/ift/nifty/-/issues/414 45 + # While the issue is being fixed by upstream, we completely remove this package from the source and the tests. 46 + postPatch = '' 47 + rm -r src/re 48 + rm -r test/test_re 49 + ''; 50 + 41 51 build-system = [ setuptools ]; 42 52 43 53 dependencies = [ ··· 55 65 56 66 nativeCheckInputs = [ 57 67 pytestCheckHook 68 + pytest-xdist 58 69 mpiCheckPhaseHook 59 70 openssh 60 71 ]; 61 72 62 - checkPhase = '' 63 - runHook preCheck 64 - 65 - python3 -m pytest test 73 + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ 74 + # Fatal Python error: Aborted 75 + # matplotlib/backend_bases.py", line 2654 in create_with_canvas 76 + "test_optimize_kl_domain_expansion" 77 + "test_plot_priorsamples" 78 + ]; 66 79 67 - if [ "${stdenv.buildPlatform.system}" != "aarch64-linux" ] && \ 68 - [ "${stdenv.buildPlatform.system}" != "x86_64-darwin" ]; then 69 - ${mpi}/bin/mpiexec -n 2 --bind-to none python3 -m pytest test/test_mpi 70 - fi 80 + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 81 + # Fatal Python error: Aborted 82 + # matplotlib/backend_bases.py", line 2654 in create_with_canvas 83 + "test/test_plot.py" 84 + ]; 71 85 72 - runHook postCheck 73 - ''; 86 + __darwinAllowLocalNetworking = true; 87 + postCheck = 88 + lib.optionalString 89 + ( 90 + # Fails on aarch64-linux with: 91 + # hwloc/linux: failed to find sysfs cpu topology directory, aborting linux discovery. 92 + # All nodes which are allocated for this job are already filled. 93 + !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) 94 + ) 95 + '' 96 + ${lib.getExe' mpi "mpirun"} -n 2 --bind-to none python3 -m pytest test/test_mpi 97 + ''; 74 98 75 99 pythonImportsCheck = [ "nifty8" ]; 76 100 77 101 meta = { 78 102 homepage = "https://gitlab.mpcdf.mpg.de/ift/nifty"; 79 - changelog = "https://gitlab.mpcdf.mpg.de/ift/nifty/-/blob/${src.tag}/ChangeLog.md"; 103 + changelog = "https://gitlab.mpcdf.mpg.de/ift/nifty/-/blob/v${version}/ChangeLog.md"; 80 104 description = "Bayesian Imaging library for high-dimensional posteriors"; 81 105 longDescription = '' 82 106 NIFTy, "Numerical Information Field Theory", is a Bayesian imaging library.