update version number and API_version support#12154
Conversation
|
/azp run python - search - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/search/azure-search-documents/azure/search/documents/_internal/_search_client.py
Outdated
Show resolved
Hide resolved
heaths
left a comment
There was a problem hiding this comment.
Approving to keep you unblocked from making fixes and submitting, but please see comments. I also see now this was to change the package version and not the API version, but please note that is also necessary.
| # ------------------------------------ | ||
|
|
||
| _SUPPORTED_API_VERSIONS = [ | ||
| "2019-05-06-Preview", |
There was a problem hiding this comment.
If I understand the PR correctly, it's to make sure this is "2020-06-03" everywhere.
There was a problem hiding this comment.
We will have a separate PR to update the API version number (that will include updating auto-generated code)
sdk/search/azure-search-documents/azure/search/documents/_internal/_search_client.py
Outdated
Show resolved
Hide resolved
|
|
||
| :param str search_text: A full-text search query expression; Use "*" or omit this parameter to | ||
| match all documents. | ||
| :keyword include_total_result_count: A value that specifies whether to fetch the total count of |
There was a problem hiding this comment.
@tg-msft, shouldn't this be include_total_count? Or was that one of the things we were asked to change? I don't see it changed in .NET yet.
There was a problem hiding this comment.
include_total_result_count is from the swagger. Do we want to change it?
| :param str search_text: The search text on which to base autocomplete results. | ||
| :param str suggester_name: The name of the suggester as specified in the suggesters | ||
| collection that's part of the index definition. | ||
| :keyword autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use |
There was a problem hiding this comment.
I am ok to use mode, just want to confirm because autocomplete_mode is from swagger.
| def __init__(self, endpoint, index_name, credential, **kwargs): | ||
| # type: (str, str, AzureKeyCredential, **Any) -> None | ||
|
|
||
| get_api_version(kwargs, "2019-05-06-Preview") |
There was a problem hiding this comment.
So I guess here it's used has a "check", then I would split a "check" and a "get" into two different methods, with "get" calling check first. I find it easier to read intent
There was a problem hiding this comment.
It's optional feedback, I let you decide if that makes the code less efficient
sdk/search/azure-search-documents/azure/search/documents/_internal/_search_client.py
Outdated
Show resolved
Hide resolved
|
|
||
| api_version = kwargs.pop('api_version', None) | ||
| if api_version: | ||
| check_api_version(api_version) |
There was a problem hiding this comment.
I see a lot the pattern "if api_version: check", does it mean check should not raise if api_version is None? And then simplify all those occurences?
lmazuel
left a comment
There was a problem hiding this comment.
Approving the Python side of things, no feedback on Search semantic
|
|
||
|
|
||
| def get_api_version(kwargs, default): | ||
| # type: (Dict[str, Any]) -> str |
There was a problem hiding this comment.
is the type hint correct? there are 2 params above.
…into regenerate_certs * 'master' of https://github.com/Azure/azure-sdk-for-python: (27 commits) Set http_logging_policy in Configuration (Azure#12218) Sync eng/common directory with azure-sdk-tools repository (Azure#11990) AzureCliCredential instructs CLI not to color output (Azure#11362) Sdk automation/track2 azure mgmt storage (Azure#12238) Fix changelog of CustomVision (Azure#12225) Doc update for conf file name (Azure#12224) update doc for content_type (Azure#12220) update API version to use 2020-06-30 (Azure#12208) Use MSAL's custom transport API (Azure#11892) add breadcumbs for training filter (Azure#12196) [formrecognizer] arch board feedback renames (Azure#12207) Dataplane autogeneration (Azure#12210) update version number and API_version support (Azure#12154) Update SECURITY.md (Azure#12209) adding a pip freeze to ensure we fully understand what our environment has (Azure#12173) FaceAPI 0.4.1 (Azure#12199) [ServiceBus] Enable Async Unittest (Azure#12001) add search owver (Azure#12190) update training docstring (Azure#12168) don't use mgmt track2 (Azure#12183) ...
…into regenerate_keys * 'master' of https://github.com/Azure/azure-sdk-for-python: Set http_logging_policy in Configuration (Azure#12218) Sync eng/common directory with azure-sdk-tools repository (Azure#11990) AzureCliCredential instructs CLI not to color output (Azure#11362) Sdk automation/track2 azure mgmt storage (Azure#12238) Fix changelog of CustomVision (Azure#12225) Doc update for conf file name (Azure#12224) update doc for content_type (Azure#12220) update API version to use 2020-06-30 (Azure#12208) Use MSAL's custom transport API (Azure#11892) add breadcumbs for training filter (Azure#12196) [formrecognizer] arch board feedback renames (Azure#12207) Dataplane autogeneration (Azure#12210) update version number and API_version support (Azure#12154) Update SECURITY.md (Azure#12209) adding a pip freeze to ensure we fully understand what our environment has (Azure#12173) FaceAPI 0.4.1 (Azure#12199) [ServiceBus] Enable Async Unittest (Azure#12001) add search owver (Azure#12190) update training docstring (Azure#12168)
…into regenerate_secrets * 'master' of https://github.com/Azure/azure-sdk-for-python: (36 commits) Install dev dependency when running apistub (Azure#12268) SharedTokenCacheCredential lazily loads the cache (Azure#12172) Changes in docs [Form Recognizer] (Azure#12216) [formrecognizer] adjust text angle to fit in specified interval (Azure#12248) Set http_logging_policy in Configuration (Azure#12218) Sync eng/common directory with azure-sdk-tools repository (Azure#11990) AzureCliCredential instructs CLI not to color output (Azure#11362) Sdk automation/track2 azure mgmt storage (Azure#12238) Fix changelog of CustomVision (Azure#12225) Doc update for conf file name (Azure#12224) update doc for content_type (Azure#12220) update API version to use 2020-06-30 (Azure#12208) Use MSAL's custom transport API (Azure#11892) add breadcumbs for training filter (Azure#12196) [formrecognizer] arch board feedback renames (Azure#12207) Dataplane autogeneration (Azure#12210) update version number and API_version support (Azure#12154) Update SECURITY.md (Azure#12209) adding a pip freeze to ensure we fully understand what our environment has (Azure#12173) FaceAPI 0.4.1 (Azure#12199) ...
No description provided.