From 8a2358dae0f371586546a6aeef1f3d932bff9532 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 5 Aug 2023 22:18:20 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(custom=5Fcomponent.py):=20fi?= =?UTF-8?q?x=20import=20paths=20for=20session=5Fgetter=20and=20Flow=20mode?= =?UTF-8?q?ls=20in=20custom=5Fcomponent.py=20file=20=F0=9F=94=A7=20fix(tes?= =?UTF-8?q?t=5Fcache=5Fmanager.py):=20fix=20import=20path=20for=20CacheMan?= =?UTF-8?q?ager=20in=20test=5Fcache=5Fmanager.py=20file=20=F0=9F=94=A7=20f?= =?UTF-8?q?ix(test=5Fcustom=5Fcomponent.py):=20fix=20import=20path=20for?= =?UTF-8?q?=20Flow=20and=20FlowCreate=20models=20in=20test=5Fcustom=5Fcomp?= =?UTF-8?q?onent.py=20file=20=F0=9F=94=A7=20fix(test=5Fdatabase.py):=20fix?= =?UTF-8?q?=20import=20path=20for=20Flow,=20FlowCreate,=20and=20FlowUpdate?= =?UTF-8?q?=20models=20in=20test=5Fdatabase.py=20file=20=F0=9F=94=A7=20fix?= =?UTF-8?q?(test=5Fwebsocket.py):=20fix=20import=20path=20for=20WebSocketD?= =?UTF-8?q?isconnect=20in=20test=5Fwebsocket.py=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/custom/custom_component.py | 4 ++-- tests/test_cache_manager.py | 2 +- tests/test_custom_component.py | 2 +- tests/test_database.py | 4 ++-- tests/test_websocket.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index ce8956660..0d93f8d75 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -6,8 +6,8 @@ from langflow.interface.custom.directory_reader import DirectoryReader from langflow.utils import validate -from langflow.database.base import session_getter -from langflow.database.models.flow import Flow +from langflow.services.database.base import session_getter +from langflow.services.database.models.flow import Flow from pydantic import Extra import yaml diff --git a/tests/test_cache_manager.py b/tests/test_cache_manager.py index f3e65481e..660512634 100644 --- a/tests/test_cache_manager.py +++ b/tests/test_cache_manager.py @@ -2,7 +2,7 @@ from io import StringIO import pandas as pd import pytest -from langflow.cache.manager import CacheManager +from langflow.services.cache.manager import CacheManager from PIL import Image diff --git a/tests/test_custom_component.py b/tests/test_custom_component.py index 199906dda..f20311cec 100644 --- a/tests/test_custom_component.py +++ b/tests/test_custom_component.py @@ -5,7 +5,7 @@ from uuid import uuid4 from fastapi import HTTPException -from langflow.database.models.flow import Flow, FlowCreate +from langflow.services.database.models.flow import Flow, FlowCreate from langflow.interface.custom.base import CustomComponent from langflow.interface.custom.component import ( Component, diff --git a/tests/test_database.py b/tests/test_database.py index bc512b6b0..6ebae5396 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -8,9 +8,9 @@ from fastapi.testclient import TestClient from fastapi.encoders import jsonable_encoder from langflow.api.v1.schemas import FlowListCreate -from langflow.database.models.flow import Flow, FlowCreate, FlowUpdate +from langflow.services.database.models.flow import Flow, FlowCreate, FlowUpdate -from langflow.database.models.flow_style import ( +from langflow.services.database.models.flow_style import ( FlowStyleCreate, FlowStyleRead, FlowStyleUpdate, diff --git a/tests/test_websocket.py b/tests/test_websocket.py index 57a0e95f6..dd668c287 100644 --- a/tests/test_websocket.py +++ b/tests/test_websocket.py @@ -1,6 +1,6 @@ from fastapi import WebSocketDisconnect -# from langflow.chat.manager import ChatManager +# from langflow.services.chat.manager import ChatManager import pytest