python3Packages.gradient-utils: disable metrics tests

This commit is contained in:
Fabian Affolter 2022-01-07 12:22:17 +01:00
parent 2dedc1eaa4
commit e38b7b1cef

View File

@ -7,6 +7,7 @@
, poetry-core
, prometheus-client
, pytestCheckHook
, pythonOlder
, requests
}:
@ -15,6 +16,8 @@ buildPythonPackage rec {
version = "0.5.0";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Paperspace";
repo = pname;
@ -22,15 +25,9 @@ buildPythonPackage rec {
sha256 = "19plkgwwfs6298vjplgsvhirixi3jbngq5y07x9c0fjxk39fa2dk";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'numpy = "1.18.5"' 'numpy = "^1.18.5"' \
--replace 'hyperopt = "0.1.2"' 'hyperopt = ">=0.1.2"' \
--replace 'wheel = "^0.35.1"' 'wheel = "*"' \
--replace 'prometheus-client = ">=0.8,<0.10"' 'prometheus-client = "*"'
'';
nativeBuildInputs = [ poetry-core ];
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
hyperopt
@ -44,15 +41,24 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'wheel = "^0.35.1"' 'wheel = "*"' \
--replace 'prometheus-client = ">=0.8,<0.10"' 'prometheus-client = "*"'
'';
preCheck = ''
export HOSTNAME=myhost-experimentId
'';
disabledTests = [
"test_add_metrics_pushes_metrics" # requires a working prometheus push gateway
disabledTestPaths = [
# Requires a working Prometheus push gateway
"tests/integration/test_metrics.py"
];
pythonImportsCheck = [ "gradient_utils" ];
pythonImportsCheck = [
"gradient_utils"
];
meta = with lib; {
description = "Python utils and helpers library for Gradient";