diff options
Diffstat (limited to 'pkgs/development')
7 files changed, 176 insertions, 56 deletions
diff --git a/pkgs/development/python-modules/gradient-utils/default.nix b/pkgs/development/python-modules/gradient-utils/default.nix new file mode 100644 index 000000000000..cf0ffb6bb417 --- /dev/null +++ b/pkgs/development/python-modules/gradient-utils/default.nix @@ -0,0 +1,46 @@ +{ buildPythonPackage +, fetchFromGitHub +, hyperopt +, lib +, mock +, numpy +, poetry +, prometheus_client +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "gradient-utils"; + version = "0.3.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "Paperspace"; + repo = pname; + rev = "v${version}"; + sha256 = "083hnkv19mhvdc8nx28f1nph50c903gxh9g9q8531abv0w8m0744"; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'numpy = "1.18.5"' 'numpy = "^1.18.5"' \ + --replace 'hyperopt = "0.1.2"' 'hyperopt = ">=0.1.2"' + ''; + + nativeBuildInputs = [ poetry ]; + checkInputs = [ mock pytestCheckHook ]; + propagatedBuildInputs = [ hyperopt prometheus_client numpy ]; + + preCheck = "export HOSTNAME=myhost-experimentId"; + disabledTests = [ + "test_add_metrics_pushes_metrics" # requires a working prometheus push gateway + ]; + + meta = with lib; { + description = "Gradient ML SDK"; + homepage = "https://github.com/Paperspace/gradient-utils"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ freezeboy ]; + }; +} diff --git a/pkgs/development/python-modules/gradient/default.nix b/pkgs/development/python-modules/gradient/default.nix new file mode 100644 index 000000000000..14df3b882bba --- /dev/null +++ b/pkgs/development/python-modules/gradient/default.nix @@ -0,0 +1,40 @@ +{ lib, fetchPypi, buildPythonPackage +, attrs, boto3, requests, gradient_statsd, terminaltables +, click-completion , click-didyoumean, click-help-colors +, colorama, requests_toolbelt, gradient-utils, halo, progressbar2 +, marshmallow, pyyaml, websocket_client +}: + +buildPythonPackage rec { + pname = "gradient"; + version = "1.4.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "15s21945hg342195ig7nchap5mdnsw931iis92pr7hy8ff0rks3n"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'attrs<=' 'attrs>=' \ + --replace 'colorama==' 'colorama>=' \ + --replace 'PyYAML==' 'PyYAML>=' \ + --replace 'marshmallow<' 'marshmallow>=' + ''; + + propagatedBuildInputs = [ attrs boto3 requests gradient_statsd terminaltables + click-completion click-didyoumean click-help-colors requests_toolbelt + colorama gradient-utils halo marshmallow progressbar2 pyyaml websocket_client + ]; + + # tries to use /homeless-shelter to mimic container usage, etc + doCheck = false; + + meta = with lib; { + description = "The command line interface for Gradient"; + homepage = "https://github.com/Paperspace/gradient-cli"; + license = licenses.isc; + platforms = platforms.unix; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} diff --git a/pkgs/development/python-modules/gradient_sdk/default.nix b/pkgs/development/python-modules/gradient_sdk/default.nix deleted file mode 100644 index 3dffb38f2ffc..000000000000 --- a/pkgs/development/python-modules/gradient_sdk/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, fetchPypi, buildPythonPackage -, hyperopt -}: - -buildPythonPackage rec { - pname = "gradient_sdk"; - version = "0.0.4"; - - src = fetchPypi { - inherit pname version; - sha256 = "Q9oeYjjgJf2lhxW1ypsweQAPpMglmW9PxgzMsgTqJkY="; - }; - - propagatedBuildInputs = [ hyperopt ]; - - pythonImportsCheck = [ "gradient_sdk" ]; - - meta = with lib; { - description = "Gradient ML SDK"; - homepage = "https://github.com/Paperspace/gradient-sdk"; - license = licenses.mit; - platforms = platforms.unix; - maintainers = with maintainers; [ freezeboy ]; - }; -} diff --git a/pkgs/development/python-modules/halo/default.nix b/pkgs/development/python-modules/halo/default.nix new file mode 100644 index 000000000000..e167371b42a4 --- /dev/null +++ b/pkgs/development/python-modules/halo/default.nix @@ -0,0 +1,34 @@ +{ buildPythonPackage +, colorama +, fetchPypi +, isPy27 +, lib +, log-symbols +, pytestCheckHook +, six +, spinners +, termcolor }: + +buildPythonPackage rec { + pname = "halo"; + version = "0.0.31"; + disabled = isPy27; + + src = fetchPypi { + inherit pname version; + sha256 = "1mn97h370ggbc9vi6x8r6akd5q8i512y6kid2nvm67g93r9a6rvv"; + }; + + propagatedBuildInputs = [ colorama log-symbols termcolor six spinners ]; + + # Tests are not included in the PyPI distribution and the git repo does not have tagged releases + doCheck = false; + pythonImportsCheck = [ "halo" ]; + + meta = with lib; { + description = "Beautiful Spinners for Terminal, IPython and Jupyter."; + homepage = "https://github.com/manrajgrover/halo"; + license = licenses.mit; + maintainers = with maintainers; [ urbas ]; + }; +} diff --git a/pkgs/development/python-modules/log-symbols/default.nix b/pkgs/development/python-modules/log-symbols/default.nix new file mode 100644 index 000000000000..f8cdce634ac9 --- /dev/null +++ b/pkgs/development/python-modules/log-symbols/default.nix @@ -0,0 +1,30 @@ +{ buildPythonPackage +, colorama +, fetchPypi +, isPy27 +, pytestCheckHook +, lib }: + +buildPythonPackage rec { + pname = "log_symbols"; + version = "0.0.14"; + disabled = isPy27; + + src = fetchPypi { + inherit pname version; + sha256 = "0mh5d0igw33libfmbsr1ri1p1y644p36nwaa2w6kzrd8w5pvq2yg"; + }; + + propagatedBuildInputs = [ colorama ]; + + # Tests are not included in the PyPI distribution and the git repo does not have tagged releases + doCheck = false; + pythonImportsCheck = [ "log_symbols" ]; + + meta = with lib; { + description = "Colored Symbols for Various Log Levels."; + homepage = "https://github.com/manrajgrover/py-log-symbols"; + license = licenses.mit; + maintainers = with maintainers; [ urbas ]; + }; +} diff --git a/pkgs/development/python-modules/paperspace/default.nix b/pkgs/development/python-modules/paperspace/default.nix deleted file mode 100644 index 86dbffd76b76..000000000000 --- a/pkgs/development/python-modules/paperspace/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib, fetchPypi, buildPythonPackage -, boto3, requests, gradient_statsd, terminaltables -, click-completion , click-didyoumean, click-help-colors -, colorama, requests_toolbelt, gradient_sdk, progressbar2 -}: - -buildPythonPackage rec { - pname = "paperspace"; - version = "0.2.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "7959305128fea6da8ca0cdc528783a89859dacb9b54bf8eb89fd04a518872191"; - }; - - propagatedBuildInputs = [ boto3 requests gradient_statsd terminaltables - click-completion click-didyoumean click-help-colors requests_toolbelt - colorama gradient_sdk progressbar2 - ]; - - # tries to use /homeless-shelter to mimic container usage, etc - doCheck = false; - - meta = with lib; { - description = "Python API for Paperspace Cloud"; - homepage = "https://paperspace.com"; - license = licenses.isc; - platforms = platforms.unix; - maintainers = with maintainers; [ thoughtpolice ]; - }; -} diff --git a/pkgs/development/python-modules/spinners/default.nix b/pkgs/development/python-modules/spinners/default.nix new file mode 100644 index 000000000000..1e71296fd176 --- /dev/null +++ b/pkgs/development/python-modules/spinners/default.nix @@ -0,0 +1,26 @@ +{ buildPythonPackage +, fetchPypi +, isPy27 +, lib }: + +buildPythonPackage rec { + pname = "spinners"; + version = "0.0.24"; + disabled = isPy27; + + src = fetchPypi { + inherit pname version; + sha256 = "0zz2z6dpdjdq5z8m8w8dfi8by0ih1zrdq0caxm1anwhxg2saxdhy"; + }; + + # Tests are not included in the PyPI distribution and the git repo does not have tagged releases + doCheck = false; + pythonImportsCheck = [ "spinners" ]; + + meta = with lib; { + description = "Spinners for the Terminal."; + homepage = "https://github.com/manrajgrover/py-spinners"; + license = licenses.mit; + maintainers = with maintainers; [ urbas ]; + }; +} |