lol

python312Packages.monty: cleanup & add missing test dependency

+67 -31
+67 -31
pkgs/development/python-modules/monty/default.nix
··· 2 2 lib, 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 + pythonOlder, 6 + 7 + # build-system 8 + setuptools, 9 + setuptools-scm, 10 + 11 + # dependencies 5 12 msgpack, 6 - numpy, 13 + ruamel-yaml, 14 + 15 + # optional-dependencies 16 + coverage, 17 + pymongo, 18 + pytest, 19 + pytest-cov, 20 + types-requests, 21 + sphinx, 22 + sphinx-rtd-theme, 23 + orjson, 7 24 pandas, 8 25 pydantic, 9 - pymongo, 10 - pytestCheckHook, 11 - pythonOlder, 12 - ruamel-yaml, 13 - setuptools, 14 - setuptools-scm, 26 + pint, 15 27 torch, 16 28 tqdm, 29 + invoke, 30 + requests, 31 + 32 + # tests 33 + ipython, 34 + numpy, 35 + pytestCheckHook, 17 36 }: 18 37 19 38 buildPythonPackage rec { ··· 21 40 version = "2025.1.9"; 22 41 pyproject = true; 23 42 24 - disabled = pythonOlder "3.9"; 25 - 26 43 src = fetchFromGitHub { 27 44 owner = "materialsvirtuallab"; 28 45 repo = "monty"; ··· 30 47 hash = "sha256-+9nxuvrtl04Fb+GQJUn+fxg4sq1pXK59UkUTkKH16YQ="; 31 48 }; 32 49 33 - postPatch = '' 34 - substituteInPlace tests/test_os.py \ 35 - --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' 36 - ''; 37 - 38 - nativeBuildInputs = [ 50 + build-system = [ 39 51 setuptools 40 52 setuptools-scm 41 53 ]; 42 54 43 - propagatedBuildInputs = [ 55 + dependencies = [ 44 56 msgpack 45 57 ruamel-yaml 46 - tqdm 47 58 ]; 48 59 60 + optional-dependencies = rec { 61 + ci = [ 62 + coverage 63 + pymongo 64 + pytest 65 + pytest-cov 66 + types-requests 67 + ] ++ optional; 68 + dev = [ ipython ]; 69 + docs = [ 70 + sphinx 71 + sphinx-rtd-theme 72 + ]; 73 + json = 74 + [ 75 + orjson 76 + pandas 77 + pydantic 78 + pymongo 79 + ] 80 + ++ lib.optionals (pythonOlder "3.13") [ 81 + pint 82 + torch 83 + ]; 84 + multiprocessing = [ tqdm ]; 85 + optional = dev ++ json ++ multiprocessing ++ serialization; 86 + serialization = [ msgpack ]; 87 + task = [ 88 + invoke 89 + requests 90 + ]; 91 + }; 92 + 49 93 nativeCheckInputs = [ 94 + ipython 50 95 numpy 51 96 pandas 52 97 pydantic 53 98 pymongo 54 99 pytestCheckHook 55 100 torch 101 + tqdm 56 102 ]; 57 103 58 104 pythonImportsCheck = [ "monty" ]; 59 105 60 - disabledTests = [ 61 - # Test file was removed and re-added after 2022.9.9 62 - "test_reverse_readfile_gz" 63 - "test_Path_objects" 64 - "test_zopen" 65 - "test_zpath" 66 - # flaky, precision/rounding error 67 - "TestJson.test_datetime" 68 - ]; 69 - 70 - meta = with lib; { 106 + meta = { 71 107 description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems"; 72 108 longDescription = " 73 109 Monty implements supplementary useful functions for Python that are not part of the ··· 75 111 patterns such as singleton and cached_class, and many more. 76 112 "; 77 113 homepage = "https://github.com/materialsvirtuallab/monty"; 78 - changelog = "https://github.com/materialsvirtuallab/monty/releases/tag/${src.tag}"; 79 - license = licenses.mit; 80 - maintainers = with maintainers; [ psyanticy ]; 114 + changelog = "https://github.com/materialsvirtuallab/monty/releases/tag/v${version}"; 115 + license = lib.licenses.mit; 116 + maintainers = with lib.maintainers; [ psyanticy ]; 81 117 }; 82 118 }