From 1b8ad25047c1a24af34f21bf228fc856d7840155 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 Nov 2023 16:52:36 +0900 Subject: [PATCH 1/2] python311Packages.clarifai: 9.7.1 -> 9.10.4 Diff: https://github.com/Clarifai/clarifai-python/compare/9.7.3...9.10.4 Changelog: https://github.com/Clarifai/clarifai-python/releases/tag/9.10.4 --- .../python-modules/clarifai/default.nix | 49 ++++++++++++++++--- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/clarifai/default.nix b/pkgs/development/python-modules/clarifai/default.nix index 8f6fdc18509ff..1d541e3dab724 100644 --- a/pkgs/development/python-modules/clarifai/default.nix +++ b/pkgs/development/python-modules/clarifai/default.nix @@ -2,38 +2,75 @@ , buildPythonPackage , fetchFromGitHub , pythonOlder +, setuptools , clarifai-grpc +, numpy +, opencv4 +, pillow +, pyyaml +, rich +, schema +, tqdm +, tritonclient , pytestCheckHook }: buildPythonPackage rec { pname = "clarifai"; - version = "9.7.1"; - format = "setuptools"; + version = "9.10.4"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "Clarifai"; - repo = "clarifai-python-utils"; + repo = "clarifai-python"; rev = "refs/tags/${version}"; - hash = "sha256-/zgHgD2kf3ZG7Mu9AEBfOwqpcD0Ye0LVrFxLeuGurCM="; + hash = "sha256-i/B4wtSqG/ZysAcidsXnqYPdcmu93Ufd6N9fxUmDJ2E="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ clarifai-grpc + numpy + tqdm + opencv4 + tritonclient + rich + schema + pillow + pyyaml ]; nativeCheckInputs = [ pytestCheckHook ]; + disabledTests = [ + # require network access and API key + "test_export_workflow_general" + ]; + + disabledTestPaths = [ + # require network access and API key + "tests/test_app.py" + "tests/test_data_upload.py" + "tests/test_model_predict.py" + "tests/test_model_train.py" + "tests/test_search.py" + "tests/workflow/test_create_delete.py" + "tests/workflow/test_predict.py" + ]; + pythonImportsCheck = [ "clarifai" ]; meta = with lib; { description = "Clarifai Python Utilities"; - homepage = "https://github.com/Clarifai/clarifai-python-utils"; - changelog = "https://github.com/Clarifai/clarifai-python-utils/releases/tag/${src.rev}"; + homepage = "https://github.com/Clarifai/clarifai-python"; + changelog = "https://github.com/Clarifai/clarifai-python/releases/tag/${src.rev}"; license = licenses.asl20; maintainers = with maintainers; [ natsukium ]; }; From 219f5595b9ce61e86fec22703172f016dc26d831 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 Nov 2023 16:55:10 +0900 Subject: [PATCH 2/2] python311Packages.clarifai-grpc: 9.10.0 -> 9.10.5 Diff: https://github.com/Clarifai/clarifai-python-grpc/compare/9.10.0...9.10.5 Changelog: https://github.com/Clarifai/clarifai-python-grpc/releases/tag/9.10.5 --- .../python-modules/clarifai-grpc/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/clarifai-grpc/default.nix b/pkgs/development/python-modules/clarifai-grpc/default.nix index e6bff88f43210..4aa60582bfc49 100644 --- a/pkgs/development/python-modules/clarifai-grpc/default.nix +++ b/pkgs/development/python-modules/clarifai-grpc/default.nix @@ -1,7 +1,8 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder +, setuptools , googleapis-common-protos , grpcio , protobuf @@ -10,16 +11,22 @@ buildPythonPackage rec { pname = "clarifai-grpc"; - version = "9.10.0"; - format = "setuptools"; + version = "9.10.5"; + pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-8jx2OP1VcQtGmen58r1k/w7srjSJC/53sNxFrRm7IXs="; + src = fetchFromGitHub { + owner = "Clarifai"; + repo = "clarifai-python-grpc"; + rev = "refs/tags/${version}"; + hash = "sha256-lTvxafPdWET0p6dRnaTiOd8oPOjcRFZ45AtXkObNSBQ="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ googleapis-common-protos grpcio