about summary refs log tree commit diff
path: root/pkgs/development/python-modules/clarifai/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/clarifai/default.nix')
-rw-r--r--pkgs/development/python-modules/clarifai/default.nix61
1 files changed, 47 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/clarifai/default.nix b/pkgs/development/python-modules/clarifai/default.nix
index 2564b168cfe7..05a86d09ee77 100644
--- a/pkgs/development/python-modules/clarifai/default.nix
+++ b/pkgs/development/python-modules/clarifai/default.nix
@@ -1,23 +1,29 @@
 { lib
 , buildPythonPackage
-, fetchFromGitHub
-, pythonOlder
-, setuptools
 , clarifai-grpc
+, fetchFromGitHub
+, inquirerpy
+, llama-index-core
 , numpy
 , opencv4
+, pandas
 , pillow
+, pycocotools
+, pypdf
+, pytestCheckHook
+, pythonOlder
+, pythonRelaxDepsHook
 , pyyaml
 , rich
 , schema
+, setuptools
 , tqdm
 , tritonclient
-, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "clarifai";
-  version = "9.11.1";
+  version = "10.1.0";
   pyproject = true;
 
   disabled = pythonOlder "3.8";
@@ -26,36 +32,59 @@ buildPythonPackage rec {
     owner = "Clarifai";
     repo = "clarifai-python";
     rev = "refs/tags/${version}";
-    hash = "sha256-fVari/SnrUnEbrYefV9j2yA/EMJoGiLOV7q/DrS0AQ8=";
+    hash = "sha256-/2PIsSsYr/R7DuTX/ndBAOX7C3IaFqPw16ZAX8E1Vk8=";
   };
 
+  pythonRelaxDeps = [
+    "clarifai-grpc"
+  ];
+
+  pythonRemoveDeps = [
+    "opencv-python"
+  ];
+
   nativeBuildInputs = [
+    pythonRelaxDepsHook
     setuptools
   ];
 
   propagatedBuildInputs = [
     clarifai-grpc
+    inquirerpy
+    llama-index-core
     numpy
-    tqdm
     opencv4
-    tritonclient
-    rich
-    schema
+    pandas
     pillow
+    pypdf
     pyyaml
+    rich
+    schema
+    tqdm
+    tritonclient
   ];
 
+  passthru.optional-dependencies = {
+    all = [
+      pycocotools
+    ];
+  };
+
   nativeCheckInputs = [
     pytestCheckHook
   ];
 
+  preCheck = ''
+    export HOME=$(mktemp -d)
+  '';
+
   disabledTests = [
-    # require network access and API key
+    # Test requires network access and API key
     "test_export_workflow_general"
   ];
 
   disabledTestPaths = [
-    # require network access and API key
+    # Tests require network access and API key
     "tests/test_app.py"
     "tests/test_data_upload.py"
     "tests/test_model_predict.py"
@@ -63,14 +92,18 @@ buildPythonPackage rec {
     "tests/test_search.py"
     "tests/workflow/test_create_delete.py"
     "tests/workflow/test_predict.py"
+    "tests/test_rag.py"
+    "clarifai/models/model_serving/repo_build/static_files/base_test.py"
   ];
 
-  pythonImportsCheck = [ "clarifai" ];
+  pythonImportsCheck = [
+    "clarifai"
+  ];
 
   meta = with lib; {
     description = "Clarifai Python Utilities";
     homepage = "https://github.com/Clarifai/clarifai-python";
-    changelog = "https://github.com/Clarifai/clarifai-python/releases/tag/${src.rev}";
+    changelog = "https://github.com/Clarifai/clarifai-python/releases/tag/${version}";
     license = licenses.asl20;
     maintainers = with maintainers; [ natsukium ];
   };