summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/atsim-potentials/default.nix
blob: 65f9662710982d99d28946da35109377ec87dd0a (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
{
  lib,
  buildPythonPackage,
  pythonAtLeast,
  fetchFromGitHub,
  setuptools,
  configparser,
  pyparsing,
  pytestCheckHook,
  future,
  openpyxl,
  wrapt,
  scipy,
  cexprtk,
  deepdiff,
  sympy,
}:

buildPythonPackage rec {
  pname = "atsim-potentials";
  version = "0.4.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "mjdrushton";
    repo = "atsim-potentials";
    tag = version;
    hash = "sha256-G7lNqwEUwAT0f7M2nUTCxpXOAl6FWKlh7tcsvbur1eM=";
  };

  build-system = [ setuptools ];

  dependencies = [
    cexprtk
    configparser
    future
    openpyxl
    pyparsing
    scipy
    sympy
    wrapt
  ];

  nativeCheckInputs = [
    deepdiff
    pytestCheckHook
  ];

  # these files try to import `distutils` removed in Python 3.12
  disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [
    "tests/config/test_configuration_eam.py"
    "tests/config/test_configuration_eam_fs.py"
    "tests/config/test_configuration_pair.py"
    "tests/test_dlpoly_writeTABEAM.py"
    "tests/test_documentation_examples.py"
    "tests/test_eam_adp_writer.py"
    "tests/test_gulp_writer.py"
    "tests/test_lammpsWriteEAM.py"
  ];

  disabledTests = [
    # Missing lammps executable
    "eam_tabulate_example2TestCase"
  ];

  pythonImportsCheck = [ "atsim.potentials" ];

  meta = {
    homepage = "https://github.com/mjdrushton/atsim-potentials";
    description = "Provides tools for working with pair and embedded atom method potential models including tabulation routines for DL_POLY and LAMMPS";
    mainProgram = "potable";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}