From eb8487474a40c5c3c6af8420f291bead9babf9f4 Mon Sep 17 00:00:00 2001 From: Gordon Watts Date: Tue, 22 Dec 2020 01:28:44 -0500 Subject: [PATCH] Fix outstanding MinioBug Somehow a regression and lack of check - we Minio Factory wasn't created correctly. This has been in the code for a while. Also cleaned up some pylance errors (as if they had been clean, we might have seen this). --- servicex/servicex.py | 15 +++++++++------ tests/test_data_conversions.py | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/servicex/servicex.py b/servicex/servicex.py index 2dc453bd..aef60632 100644 --- a/servicex/servicex.py +++ b/servicex/servicex.py @@ -205,7 +205,7 @@ def __init__(self, self._servicex_adaptor = servicex_adaptor if not minio_adaptor: - self._minio_adaptor = MinioAdaptorFactory(config.settings) + self._minio_adaptor = MinioAdaptorFactory() else: if isinstance(minio_adaptor, MinioAdaptor): self._minio_adaptor = MinioAdaptorFactory(always_return=minio_adaptor) @@ -249,7 +249,8 @@ async def get_data_rootfiles_stream(self, selection_query: str) \ a `StreamInfoPath` which can be used to access the file locally. ''' - async for f_info in self._stream_local_files(selection_query, 'root-files'): + async for f_info in \ + self._stream_local_files(selection_query, 'root-files'): # type: ignore yield f_info @functools.wraps(ServiceXABC.get_data_parquet_async, updated=()) @@ -272,7 +273,7 @@ async def get_data_parquet_stream(self, selection_query: str) \ a `StreamInfoPath` which can be used to access the file locally. ''' - async for f_info in self._stream_local_files(selection_query, 'parquet'): + async for f_info in self._stream_local_files(selection_query, 'parquet'): # type: ignore yield f_info @functools.wraps(ServiceXABC.get_data_pandas_df_async, updated=()) @@ -332,7 +333,8 @@ async def get_data_rootfiles_url_stream(self, selection_query: str) \ Args: selection_query (str): The ServiceX Selection ''' - async for f_info in self._stream_url_buckets(selection_query, 'root-files'): + async for f_info in \ + self._stream_url_buckets(selection_query, 'root-files'): # type: ignore yield f_info async def get_data_parquet_url_stream(self, selection_query: str) \ @@ -343,7 +345,7 @@ async def get_data_parquet_url_stream(self, selection_query: str) \ Args: selection_query (str): The ServiceX Selection ''' - async for f_info in self._stream_url_buckets(selection_query, 'parquet'): + async for f_info in self._stream_url_buckets(selection_query, 'parquet'): # type: ignore yield f_info async def _file_return(self, selection_query: str, data_format: str): @@ -483,7 +485,8 @@ async def _stream_return(self, selection_query: str, on the converter call. ''' as_data = (StreamInfoData(f.file, await asyncio.ensure_future(converter(f.path))) - async for f in self._stream_local_files(selection_query, data_format)) + async for f in + self._stream_local_files(selection_query, data_format)) # type: ignore async for r in as_data: yield r diff --git a/tests/test_data_conversions.py b/tests/test_data_conversions.py index 264fe186..0c193356 100644 --- a/tests/test_data_conversions.py +++ b/tests/test_data_conversions.py @@ -7,7 +7,7 @@ def check_awkward_accessible(col: ak.Array): 'Check to make sure we can look at every item in column' - ak.repartition(col, 3) + ak.repartition(col, 3) # type: ignore def check_pandas_accessible(col):