mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 17:23:34 +00:00
python3Packages.pymatgen: enable tests
also notice that the tests segfault on darwin suggesting the package is pretty broken on that platform
This commit is contained in:
parent
99699f99a5
commit
4c1d7349ea
@ -1,8 +1,11 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, ase
|
||||||
, cython
|
, cython
|
||||||
, glibcLocales
|
, glibcLocales
|
||||||
|
, joblib
|
||||||
, matplotlib
|
, matplotlib
|
||||||
, monty
|
, monty
|
||||||
, networkx
|
, networkx
|
||||||
@ -12,10 +15,13 @@
|
|||||||
, plotly
|
, plotly
|
||||||
, pybtex
|
, pybtex
|
||||||
, pydispatcher
|
, pydispatcher
|
||||||
|
, pytestCheckHook
|
||||||
|
, pytest-xdist
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, requests
|
, requests
|
||||||
, ruamel-yaml
|
, ruamel-yaml
|
||||||
, scipy
|
, scipy
|
||||||
|
, seekpath
|
||||||
, spglib
|
, spglib
|
||||||
, sympy
|
, sympy
|
||||||
, tabulate
|
, tabulate
|
||||||
@ -60,14 +66,37 @@ buildPythonPackage rec {
|
|||||||
uncertainties
|
uncertainties
|
||||||
];
|
];
|
||||||
|
|
||||||
# Tests are not detected by pytest
|
nativeCheckInputs = [
|
||||||
doCheck = false;
|
pytestCheckHook
|
||||||
|
pytest-xdist
|
||||||
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||||
|
preCheck = ''
|
||||||
|
# hide from tests
|
||||||
|
mv pymatgen _pymatgen
|
||||||
|
# ensure tests can find these
|
||||||
|
export PMG_TEST_FILES_DIR="$(realpath ./tests/files)"
|
||||||
|
# some tests cover the command-line scripts
|
||||||
|
export PATH=$out/bin:$PATH
|
||||||
|
'';
|
||||||
|
disabledTests = [
|
||||||
|
# presumably won't work with our dir layouts
|
||||||
|
"test_egg_sources_txt_is_complete"
|
||||||
|
# borderline precision failure
|
||||||
|
"test_thermal_conductivity"
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.optional-dependencies = {
|
||||||
|
ase = [ ase ];
|
||||||
|
joblib = [ joblib ];
|
||||||
|
seekpath = [ seekpath ];
|
||||||
|
};
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
"pymatgen"
|
"pymatgen"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
broken = stdenv.isDarwin; # tests segfault. that's bad.
|
||||||
description = "A robust materials analysis code that defines core object representations for structures and molecules";
|
description = "A robust materials analysis code that defines core object representations for structures and molecules";
|
||||||
homepage = "https://pymatgen.org/";
|
homepage = "https://pymatgen.org/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
Loading…
Reference in New Issue
Block a user