Feat: move other tools to different folders (#8164)
* delete data and transfer data to dataframe * [autofix.ci] apply automated fixes * create a new bundle for search * fix type for dataframe * add data_to_dataframe function * [autofix.ci] apply automated fixes * fix test because of files movement * delete message and text * json update * fix search yahoo test * fix run_model output type * add tavily bundle * move other tools * [autofix.ci] apply automated fixes * add tavily bundle * move other tools * [autofix.ci] apply automated fixes * update python repl import path * autofix * fix test * fix frontend test --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
This commit is contained in:
parent
61b89b000a
commit
d84ea5c9b7
15 changed files with 100 additions and 52 deletions
|
|
@ -3,6 +3,7 @@ from .csv_to_data import CSVToDataComponent
|
|||
from .directory import DirectoryComponent
|
||||
from .file import FileComponent
|
||||
from .json_to_data import JSONToDataComponent
|
||||
from .mcp_component import MCPToolsComponent
|
||||
from .news_search import NewsSearchComponent
|
||||
from .rss import RSSReaderComponent
|
||||
from .sql_executor import SQLComponent
|
||||
|
|
@ -16,6 +17,7 @@ __all__ = [
|
|||
"DirectoryComponent",
|
||||
"FileComponent",
|
||||
"JSONToDataComponent",
|
||||
"MCPToolsComponent",
|
||||
"NewsSearchComponent",
|
||||
"RSSReaderComponent",
|
||||
"SQLComponent",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from .calculator_core import CalculatorComponent
|
||||
from .create_list import CreateListComponent
|
||||
from .current_date import CurrentDateComponent
|
||||
from .id_generator import IDGeneratorComponent
|
||||
|
|
@ -8,6 +9,7 @@ from .structured_output import StructuredOutputComponent
|
|||
|
||||
__all__ = [
|
||||
"BatchRunComponent",
|
||||
"CalculatorComponent",
|
||||
"CreateListComponent",
|
||||
"CurrentDateComponent",
|
||||
"IDGeneratorComponent",
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ from .message_to_data import MessageToDataComponent
|
|||
from .parse_data import ParseDataComponent
|
||||
from .parse_json_data import ParseJSONDataComponent
|
||||
from .parser import ParserComponent
|
||||
from .python_repl_core import PythonREPLComponent
|
||||
from .regex import RegexExtractorComponent
|
||||
from .select_data import SelectDataComponent
|
||||
from .split_text import SplitTextComponent
|
||||
|
|
@ -33,6 +34,7 @@ __all__ = [
|
|||
"ParseDataFrameComponent",
|
||||
"ParseJSONDataComponent",
|
||||
"ParserComponent",
|
||||
"PythonREPLComponent",
|
||||
"RegexExtractorComponent",
|
||||
"SelectDataComponent",
|
||||
"SplitTextComponent",
|
||||
|
|
|
|||
|
|
@ -3,13 +3,10 @@ import warnings
|
|||
from langchain_core._api.deprecation import LangChainDeprecationWarning
|
||||
|
||||
from .calculator import CalculatorToolComponent
|
||||
from .calculator_core import CalculatorComponent
|
||||
from .google_search_api import GoogleSearchAPIComponent
|
||||
from .google_serper_api import GoogleSerperAPIComponent
|
||||
from .mcp_component import MCPToolsComponent
|
||||
from .python_code_structured_tool import PythonCodeStructuredTool
|
||||
from .python_repl import PythonREPLToolComponent
|
||||
from .python_repl_core import PythonREPLComponent
|
||||
from .search_api import SearchAPIComponent
|
||||
from .searxng import SearXNGToolComponent
|
||||
from .serp_api import SerpAPIComponent
|
||||
|
|
@ -23,16 +20,13 @@ with warnings.catch_warnings():
|
|||
__all__ = [
|
||||
"AstraDBCQLToolComponent",
|
||||
"AstraDBToolComponent",
|
||||
"CalculatorComponent",
|
||||
"CalculatorToolComponent",
|
||||
"DuckDuckGoSearchComponent",
|
||||
"ExaSearchToolkit",
|
||||
"GleanSearchAPIComponent",
|
||||
"GoogleSearchAPIComponent",
|
||||
"GoogleSerperAPIComponent",
|
||||
"MCPToolsComponent",
|
||||
"PythonCodeStructuredTool",
|
||||
"PythonREPLComponent",
|
||||
"PythonREPLToolComponent",
|
||||
"SearXNGToolComponent",
|
||||
"SearchAPIComponent",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from tests.integration.utils import run_single_component
|
|||
|
||||
|
||||
async def test_mcp_component():
|
||||
from langflow.components.tools.mcp_component import MCPToolsComponent
|
||||
from langflow.components.data.mcp_component import MCPToolsComponent
|
||||
|
||||
inputs = {}
|
||||
await run_single_component(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import pytest
|
||||
from langflow.components.tools.calculator_core import CalculatorComponent
|
||||
from langflow.components.helpers.calculator_core import CalculatorComponent
|
||||
|
||||
from tests.base import ComponentTestBaseWithoutClient
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import asyncio
|
|||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from langflow.components.tools.mcp_component import MCPSseClient, MCPStdioClient, MCPToolsComponent
|
||||
from langflow.components.data.mcp_component import MCPSseClient, MCPStdioClient, MCPToolsComponent
|
||||
|
||||
from tests.base import ComponentTestBaseWithoutClient, VersionComponentMapping
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ class TestMCPToolsComponent(ComponentTestBaseWithoutClient):
|
|||
# Test tool options are updated
|
||||
assert "options" in updated_config["tool"]
|
||||
|
||||
@patch("langflow.components.tools.mcp_component.create_tool_coroutine")
|
||||
@patch("langflow.components.data.mcp_component.create_tool_coroutine")
|
||||
async def test_build_output(self, mock_create_coroutine, component_class, default_kwargs, mock_tool):
|
||||
"""Test building output with a tool."""
|
||||
component = component_class(**default_kwargs)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import pytest
|
||||
from langflow.components.tools import PythonREPLComponent
|
||||
from langflow.components.processing import PythonREPLComponent
|
||||
|
||||
from tests.base import DID_NOT_EXIST, ComponentTestBaseWithoutClient
|
||||
|
||||
|
|
|
|||
1
src/frontend/package-lock.json
generated
1
src/frontend/package-lock.json
generated
|
|
@ -708,6 +708,7 @@
|
|||
},
|
||||
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
|
||||
"version": "1.3.0",
|
||||
"extraneous": true,
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -186,12 +186,12 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("mcp connection");
|
||||
|
||||
await page.waitForSelector('[data-testid="toolsMCP Connection"]', {
|
||||
await page.waitForSelector('[data-testid="dataMCP Connection"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("toolsMCP Connection")
|
||||
.getByTestId("dataMCP Connection")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 0, y: 0 },
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("mcp connection");
|
||||
|
||||
await page.waitForSelector('[data-testid="toolsMCP Connection"]', {
|
||||
await page.waitForSelector('[data-testid="dataMCP Connection"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("toolsMCP Connection")
|
||||
.getByTestId("dataMCP Connection")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 0, y: 0 },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue