Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at r-updates 76 lines 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 hatchling, 7 pytestCheckHook, 8 pytest-cov-stub, 9 huggingface-hub, 10 matplotlib, 11 pandas, 12 scikit-learn, 13 stdenv, 14 streamlit, 15 tabulate, 16}: 17 18buildPythonPackage rec { 19 pname = "skops"; 20 version = "0.12.0"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "skops-dev"; 25 repo = "skops"; 26 tag = "v${version}"; 27 hash = "sha256-OLRnaG++5Z7Y0WZnvfdPn6iIXzum5FTL0+geiO5QjYs="; 28 }; 29 30 build-system = [ hatchling ]; 31 32 dependencies = [ 33 huggingface-hub 34 scikit-learn 35 tabulate 36 ]; 37 38 nativeCheckInputs = [ 39 matplotlib 40 pandas 41 pytestCheckHook 42 pytest-cov-stub 43 streamlit 44 ]; 45 enabledTestPaths = [ "skops" ]; 46 disabledTests = [ 47 # flaky 48 "test_base_case_works_as_expected" 49 ]; 50 disabledTestPaths = [ 51 # try to download data from Huggingface Hub: 52 "skops/hub_utils/tests" 53 "skops/card/tests" 54 # minor output formatting issue 55 "skops/card/_model_card.py" 56 ] 57 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 58 # Segfaults on darwin 59 "skops/io/tests/test_persist.py" 60 ]; 61 pytestFlags = [ 62 # Warning from scipy.optimize in skops/io/tests/test_persist.py::test_dump_and_load_with_file_wrapper 63 # https://github.com/skops-dev/skops/issues/479 64 "-Wignore::DeprecationWarning" 65 ]; 66 pythonImportsCheck = [ "skops" ]; 67 68 meta = { 69 description = "Library for saving/loading, sharing, and deploying scikit-learn based models"; 70 mainProgram = "skops"; 71 homepage = "https://skops.readthedocs.io/en/stable"; 72 changelog = "https://github.com/skops-dev/skops/releases/tag/${src.tag}"; 73 license = lib.licenses.mit; 74 maintainers = [ lib.maintainers.bcdarwin ]; 75 }; 76}