Skip to content

Commit c85bcd2

Browse files
authored
python312Packages.meshio: skip failing tests (#383057)
2 parents 311d8d0 + e1e97eb commit c85bcd2

File tree

4 files changed

+174
-59
lines changed

4 files changed

+174
-59
lines changed

pkgs/development/python-modules/gstools/default.nix

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,43 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5-
setuptools,
6-
setuptools-scm,
7-
numpy,
5+
6+
# build-system
87
cython,
98
extension-helpers,
9+
numpy,
10+
setuptools,
11+
setuptools-scm,
12+
13+
# dependencies
1014
hankel,
1115
emcee,
1216
meshio,
1317
pyevtk,
1418
scipy,
19+
20+
# tests
1521
pytestCheckHook,
1622
}:
1723

1824
buildPythonPackage rec {
1925
pname = "gstools";
20-
version = "1.6.0";
26+
version = "1.6.1";
2127
pyproject = true;
2228

2329
src = fetchFromGitHub {
2430
owner = "GeoStat-Framework";
2531
repo = "GSTools";
2632
tag = "v${version}";
27-
hash = "sha256-QpdOARzcSRVFl/DbnE2JLBFZmTSh/fBOmzweuf+zfEs=";
33+
hash = "sha256-Aieuk0Xjlut8rTZoFHcBpPtyIj/fstMrHiiKyDOpQlg=";
2834
};
2935

3036
build-system = [
31-
setuptools
32-
setuptools-scm
33-
numpy
3437
cython
3538
extension-helpers
39+
numpy
40+
setuptools
41+
setuptools-scm
3642
];
3743

3844
dependencies = [
@@ -50,7 +56,7 @@ buildPythonPackage rec {
5056
meta = {
5157
description = "Geostatistical toolbox";
5258
homepage = "https://github.com/GeoStat-Framework/GSTools";
53-
changelog = "https://github.com/GeoStat-Framework/GSTools/blob/${src.rev}/CHANGELOG.md";
59+
changelog = "https://github.com/GeoStat-Framework/GSTools/blob/v${version}/CHANGELOG.md";
5460
license = lib.licenses.lgpl3Only;
5561
maintainers = with lib.maintainers; [ sigmanificient ];
5662
};

pkgs/development/python-modules/hankel/default.nix

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5+
6+
# build-system
57
setuptools,
68
setuptools-scm,
9+
10+
# dependencies
711
mpmath,
812
numpy,
913
scipy,
14+
15+
# tests
1016
pytestCheckHook,
1117
pytest-xdist,
1218
}:
@@ -27,22 +33,29 @@ buildPythonPackage rec {
2733
setuptools
2834
setuptools-scm
2935
];
36+
3037
dependencies = [
3138
mpmath
3239
numpy
3340
scipy
3441
];
3542

3643
pythonImportsCheck = [ "hankel" ];
44+
3745
nativeCheckInputs = [
3846
pytestCheckHook
3947
pytest-xdist
4048
];
4149

50+
disabledTests = [
51+
# ValueError: Calling nonzero on 0d arrays is not allowed.
52+
"test_nu0"
53+
];
54+
4255
meta = {
4356
description = "Implementation of Ogata's (2005) method for Hankel transforms";
4457
homepage = "https://github.com/steven-murray/hankel";
45-
changelog = "https://github.com/steven-murray/hankel/${src.rev}/CHANGELOG.rst";
58+
changelog = "https://github.com/steven-murray/hankel/v${version}/CHANGELOG.rst";
4659
license = lib.licenses.mit;
4760
maintainers = with lib.maintainers; [ sigmanificient ];
4861
};
Lines changed: 84 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,113 @@
11
{
22
lib,
33
buildPythonPackage,
4-
fetchPypi,
5-
numpy,
6-
netcdf4,
4+
fetchFromGitHub,
5+
6+
# build-system
7+
setuptools,
8+
9+
# dependencies
710
h5py,
11+
netcdf4,
12+
numpy,
13+
rich,
14+
15+
# tests
816
exdown,
917
pytestCheckHook,
10-
rich,
11-
setuptools,
1218
}:
1319

1420
buildPythonPackage rec {
1521
pname = "meshio";
1622
version = "5.3.5";
17-
format = "pyproject";
23+
pyproject = true;
1824

19-
src = fetchPypi {
20-
inherit pname version;
21-
hash = "sha256-8h8Bq9nym6BuoRkwSz055hBCHP6Tud0jNig0kZ+HWG0=";
25+
src = fetchFromGitHub {
26+
owner = "nschloe";
27+
repo = "meshio";
28+
tag = "v${version}";
29+
hash = "sha256-2j+5BYftCiy+g33UbsgCMWBRggGBJBx5VoEdSqQ/mV0=";
2230
};
2331

24-
nativeBuildInputs = [ setuptools ];
32+
build-system = [ setuptools ];
2533

26-
propagatedBuildInputs = [
27-
numpy
28-
netcdf4
34+
dependencies = [
2935
h5py
36+
netcdf4
37+
numpy
3038
rich
3139
];
3240

41+
pythonImportsCheck = [ "meshio" ];
42+
3343
nativeCheckInputs = [
3444
exdown
3545
pytestCheckHook
3646
];
3747

38-
pythonImportsCheck = [ "meshio" ];
48+
disabledTests = [
49+
# RuntimeError: Not a valid Netgen mesh
50+
"test_advanced"
3951

40-
meta = with lib; {
41-
homepage = "https://github.com/nschloe/meshio";
52+
# ValueError: cannot reshape array of size 12 into shape (1936876918,3)
53+
"test_area"
54+
55+
# Error: Couldn't read file /build/source/tests/meshes/vtk/06_color_scalars.vtk as vtk
56+
# Illegal VTK header
57+
"test_color_scalars"
58+
"test_pathlike"
59+
60+
# AssertionError
61+
"test_comma_space"
62+
63+
# ValueError: could not convert string to float: 'np.float64(63.69616873214543)'
64+
"test_dolfin"
65+
66+
# ValueError: cannot reshape array of size 1 into shape
67+
"test_gmsh22"
68+
"test_gmsh40"
69+
"test_gmsh41"
70+
71+
# meshio._exceptions.ReadError: Header of ugrid file is ill-formed
72+
"test_io"
73+
"test_volume"
74+
75+
# ValueError: invalid literal for int() with base 10: 'version'
76+
"test_point_cell_refs"
77+
78+
# Error: Couldn't read file /build/source/tests/meshes/vtu/01_raw_binary_int64.vtu as vtu
79+
"test_read_from_file"
80+
81+
# ValueError: cannot reshape array of size 12 into shape (1936876918,3)
82+
# -- or
83+
# Error: Couldn't read file /build/source/tests/meshes/medit/hch_strct.4.meshb as medit
84+
# Invalid code
85+
# -- or
86+
# AssertionError
87+
# -- or
88+
# Error: Couldn't read file /build/source/tests/meshes/msh/insulated-2.2.msh as either of ansys, gmsh
89+
"test_reference_file"
90+
91+
# UnboundLocalError: cannot access local variable 'points' where it is not associated with a value
92+
# -- or
93+
# Error: Couldn't read file /build/source/tests/meshes/vtk/00_image.vtk as vtk
94+
# Illegal VTK header
95+
"test_structured"
96+
97+
# Error: Couldn't read file /build/source/tests/meshes/ply/bun_zipper_res4.ply as ply
98+
# Expected ply
99+
"test_read_pathlike"
100+
"test_read_str"
101+
"test_write_pathlike"
102+
"test_write_str"
103+
];
104+
105+
meta = {
42106
description = "I/O for mesh files";
107+
homepage = "https://github.com/nschloe/meshio";
108+
changelog = "https://github.com/nschloe/meshio/blob/v${version}/CHANGELOG.md";
43109
mainProgram = "meshio";
44-
license = licenses.mit;
45-
maintainers = with maintainers; [ wd15 ];
110+
license = lib.licenses.mit;
111+
maintainers = with lib.maintainers; [ wd15 ];
46112
};
47113
}

pkgs/development/python-modules/sfepy/default.nix

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,73 @@
11
{
22
lib,
33
buildPythonPackage,
4-
pythonOlder,
54
fetchFromGitHub,
5+
writableTmpDirAsHomeHook,
6+
7+
# build-system
68
cmake,
79
cython_0,
810
ninja,
911
oldest-supported-numpy,
1012
setuptools,
1113
scikit-build,
12-
numpy,
13-
scipy,
14+
15+
# dependencies
1416
matplotlib,
17+
meshio,
18+
numpy,
1519
pyparsing,
16-
tables,
1720
python,
18-
sympy,
19-
meshio,
20-
openssh,
2121
pyvista,
22+
scipy,
23+
sympy,
24+
tables,
25+
26+
# tests
2227
pytest,
28+
openssh,
2329
}:
2430

2531
buildPythonPackage rec {
2632
pname = "sfepy";
27-
version = "2024.1";
33+
version = "2024.4";
2834
pyproject = true;
2935

30-
disabled = pythonOlder "3.8";
31-
3236
src = fetchFromGitHub {
3337
owner = "sfepy";
3438
repo = "sfepy";
35-
rev = "release_${version}";
36-
hash = "sha256-r2Qx9uJmVS4ugJxrIxg2UscnYu1Qr4hEkcz66NyWGmA=";
39+
tag = "release_${version}";
40+
hash = "sha256-3XQqPoAM1Qw/fZ649Xk+ceaeBkZ3ypI1FSRxtYbIrxw=";
3741
};
3842

43+
postPatch = ''
44+
substituteInPlace pyproject.toml \
45+
--replace-fail "ninja<=1.11.1.1" "ninja" \
46+
--replace-fail "numpy<2" "numpy"
47+
48+
substituteInPlace sfepy/solvers/optimize.py \
49+
--replace-fail "nm.Inf" "nm.inf"
50+
51+
substituteInPlace sfepy/examples/quantum/quantum_common.py \
52+
--replace-fail "NaN" "nan"
53+
54+
# slow tests
55+
rm sfepy/tests/test_elasticity_small_strain.py
56+
rm sfepy/tests/test_hyperelastic_tlul.py
57+
rm sfepy/tests/test_io.py
58+
rm sfepy/tests/test_linear_solvers.py
59+
rm sfepy/tests/test_poly_spaces.py
60+
rm sfepy/tests/test_quadratures.py
61+
rm sfepy/tests/test_refine_hanging.py
62+
rm sfepy/tests/test_term_call_modes.py
63+
# ValueError: invalid literal for int() with base 10: 'np.int64(3)'
64+
rm sfepy/tests/test_meshio.py
65+
'';
66+
67+
nativeBuildInputs = [
68+
writableTmpDirAsHomeHook
69+
];
70+
3971
build-system = [
4072
cmake
4173
cython_0
@@ -48,37 +80,35 @@ buildPythonPackage rec {
4880
dontUseCmakeConfigure = true;
4981

5082
dependencies = [
51-
numpy
52-
scipy
5383
matplotlib
54-
pyparsing
55-
tables
56-
sympy
5784
meshio
85+
numpy
86+
pyparsing
5887
pyvista
88+
scipy
89+
sympy
90+
tables
5991
];
6092

61-
postPatch = ''
62-
# slow tests
63-
rm sfepy/tests/test_io.py
64-
rm sfepy/tests/test_elasticity_small_strain.py
65-
rm sfepy/tests/test_term_call_modes.py
66-
rm sfepy/tests/test_refine_hanging.py
67-
rm sfepy/tests/test_hyperelastic_tlul.py
68-
rm sfepy/tests/test_poly_spaces.py
69-
rm sfepy/tests/test_linear_solvers.py
70-
rm sfepy/tests/test_quadratures.py
71-
'';
93+
pythonRelaxDeps = [
94+
"numpy"
95+
];
7296

73-
nativeCheckInputs = [ pytest ];
97+
nativeCheckInputs = [
98+
pytest
99+
writableTmpDirAsHomeHook
100+
];
74101

75102
checkPhase = ''
76-
export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh
77-
export HOME=$TMPDIR
103+
runHook preCheck
104+
105+
export OMPI_MCA_plm_rsh_agent=${lib.getExe openssh}
78106
mv sfepy sfepy.hidden
79107
mkdir -p $HOME/.matplotlib
80108
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
81109
${python.interpreter} -c "import sfepy; sfepy.test()"
110+
111+
runHook postCheck
82112
'';
83113

84114
meta = {

0 commit comments

Comments
 (0)