feat: add DataToDataFrame component for converting Data objects #18578
ci.yml
on: pull_request
Check Nightly Status
2s
Matrix: Lint Backend / Run Mypy
Matrix: Run Backend Tests / build
Matrix: Run Backend Tests / integration-tests
Matrix: Run Backend Tests / test-cli
Run Frontend Tests
/
Determine Test Suites and Shard Distribution
44s
Matrix: Run Frontend Tests / setup-and-test
CI Success
0s
Annotations
13 errors and 33 warnings
Run Backend Tests / Unit Tests - Python 3.10 - Group 4
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 4
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 2:
src/backend/tests/src/backend/tests/base.py#L146
TestURLComponent.test_component_versions[1.1.1]
AssertionError: Failed to execute component TestURLComponent for version 1.1.1:
Module: data
File: url
Error: HTTPSConnectionPool(host='example.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1007)')))
Component Code: import re
from langchain_community.document_loaders import AsyncHtmlLoader, WebBaseLoader
from langflow.custom import Component
from langflow.helpers.data import data_to_text
from langflow.io import DropdownInput, MessageTextInput, Output
from langflow.schema import Data
from langflow.schema.message import Message
class URLComponent(Component):
display_name = "URL"
description = "Fetch content from one or more URLs."
icon = "layout-template"
name = "URL"
inputs = [
MessageTextInput(
name="urls",
display_name="URLs",
info="Enter one or more URLs, by clicking the '+' button.",
is_list=True,
tool_mode=True,
),
DropdownInput(
name="format",
display_name="Output Format",
info="Output Format. Use 'Text' to extract the text from the HTML or 'Raw HTML' for the raw HTML content.",
options=["Text", "Raw HTML"],
value="Text",
),
]
outputs = [
Output(display_name="Data", name="data", method="fetch_content"),
Output(display_name="Text", name="text", method="fetch_content_text"),
]
def ensure_url(self, string: str) -> str:
"""Ensures the given string is a URL by adding 'http://' if it doesn't start with 'http://' or 'https://'.
Raises an error if the string is not a valid URL.
Parameters:
string (str): The string to be checked and possibly modified.
Returns:
str: The modified string that is ensured to be a URL.
Raises:
ValueError: If the string is not a valid URL.
"""
if not string.startswith(("http://", "https://")):
string = "http://" + string
# Basic URL validation regex
url_regex = re.compile(
r"^(https?:\/\/)?" # optional protocol
r"(www\.)?" # optional www
r"([a-zA-Z0-9.-]+)" # domain
r"(\.[a-zA-Z]{2,})?" # top-level domain
r"(:\d+)?" # optional port
r"(\/[^\s]*)?$", # optional path
re.IGNORECASE,
)
if not url_regex.match(string):
msg = f"Invalid URL: {string}"
raise ValueError(msg)
return string
def fetch_content(self) -> list[Data]:
urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]
if self.format == "Raw HTML":
loader = AsyncHtmlLoader(web_path=urls, encoding="utf-8")
else:
loader = WebBaseLoader(web_paths=urls, encoding="utf-8")
docs = loader.load()
data = [Data(text=doc.page_content, **doc.metadata) for doc in docs]
self.status = data
return data
def fetch_content_text(self) -> Message:
data = self.fetch_content()
result_string = data_to_text("{text}", data)
self.status = result_string
return Message(text=result_string)
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 2
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 2
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 3:
src/backend/tests/src/backend/tests/base.py#L146
TestURLComponent.test_component_versions[1.0.19]
AssertionError: Failed to execute component TestURLComponent for version 1.0.19:
Module: data
File: URL
Error: HTTPSConnectionPool(host='example.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1007)')))
Component Code: import re
from langchain_community.document_loaders import AsyncHtmlLoader, WebBaseLoader
from langflow.custom import Component
from langflow.helpers.data import data_to_text
from langflow.io import DropdownInput, MessageTextInput, Output
from langflow.schema import Data
from langflow.schema.message import Message
class URLComponent(Component):
display_name = "URL"
description = "Fetch content from one or more URLs."
icon = "layout-template"
name = "URL"
inputs = [
MessageTextInput(
name="urls",
display_name="URLs",
info="Enter one or more URLs, by clicking the '+' button.",
is_list=True,
),
DropdownInput(
name="format",
display_name="Output format",
info="Output format. Use 'Text' to extract the text from the HTML or 'Raw HTML' for the raw HTML content.",
options=["Text", "Raw HTML"],
value="Text",
),
]
outputs = [
Output(display_name="Data", name="data", method="fetch_content"),
Output(display_name="Text", name="text", method="fetch_content_text"),
]
def ensure_url(self, string: str) -> str:
"""
Ensures the given string is a URL by adding 'http://' if it doesn't start with 'http://' or 'https://'.
Raises an error if the string is not a valid URL.
Parameters:
string (str): The string to be checked and possibly modified.
Returns:
str: The modified string that is ensured to be a URL.
Raises:
ValueError: If the string is not a valid URL.
"""
if not string.startswith(("http://", "https://")):
string = "http://" + string
# Basic URL validation regex
url_regex = re.compile(
r"^(https?:\/\/)?" # optional protocol
r"(www\.)?" # optional www
r"([a-zA-Z0-9.-]+)" # domain
r"(\.[a-zA-Z]{2,})?" # top-level domain
r"(:\d+)?" # optional port
r"(\/[^\s]*)?$", # optional path
re.IGNORECASE,
)
if not url_regex.match(string):
msg = f"Invalid URL: {string}"
raise ValueError(msg)
return string
def fetch_content(self) -> list[Data]:
urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]
if self.format == "Raw HTML":
loader = AsyncHtmlLoader(web_path=urls, encoding="utf-8")
else:
loader = WebBaseLoader(web_paths=urls, encoding="utf-8")
docs = loader.load()
data = [Data(text=doc.page_content, **doc.metadata) for doc in docs]
self.status = data
return data
def fetch_content_text(self) -> Message:
data = self.fetch_content()
result_string = data_to_text("{text}", data)
self.status = result_string
return Message(text=result_string)
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 3
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 3
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 3
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 3
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 5:
src/backend/tests/src/backend/tests/base.py#L146
TestURLComponent.test_component_versions[1.1.0]
AssertionError: Failed to execute component TestURLComponent for version 1.1.0:
Module: data
File: url
Error: HTTPSConnectionPool(host='example.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1007)')))
Component Code: import re
from langchain_community.document_loaders import AsyncHtmlLoader, WebBaseLoader
from langflow.custom import Component
from langflow.helpers.data import data_to_text
from langflow.io import DropdownInput, MessageTextInput, Output
from langflow.schema import Data
from langflow.schema.message import Message
class URLComponent(Component):
display_name = "URL"
description = "Fetch content from one or more URLs."
icon = "layout-template"
name = "URL"
inputs = [
MessageTextInput(
name="urls",
display_name="URLs",
info="Enter one or more URLs, by clicking the '+' button.",
is_list=True,
tool_mode=True,
),
DropdownInput(
name="format",
display_name="Output format",
info="Output format. Use 'Text' to extract the text from the HTML or 'Raw HTML' for the raw HTML content.",
options=["Text", "Raw HTML"],
value="Text",
),
]
outputs = [
Output(display_name="Data", name="data", method="fetch_content"),
Output(display_name="Text", name="text", method="fetch_content_text"),
]
def ensure_url(self, string: str) -> str:
"""Ensures the given string is a URL by adding 'http://' if it doesn't start with 'http://' or 'https://'.
Raises an error if the string is not a valid URL.
Parameters:
string (str): The string to be checked and possibly modified.
Returns:
str: The modified string that is ensured to be a URL.
Raises:
ValueError: If the string is not a valid URL.
"""
if not string.startswith(("http://", "https://")):
string = "http://" + string
# Basic URL validation regex
url_regex = re.compile(
r"^(https?:\/\/)?" # optional protocol
r"(www\.)?" # optional www
r"([a-zA-Z0-9.-]+)" # domain
r"(\.[a-zA-Z]{2,})?" # top-level domain
r"(:\d+)?" # optional port
r"(\/[^\s]*)?$", # optional path
re.IGNORECASE,
)
if not url_regex.match(string):
msg = f"Invalid URL: {string}"
raise ValueError(msg)
return string
def fetch_content(self) -> list[Data]:
urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]
if self.format == "Raw HTML":
loader = AsyncHtmlLoader(web_path=urls, encoding="utf-8")
else:
loader = WebBaseLoader(web_paths=urls, encoding="utf-8")
docs = loader.load()
data = [Data(text=doc.page_content, **doc.metadata) for doc in docs]
self.status = data
return data
def fetch_content_text(self) -> Message:
data = self.fetch_content()
result_string = data_to_text("{text}", data)
self.status = result_string
return Message(text=result_string)
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 5
Event loop is closed
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 5
Event loop is closed
|
Lint Backend / Run Mypy (3.10)
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Lint Backend / Run Mypy (3.11)
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Backend Tests / Test CLI - Python 3.10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Lint Backend / Run Mypy (3.12)
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Backend Tests / Integration Tests - Python 3.10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 1
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 4
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 5/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 5/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 2
Attempt 1 failed. Reason: Child_process exited with error code 2
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 2
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 10/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 10/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 1/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 1/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 6/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 6/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 4/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 4/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 3
Attempt 1 failed. Reason: Child_process exited with error code 2
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 3
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 5
Attempt 1 failed. Reason: Child_process exited with error code 2
|
Run Backend Tests / Unit Tests - Python 3.10 - Group 5
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 3/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 3/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 2/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 2/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 9/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 9/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 7/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 7/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Run Frontend Tests / Playwright Tests - Shard 8/10
Cache not found for keys: playwright-1.44.1
|
Run Frontend Tests / Playwright Tests - Shard 8/10
Cache not found for keys: uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux-0c050ca8e9fce7944458e7e09c5c0efc0535997ab86856cc100595ba496c367f, uv-Linux
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
blob-report-1
|
85 MB |
|
blob-report-10
|
80.9 MB |
|
blob-report-2
|
120 MB |
|
blob-report-3
|
36.9 MB |
|
blob-report-4
|
55.4 MB |
|
blob-report-5
|
50.2 MB |
|
blob-report-6
|
21.8 MB |
|
blob-report-7
|
66.6 MB |
|
blob-report-8
|
58.6 MB |
|
blob-report-9
|
48.5 MB |
|