From 0d982236a73b78ddcdc43282eea0627d292ed335 Mon Sep 17 00:00:00 2001 From: Vladimir Rudnyh Date: Sat, 23 Nov 2024 23:04:10 +0700 Subject: [PATCH] Attempt to fix flaky 'read_meta' test --- src/datachain/lib/meta_formats.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/datachain/lib/meta_formats.py b/src/datachain/lib/meta_formats.py index 70473557..3f9f2ec1 100644 --- a/src/datachain/lib/meta_formats.py +++ b/src/datachain/lib/meta_formats.py @@ -42,7 +42,7 @@ def process_json(data_string, jmespath): # Print a dynamic datamodel-codegen output from JSON or CSV on stdout def read_schema(source_file, data_type="csv", expr=None, model_name=None): data_string = "" - # using uiid to get around issue #1617 + # using uuid to get around issue #1617 if not model_name: # comply with Python class names uid_str = str(generate_uuid()).replace("-", "") @@ -85,7 +85,8 @@ def read_schema(source_file, data_type="csv", expr=None, model_name=None): DataModel.register({model_name}) spec = {model_name} """ - return output.read_text() + epilogue + schema = output.read_text() + epilogue + return schema #