Merge pull request #110565 from urbas/gradient-sdk-renamed

This commit is contained in:
Sandro 2021-02-01 08:42:54 +01:00 committed by GitHub
commit 7b7556a41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 185 additions and 59 deletions

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -2755,7 +2755,9 @@ in {
gpyopt = callPackage ../development/python-modules/gpyopt { };
gradient_sdk = callPackage ../development/python-modules/gradient_sdk { };
gradient = callPackage ../development/python-modules/gradient { };
gradient-utils = callPackage ../development/python-modules/gradient-utils { };
gradient_statsd = callPackage ../development/python-modules/gradient_statsd { };
@ -2879,6 +2881,8 @@ in {
ha-ffmpeg = callPackage ../development/python-modules/ha-ffmpeg { };
halo = callPackage ../development/python-modules/halo { };
handout = callPackage ../development/python-modules/handout { };
HAP-python = callPackage ../development/python-modules/HAP-python { };
@ -3782,6 +3786,8 @@ in {
lockfile = callPackage ../development/python-modules/lockfile { };
log-symbols = callPackage ../development/python-modules/log-symbols { };
Logbook = callPackage ../development/python-modules/Logbook { };
logfury = callPackage ../development/python-modules/logfury { };
@ -4648,8 +4654,6 @@ in {
papermill = callPackage ../development/python-modules/papermill { };
paperspace = callPackage ../development/python-modules/paperspace { };
openpaperwork-core = callPackage ../applications/office/paperwork/openpaperwork-core.nix { };
openpaperwork-gtk = callPackage ../applications/office/paperwork/openpaperwork-gtk.nix { };
paperwork-backend = callPackage ../applications/office/paperwork/paperwork-backend.nix { };
@ -7300,6 +7304,8 @@ in {
sphfile = callPackage ../development/python-modules/sphfile { };
spinners = callPackage ../development/python-modules/spinners { };
sphinxcontrib-applehelp = callPackage ../development/python-modules/sphinxcontrib-applehelp { };
sphinxcontrib-autoapi = callPackage ../development/python-modules/sphinxcontrib-autoapi { };