1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 matplotlib, 7 numpy, 8 pandas, 9 pillow, 10 pytest, 11 pytest-datadir, 12 pytestCheckHook, 13 pyyaml, 14 setuptools-scm, 15}: 16 17buildPythonPackage rec { 18 pname = "pytest-regressions"; 19 version = "2.8.1"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "ESSS"; 26 repo = "pytest-regressions"; 27 tag = "v${version}"; 28 hash = "sha256-8FbPWKYHy/0ITrCx9044iYOR7B9g8tgEdV+QfUg4esk="; 29 }; 30 31 build-system = [ setuptools-scm ]; 32 33 buildInputs = [ pytest ]; 34 35 dependencies = [ 36 pytest-datadir 37 pyyaml 38 ]; 39 40 optional-dependencies = { 41 dataframe = [ 42 pandas 43 numpy 44 ]; 45 image = [ 46 numpy 47 pillow 48 ]; 49 num = [ 50 numpy 51 pandas 52 ]; 53 }; 54 55 nativeCheckInputs = [ 56 matplotlib 57 pandas 58 pytestCheckHook 59 ] 60 ++ lib.flatten (lib.attrValues optional-dependencies); 61 62 pytestFlags = [ 63 "-Wignore::DeprecationWarning" 64 ]; 65 66 pythonImportsCheck = [ 67 "pytest_regressions" 68 "pytest_regressions.plugin" 69 ]; 70 71 meta = with lib; { 72 changelog = "https://github.com/ESSS/pytest-regressions/blob/${src.tag}/CHANGELOG.rst"; 73 description = "Pytest fixtures to write regression tests"; 74 longDescription = '' 75 pytest-regressions makes it simple to test general data, images, 76 files, and numeric tables by saving expected data in a data 77 directory (courtesy of pytest-datadir) that can be used to verify 78 that future runs produce the same data. 79 ''; 80 homepage = "https://github.com/ESSS/pytest-regressions"; 81 license = licenses.mit; 82 maintainers = [ ]; 83 }; 84}