From 4431ff9a8d8d13921faac22083be6c6c89225f85 Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Tue, 3 Dec 2024 11:04:07 +0000 Subject: [PATCH] fix yql builder as CLI (#151) * fix yql builder as CLI * bump version --- src/cpr_sdk/version.py | 2 +- src/cpr_sdk/yql_builder.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cpr_sdk/version.py b/src/cpr_sdk/version.py index dfb0f98c..8d9dc395 100644 --- a/src/cpr_sdk/version.py +++ b/src/cpr_sdk/version.py @@ -1,6 +1,6 @@ _MAJOR = "1" _MINOR = "9" -_PATCH = "5" +_PATCH = "6" _SUFFIX = "" VERSION_SHORT = "{0}.{1}".format(_MAJOR, _MINOR) diff --git a/src/cpr_sdk/yql_builder.py b/src/cpr_sdk/yql_builder.py index d801f54a..340be827 100644 --- a/src/cpr_sdk/yql_builder.py +++ b/src/cpr_sdk/yql_builder.py @@ -1,6 +1,7 @@ from string import Template from typing import Optional +from rich import print as rprint from cpr_sdk.models.search import Filters, SearchParameters @@ -231,7 +232,9 @@ def to_str(self) -> str: exact_match=False, limit=10, max_hits_per_family=10, - filters=Filters(**{"document_languages": "value", "family_source": "value"}), + filters=Filters( + **{"document_languages": ["value"], "family_source": ["value"]} + ), year_range=(2000, 2020), continuation_tokens=None, ) @@ -240,3 +243,5 @@ def to_str(self) -> str: params=params, sensitive=False, ).to_str() + + rprint(yql_new)