diff options
Diffstat (limited to 'pkgs/development/python-modules/gradient-utils/default.nix')
-rw-r--r-- | pkgs/development/python-modules/gradient-utils/default.nix | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/gradient-utils/default.nix b/pkgs/development/python-modules/gradient-utils/default.nix index cf0ffb6bb417e..ee8d1bde62221 100644 --- a/pkgs/development/python-modules/gradient-utils/default.nix +++ b/pkgs/development/python-modules/gradient-utils/default.nix @@ -1,12 +1,13 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchFromGitHub , hyperopt -, lib , mock , numpy -, poetry +, poetry-core , prometheus_client , pytestCheckHook +, requests }: buildPythonPackage rec { @@ -24,23 +25,39 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ --replace 'numpy = "1.18.5"' 'numpy = "^1.18.5"' \ - --replace 'hyperopt = "0.1.2"' 'hyperopt = ">=0.1.2"' + --replace 'hyperopt = "0.1.2"' 'hyperopt = ">=0.1.2"' \ + --replace 'wheel = "^0.35.1"' 'wheel = "*"' ''; - nativeBuildInputs = [ poetry ]; - checkInputs = [ mock pytestCheckHook ]; - propagatedBuildInputs = [ hyperopt prometheus_client numpy ]; + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + hyperopt + prometheus_client + numpy + ]; + + checkInputs = [ + mock + requests + pytestCheckHook + ]; + + preCheck = '' + export HOSTNAME=myhost-experimentId + ''; - preCheck = "export HOSTNAME=myhost-experimentId"; disabledTests = [ "test_add_metrics_pushes_metrics" # requires a working prometheus push gateway ]; + pythonImportsCheck = [ "gradient_utils" ]; + meta = with lib; { - description = "Gradient ML SDK"; - homepage = "https://github.com/Paperspace/gradient-utils"; - license = licenses.mit; - platforms = platforms.unix; + description = "Python utils and helpers library for Gradient"; + homepage = "https://github.com/Paperspace/gradient-utils"; + license = licenses.mit; + platforms = platforms.unix; maintainers = with maintainers; [ freezeboy ]; }; } |