mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-03 04:46:27 +00:00
Fixes: MF4 Import Error (#23659)
* fix: asammdf and avro import error * fix: mf4 import only * test: fix mf4 test
This commit is contained in:
parent
27380884eb
commit
48ff77c917
@ -16,7 +16,6 @@ MF4 DataFrame reader for processing MF4 (Measurement Data Format) files
|
||||
import io
|
||||
|
||||
import pandas as pd
|
||||
from asammdf import MDF
|
||||
|
||||
from metadata.readers.dataframe.base import DataFrameReader
|
||||
from metadata.readers.dataframe.common import dataframe_to_chunks
|
||||
@ -38,6 +37,7 @@ class MF4DataFrameReader(DataFrameReader):
|
||||
Extract schema from MF4 header common properties.
|
||||
This method uses the MDF header metadata instead of actual data extraction.
|
||||
"""
|
||||
from asammdf import MDF
|
||||
|
||||
file_obj = io.BytesIO(mf4_bytes)
|
||||
|
||||
|
@ -58,7 +58,7 @@ class TestMF4DataFrameReader(TestCase):
|
||||
}
|
||||
|
||||
# Create mock MDF object with header
|
||||
with patch("metadata.readers.dataframe.mf4.MDF") as mock_mdf_class:
|
||||
with patch("asammdf.MDF") as mock_mdf_class:
|
||||
mock_mdf = MagicMock()
|
||||
mock_header = MagicMock()
|
||||
mock_header._common_properties = expected_common_props
|
||||
@ -78,7 +78,7 @@ class TestMF4DataFrameReader(TestCase):
|
||||
"""
|
||||
mock_mf4_bytes = b"mock_mf4_content"
|
||||
|
||||
with patch("metadata.readers.dataframe.mf4.MDF") as mock_mdf_class:
|
||||
with patch("asammdf.MDF") as mock_mdf_class:
|
||||
mock_mdf = MagicMock()
|
||||
mock_header = MagicMock()
|
||||
# No _common_properties attribute
|
||||
|
Loading…
x
Reference in New Issue
Block a user