diff --git a/pkgs/development/python-modules/skorch/default.nix b/pkgs/development/python-modules/skorch/default.nix index a6508ded491e..20d3fb5f4e76 100644 --- a/pkgs/development/python-modules/skorch/default.nix +++ b/pkgs/development/python-modules/skorch/default.nix @@ -2,8 +2,6 @@ , buildPythonPackage , fetchPypi , pytestCheckHook -, pytest -, pytest-cov , flaky , numpy , pandas @@ -16,32 +14,41 @@ buildPythonPackage rec { pname = "skorch"; - version = "0.11.0"; + version = "0.12.1"; src = fetchPypi { inherit pname version; - sha256 = "b35cb4e50045742f0ffcfad33044af691d5d36b50212573753a804483a947ca9"; + hash = "sha256-fjNbNY/Dr7lgVGPrHJTvPGuhyPR6IVS7ohBQMI+J1+k="; }; propagatedBuildInputs = [ numpy torch scikit-learn scipy tabulate tqdm ]; - checkInputs = [ pytest pytest-cov flaky pandas pytestCheckHook ]; + checkInputs = [ flaky pandas pytestCheckHook ]; + + # patch out pytest-cov dep/invocation + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov=skorch" "" \ + --replace "--cov-report=term-missing" "" \ + --replace "--cov-config .coveragerc" "" + ''; disabledTests = [ # on CPU, these expect artifacts from previous GPU run "test_load_cuda_params_to_cpu" # failing tests "test_pickle_load" - "test_grid_search_with_slds_" - "test_grid_search_with_dict_works" ]; + # tries to import `transformers` and download HuggingFace data + disabledTestPaths = [ "skorch/tests/test_hf.py" ]; + + pythonImportsCheck = [ "skorch" ]; + meta = with lib; { description = "Scikit-learn compatible neural net library using Pytorch"; homepage = "https://skorch.readthedocs.io"; changelog = "https://github.com/skorch-dev/skorch/blob/master/CHANGES.md"; license = licenses.bsd3; maintainers = with maintainers; [ bcdarwin ]; - # TypeError: __init__() got an unexpected keyword argument 'iid' - broken = true; }; }