summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/meshio/default.nix
blob: a019a48e8526a27527cc8d59dbf0781cbe2f9d17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,

  # dependencies
  h5py,
  netcdf4,
  numpy,
  rich,

  # tests
  exdown,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "meshio";
  version = "5.3.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nschloe";
    repo = "meshio";
    tag = "v${version}";
    hash = "sha256-2j+5BYftCiy+g33UbsgCMWBRggGBJBx5VoEdSqQ/mV0=";
  };

  build-system = [ setuptools ];

  dependencies = [
    h5py
    netcdf4
    numpy
    rich
  ];

  pythonImportsCheck = [ "meshio" ];

  nativeCheckInputs = [
    exdown
    pytestCheckHook
  ];

  disabledTests = [
    # RuntimeError: Not a valid Netgen mesh
    "test_advanced"

    # ValueError: cannot reshape array of size 12 into shape (1936876918,3)
    "test_area"

    # Error: Couldn't read file /build/source/tests/meshes/vtk/06_color_scalars.vtk as vtk
    # Illegal VTK header
    "test_color_scalars"
    "test_pathlike"

    # AssertionError
    "test_comma_space"

    # ValueError: could not convert string to float: 'np.float64(63.69616873214543)'
    "test_dolfin"

    # ValueError: cannot reshape array of size 1 into shape
    "test_gmsh22"
    "test_gmsh40"
    "test_gmsh41"

    # meshio._exceptions.ReadError: Header of ugrid file is ill-formed
    "test_io"
    "test_volume"

    # ValueError: invalid literal for int() with base 10: 'version'
    "test_point_cell_refs"

    # Error: Couldn't read file /build/source/tests/meshes/vtu/01_raw_binary_int64.vtu as vtu
    "test_read_from_file"

    # ValueError: cannot reshape array of size 12 into shape (1936876918,3)
    # -- or
    # Error: Couldn't read file /build/source/tests/meshes/medit/hch_strct.4.meshb as medit
    # Invalid code
    # -- or
    # AssertionError
    # -- or
    # Error: Couldn't read file /build/source/tests/meshes/msh/insulated-2.2.msh as either of ansys, gmsh
    "test_reference_file"

    # UnboundLocalError: cannot access local variable 'points' where it is not associated with a value
    # -- or
    # Error: Couldn't read file /build/source/tests/meshes/vtk/00_image.vtk as vtk
    # Illegal VTK header
    "test_structured"

    # Error: Couldn't read file /build/source/tests/meshes/ply/bun_zipper_res4.ply as ply
    # Expected ply
    "test_read_pathlike"
    "test_read_str"
    "test_write_pathlike"
    "test_write_str"
  ];

  meta = {
    description = "I/O for mesh files";
    homepage = "https://github.com/nschloe/meshio";
    changelog = "https://github.com/nschloe/meshio/blob/v${version}/CHANGELOG.md";
    mainProgram = "meshio";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ wd15 ];
  };
}