diff --git a/pkgs/development/python-modules/fastapi-mcp/default.nix b/pkgs/development/python-modules/fastapi-mcp/default.nix index 844ba0f6de2d..bc9c51e8f0d3 100644 --- a/pkgs/development/python-modules/fastapi-mcp/default.nix +++ b/pkgs/development/python-modules/fastapi-mcp/default.nix @@ -20,7 +20,7 @@ # tests coverage, - pytest-asyncio, + pytest-asyncio_0, pytest-cov-stub, pytestCheckHook, }: @@ -59,7 +59,7 @@ buildPythonPackage rec { nativeCheckInputs = [ coverage - pytest-asyncio + pytest-asyncio_0 pytest-cov-stub pytestCheckHook ]; diff --git a/pkgs/development/python-modules/skops/default.nix b/pkgs/development/python-modules/skops/default.nix index 4356e4fe4983..ed6cf8b9c555 100644 --- a/pkgs/development/python-modules/skops/default.nix +++ b/pkgs/development/python-modules/skops/default.nix @@ -1,16 +1,21 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, - pythonOlder, hatchling, - pytestCheckHook, - pytest-cov-stub, huggingface-hub, matplotlib, + numpy, + packaging, pandas, + prettytable, + pytest-cov-stub, + pytestCheckHook, + pythonOlder, + pyyaml, + rich, scikit-learn, - stdenv, streamlit, tabulate, }: @@ -30,7 +35,9 @@ buildPythonPackage rec { build-system = [ hatchling ]; dependencies = [ - huggingface-hub + numpy + packaging + prettytable scikit-learn tabulate ]; @@ -38,19 +45,26 @@ buildPythonPackage rec { nativeCheckInputs = [ matplotlib pandas - pytestCheckHook pytest-cov-stub + pytestCheckHook + pyyaml streamlit ]; + + optional-dependencies = { + rich = [ rich ]; + }; + enabledTestPaths = [ "skops" ]; + disabledTests = [ # flaky "test_base_case_works_as_expected" + # fairlearn is not available in nixpkgs + "TestAddFairlearnMetricFrame" ]; + disabledTestPaths = [ - # try to download data from Huggingface Hub: - "skops/hub_utils/tests" - "skops/card/tests" # minor output formatting issue "skops/card/_model_card.py" ] @@ -58,19 +72,21 @@ buildPythonPackage rec { # Segfaults on darwin "skops/io/tests/test_persist.py" ]; + pytestFlags = [ # Warning from scipy.optimize in skops/io/tests/test_persist.py::test_dump_and_load_with_file_wrapper # https://github.com/skops-dev/skops/issues/479 "-Wignore::DeprecationWarning" ]; + pythonImportsCheck = [ "skops" ]; meta = { description = "Library for saving/loading, sharing, and deploying scikit-learn based models"; - mainProgram = "skops"; homepage = "https://skops.readthedocs.io/en/stable"; changelog = "https://github.com/skops-dev/skops/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = [ lib.maintainers.bcdarwin ]; + mainProgram = "skops"; }; }