From 2e4cdf5f95779d5363c44aed038650b5f09c6600 Mon Sep 17 00:00:00 2001 From: KyungEon Choi Date: Sat, 23 Apr 2022 19:52:11 +0900 Subject: [PATCH] Update for frontend library --- README.md | 2 +- servicex_databinder/__init__.py | 2 +- servicex_databinder/frontend.py | 11 +++++++---- setup.py | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c491de8..6b43447 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ServiceX DataBinder -

Release v0.2.6

+

Release v0.2.7

[![PyPI version](https://badge.fury.io/py/servicex-databinder.svg)](https://badge.fury.io/py/servicex-databinder) diff --git a/servicex_databinder/__init__.py b/servicex_databinder/__init__.py index 8c2e6ae..94496ff 100644 --- a/servicex_databinder/__init__.py +++ b/servicex_databinder/__init__.py @@ -2,7 +2,7 @@ from .servicex_databinder import DataBinder -__version__ = '0.2.6' +__version__ = '0.2.7' logging.basicConfig(format="%(levelname)s - %(message)s") logging.getLogger(__name__).setLevel(logging.INFO) \ No newline at end of file diff --git a/servicex_databinder/frontend.py b/servicex_databinder/frontend.py index 34cc7df..a78d91d 100644 --- a/servicex_databinder/frontend.py +++ b/servicex_databinder/frontend.py @@ -43,10 +43,11 @@ def get_servicex_data(self, test_run=False): nest_asyncio.apply() - async def bound_get_data(sem, sx_ds, query): + # async def bound_get_data(sem, sx_ds, query): + async def bound_get_data(sem, sx_ds, query, sample): async with sem: - return await sx_ds.get_data_parquet_async(query) - # return await sx_ds.get_data_parquet_async(query, 'test') # When fix in ServiceX Frontend + # return await sx_ds.get_data_parquet_async(query) + return await sx_ds.get_data_parquet_async(query, sample) # When fix in ServiceX Frontend async def _get_my_data(): sem = asyncio.Semaphore(50) # Limit maximum concurrent ServiceX requests @@ -60,8 +61,10 @@ async def _get_my_data(): session_generator=session, \ ignore_cache=ignoreCache) query = request['query'] + sample = request['Sample'] - task = asyncio.ensure_future(bound_get_data(sem, sx_ds, query)) + # task = asyncio.ensure_future(bound_get_data(sem, sx_ds, query)) + task = asyncio.ensure_future(bound_get_data(sem, sx_ds, query, sample)) tasks.append(task) return await asyncio.gather(*tasks) diff --git a/setup.py b/setup.py index 8ec0954..2ce1526 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def get_version(rel_path): license="BSD 3-clause", python_requires='>=3.6', install_requires=[ - "servicex>=2.4,<2.5", + "servicex>=2.5", "tcut-to-qastle>=0.6", "nest-asyncio>=1.5.1", "tqdm>=4.60.0",