2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
msgpack,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
pydantic,
|
|
|
|
pymongo,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
ruamel-yaml,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
torch,
|
|
|
|
tqdm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "monty";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2024.7.29";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "materialsvirtuallab";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "monty";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-ydt1T2agKUCBiMZ4uvQ3qshEiAQ0PP9EjPiWDXgH3Wo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_os.py \
|
|
|
|
--replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
|
|
|
|
'';
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
msgpack
|
2021-12-06 16:07:01 +00:00
|
|
|
ruamel-yaml
|
2021-05-20 23:08:51 +00:00
|
|
|
tqdm
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
numpy
|
2021-09-18 10:52:07 +00:00
|
|
|
pandas
|
2021-05-20 23:08:51 +00:00
|
|
|
pydantic
|
|
|
|
pymongo
|
2023-02-02 18:25:31 +00:00
|
|
|
pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
torch
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "monty" ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test file was removed and re-added after 2022.9.9
|
|
|
|
"test_reverse_readfile_gz"
|
|
|
|
"test_Path_objects"
|
|
|
|
"test_zopen"
|
|
|
|
"test_zpath"
|
2024-07-27 06:49:29 +00:00
|
|
|
# flaky, precision/rounding error
|
|
|
|
"TestJson.test_datetime"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
|
|
|
|
longDescription = "
|
|
|
|
Monty implements supplementary useful functions for Python that are not part of the
|
|
|
|
standard library. Examples include useful utilities like transparent support for zipped files, useful design
|
|
|
|
patterns such as singleton and cached_class, and many more.
|
|
|
|
";
|
|
|
|
homepage = "https://github.com/materialsvirtuallab/monty";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/materialsvirtuallab/monty/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|