From efe74c8c55c661fc24f200f3962b7f8b7c040cfc Mon Sep 17 00:00:00 2001 From: gayathrivijayakumar Date: Wed, 4 Dec 2024 13:31:54 +0530 Subject: [PATCH] Roll to latest SDK --- backend/pyproject.toml | 1 + backend/utils/file_storage/helpers/common_file_helper.py | 8 +++++--- platform-service/pyproject.toml | 4 ++-- unstract/filesystem/src/unstract/filesystem/__init__.py | 2 +- .../src/unstract/filesystem/file_storage_config.py | 3 +-- unstract/filesystem/src/unstract/filesystem/filesystem.py | 8 +++++--- unstract/workflow-execution/pyproject.toml | 3 ++- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 4335cfa5c..0c88e6f1a 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -48,6 +48,7 @@ dependencies = [ "unstract-tool-registry @ file:///${PROJECT_ROOT}/../unstract/tool-registry", "unstract-tool-sandbox @ file:///${PROJECT_ROOT}/../unstract/tool-sandbox", "unstract-workflow-execution @ file:///${PROJECT_ROOT}/../unstract/workflow-execution", + "unstract-filesystem @ file:///${PROJECT_ROOT}/../unstract/filesystem", "azure-identity==1.16.0", "azure-mgmt-apimanagement==3.0.0", "croniter>=3.0.3", diff --git a/backend/utils/file_storage/helpers/common_file_helper.py b/backend/utils/file_storage/helpers/common_file_helper.py index 0430a6876..2aa1fabbd 100644 --- a/backend/utils/file_storage/helpers/common_file_helper.py +++ b/backend/utils/file_storage/helpers/common_file_helper.py @@ -1,9 +1,11 @@ import json from typing import Any, Union -from unstract.sdk.file_storage.fs_permanent import PermanentFileStorage -from unstract.sdk.file_storage.fs_provider import FileStorageProvider -from unstract.sdk.file_storage.fs_shared_temporary import SharedTemporaryFileStorage +from unstract.sdk.file_storage import ( + FileStorageProvider, + PermanentFileStorage, + SharedTemporaryFileStorage, +) from utils.file_storage.constants import FileStorageKeys, FileStorageType from unstract.core.utilities import UnstractUtils diff --git a/platform-service/pyproject.toml b/platform-service/pyproject.toml index 4a4d8a14e..847ed2434 100644 --- a/platform-service/pyproject.toml +++ b/platform-service/pyproject.toml @@ -12,10 +12,10 @@ dependencies = [ "python-dotenv~=1.0", "redis~=5.0.1", "cryptography>=41.0.7", - "unstract-flags @ file:///${PROJECT_ROOT}/../unstract/flags", "requests>=2.31.0", - "unstract-sdk==0.54.0rc2", + "unstract-sdk==0.54.0rc5", "gcsfs==2024.10.0", + "unstract-flags @ file:///${PROJECT_ROOT}/../unstract/flags", ] requires-python = ">=3.9,<3.11.1" readme = "README.md" diff --git a/unstract/filesystem/src/unstract/filesystem/__init__.py b/unstract/filesystem/src/unstract/filesystem/__init__.py index 3cfdc80eb..68f36d857 100644 --- a/unstract/filesystem/src/unstract/filesystem/__init__.py +++ b/unstract/filesystem/src/unstract/filesystem/__init__.py @@ -2,7 +2,7 @@ This module exposes the main classes for file storage handling. """ -from unstract.sdk.file_storage.fs_shared_temporary import SharedTemporaryFileStorage +from unstract.sdk.file_storage.shared_temporary import SharedTemporaryFileStorage from .file_storage_types import FileStorageType from .filesystem import FileSystem diff --git a/unstract/filesystem/src/unstract/filesystem/file_storage_config.py b/unstract/filesystem/src/unstract/filesystem/file_storage_config.py index eb716fb48..a77a0bcb2 100644 --- a/unstract/filesystem/src/unstract/filesystem/file_storage_config.py +++ b/unstract/filesystem/src/unstract/filesystem/file_storage_config.py @@ -2,8 +2,7 @@ import logging import os -from unstract.sdk.file_storage import FileStorageProvider -from unstract.sdk.file_storage.fs_shared_temporary import SharedTemporaryFileStorage +from unstract.sdk.file_storage import FileStorageProvider, SharedTemporaryFileStorage from .exceptions import ProviderNotFound from .file_storage_types import FileStorageType # Import the shared enum diff --git a/unstract/filesystem/src/unstract/filesystem/filesystem.py b/unstract/filesystem/src/unstract/filesystem/filesystem.py index 094d2448a..5f2e49769 100644 --- a/unstract/filesystem/src/unstract/filesystem/filesystem.py +++ b/unstract/filesystem/src/unstract/filesystem/filesystem.py @@ -2,9 +2,11 @@ import os from typing import Any -from unstract.sdk.file_storage import FileStorageProvider -from unstract.sdk.file_storage.fs_impl import FileStorage -from unstract.sdk.file_storage.fs_permanent import PermanentFileStorage +from unstract.sdk.file_storage import ( + FileStorage, + FileStorageProvider, + PermanentFileStorage, +) from unstract.filesystem.file_storage_types import FileStorageType diff --git a/unstract/workflow-execution/pyproject.toml b/unstract/workflow-execution/pyproject.toml index 511515644..4fe99320c 100644 --- a/unstract/workflow-execution/pyproject.toml +++ b/unstract/workflow-execution/pyproject.toml @@ -23,7 +23,8 @@ dependencies = [ "unstract-core", "unstract-tool-registry", "unstract-tool-sandbox", - "unstract-flags" + "unstract-flags", + "unstract-filesystem" ] requires-python = ">=3.9" readme = "README.md"