Skip to content

Commit c59eb64

Browse files
[textanalytics] regen on 2022-04-01-preview + rerecord (Azure#24280)
* regen on april preview version * updates to handwritten layer for api version change * rerecord * fix * add fhir to cspell * skip samples due to service bug * fixes and recordings for healthcare cancel with april api version * fix tests * actually fix tests * oops
1 parent 1a952a6 commit c59eb64

File tree

648 files changed

+315599
-8208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

648 files changed

+315599
-8208
lines changed

.vscode/cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@
366366
"italiano",
367367
"skrivet",
368368
"verfasst",
369-
"engelska"
369+
"engelska",
370+
"fhir",
371+
"FHIR"
370372
]
371373
},
372374
{

scripts/devops_tasks/test_run_samples.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@
137137
],
138138
"azure-ai-language-questionanswering": ["sample_chat.py"],
139139
"azure-ai-textanalytics": [
140-
"sample_authentication.py",
141-
"sample_authentication_async.py",
142140
"sample_analyze_healthcare_entities_with_cancellation.py",
143141
"sample_analyze_healthcare_entities_with_cancellation_async.py",
142+
"sample_single_category_classify.py",
143+
"sample_multi_category_classify.py",
144+
"sample_recognize_custom_entities.py",
145+
"sample_multi_category_classify_async.py",
146+
"sample_recognize_custom_entities_async.py",
147+
"sample_single_category_classify_async.py",
144148
]
145149
}
146150

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TextAnalyticsApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta):
2020
"""Text Analytics API versions supported by this package"""
2121

2222
#: this is the default version
23-
V2022_03_01_PREVIEW = "2022-03-01-preview"
23+
V2022_04_01_PREVIEW = "2022-04-01-preview"
2424
V3_1 = "v3.1"
2525
V3_0 = "v3.0"
2626

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,18 @@ def analyze_text(
7979
executed immediately.
8080
8181
:param body: Collection of documents to analyze and a single task to execute.
82-
:type body: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextTask
82+
:type body: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextTask
8383
:param show_stats: (Optional) if set to true, response will contain request and document level
8484
statistics.
8585
:type show_stats: bool
8686
:keyword callable cls: A custom type or function that will be passed the direct response
8787
:return: AnalyzeTextTaskResult, or the result of cls(response)
88-
:rtype: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextTaskResult
88+
:rtype: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextTaskResult
8989
:raises: ~azure.core.exceptions.HttpResponseError
9090
"""
9191
api_version = self._get_api_version('analyze_text')
92-
if api_version == '2022-03-01-preview':
93-
from .v2022_03_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
92+
if api_version == '2022-04-01-preview':
93+
from .v2022_04_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
9494
else:
9595
raise ValueError("API version {} does not have operation 'analyze_text'".format(api_version))
9696
mixin_instance = OperationClass()
@@ -127,12 +127,12 @@ def analyze_text_job_status(
127127
:type skip: int
128128
:keyword callable cls: A custom type or function that will be passed the direct response
129129
:return: AnalyzeTextJobState, or the result of cls(response)
130-
:rtype: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextJobState
130+
:rtype: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextJobState
131131
:raises: ~azure.core.exceptions.HttpResponseError
132132
"""
133133
api_version = self._get_api_version('analyze_text_job_status')
134-
if api_version == '2022-03-01-preview':
135-
from .v2022_03_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
134+
if api_version == '2022-04-01-preview':
135+
from .v2022_04_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
136136
else:
137137
raise ValueError("API version {} does not have operation 'analyze_text_job_status'".format(api_version))
138138
mixin_instance = OperationClass()
@@ -207,8 +207,8 @@ def begin_analyze_text_cancel_job( # pylint: disable=inconsistent-return-statem
207207
:raises: ~azure.core.exceptions.HttpResponseError
208208
"""
209209
api_version = self._get_api_version('begin_analyze_text_cancel_job')
210-
if api_version == '2022-03-01-preview':
211-
from .v2022_03_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
210+
if api_version == '2022-04-01-preview':
211+
from .v2022_04_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
212212
else:
213213
raise ValueError("API version {} does not have operation 'begin_analyze_text_cancel_job'".format(api_version))
214214
mixin_instance = OperationClass()
@@ -231,7 +231,7 @@ def begin_analyze_text_submit_job(
231231
executed as a long-running operation.
232232
233233
:param body: Collection of documents to analyze and one or more tasks to execute.
234-
:type body: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextJobsInput
234+
:type body: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextJobsInput
235235
:keyword callable cls: A custom type or function that will be passed the direct response
236236
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
237237
:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. Pass
@@ -243,12 +243,12 @@ def begin_analyze_text_submit_job(
243243
:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeTextJobState or the
244244
result of cls(response)
245245
:rtype:
246-
~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextJobState]
246+
~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextJobState]
247247
:raises: ~azure.core.exceptions.HttpResponseError
248248
"""
249249
api_version = self._get_api_version('begin_analyze_text_submit_job')
250-
if api_version == '2022-03-01-preview':
251-
from .v2022_03_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
250+
if api_version == '2022-04-01-preview':
251+
from .v2022_04_01_preview.operations import TextAnalyticsClientOperationsMixin as OperationClass
252252
else:
253253
raise ValueError("API version {} does not have operation 'begin_analyze_text_submit_job'".format(api_version))
254254
mixin_instance = OperationClass()

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi
6060
LATEST_PROFILE = ProfileDefinition({
6161
_PROFILE_TAG: {
6262
None: DEFAULT_API_VERSION,
63-
'analyze_text': '2022-03-01-preview',
64-
'analyze_text_job_status': '2022-03-01-preview',
65-
'begin_analyze_text_cancel_job': '2022-03-01-preview',
66-
'begin_analyze_text_submit_job': '2022-03-01-preview',
63+
'analyze_text': '2022-04-01-preview',
64+
'analyze_text_job_status': '2022-04-01-preview',
65+
'begin_analyze_text_cancel_job': '2022-04-01-preview',
66+
'begin_analyze_text_submit_job': '2022-04-01-preview',
6767
}},
6868
_PROFILE_TAG + " latest"
6969
)
@@ -76,7 +76,7 @@ def __init__(
7676
profile=KnownProfiles.default, # type: KnownProfiles
7777
**kwargs # type: Any
7878
):
79-
if api_version == '2022-03-01-preview':
79+
if api_version == '2022-04-01-preview':
8080
base_url = '{Endpoint}/language'
8181
elif api_version == 'v3.0':
8282
base_url = '{Endpoint}/text/analytics/v3.0'
@@ -99,12 +99,12 @@ def _models_dict(cls, api_version):
9999
def models(cls, api_version=DEFAULT_API_VERSION):
100100
"""Module depends on the API version:
101101
102-
* 2022-03-01-preview: :mod:`v2022_03_01_preview.models<azure.ai.textanalytics.v2022_03_01_preview.models>`
102+
* 2022-04-01-preview: :mod:`v2022_04_01_preview.models<azure.ai.textanalytics.v2022_04_01_preview.models>`
103103
* v3.0: :mod:`v3_0.models<azure.ai.textanalytics.v3_0.models>`
104104
* v3.1: :mod:`v3_1.models<azure.ai.textanalytics.v3_1.models>`
105105
"""
106-
if api_version == '2022-03-01-preview':
107-
from .v2022_03_01_preview import models
106+
if api_version == '2022-04-01-preview':
107+
from .v2022_04_01_preview import models
108108
return models
109109
elif api_version == 'v3.0':
110110
from .v3_0 import models

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ async def analyze_text(
7373
executed immediately.
7474
7575
:param body: Collection of documents to analyze and a single task to execute.
76-
:type body: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextTask
76+
:type body: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextTask
7777
:param show_stats: (Optional) if set to true, response will contain request and document level
7878
statistics.
7979
:type show_stats: bool
8080
:keyword callable cls: A custom type or function that will be passed the direct response
8181
:return: AnalyzeTextTaskResult, or the result of cls(response)
82-
:rtype: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextTaskResult
82+
:rtype: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextTaskResult
8383
:raises: ~azure.core.exceptions.HttpResponseError
8484
"""
8585
api_version = self._get_api_version('analyze_text')
86-
if api_version == '2022-03-01-preview':
87-
from ..v2022_03_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
86+
if api_version == '2022-04-01-preview':
87+
from ..v2022_04_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
8888
else:
8989
raise ValueError("API version {} does not have operation 'analyze_text'".format(api_version))
9090
mixin_instance = OperationClass()
@@ -120,12 +120,12 @@ async def analyze_text_job_status(
120120
:type skip: int
121121
:keyword callable cls: A custom type or function that will be passed the direct response
122122
:return: AnalyzeTextJobState, or the result of cls(response)
123-
:rtype: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextJobState
123+
:rtype: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextJobState
124124
:raises: ~azure.core.exceptions.HttpResponseError
125125
"""
126126
api_version = self._get_api_version('analyze_text_job_status')
127-
if api_version == '2022-03-01-preview':
128-
from ..v2022_03_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
127+
if api_version == '2022-04-01-preview':
128+
from ..v2022_04_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
129129
else:
130130
raise ValueError("API version {} does not have operation 'analyze_text_job_status'".format(api_version))
131131
mixin_instance = OperationClass()
@@ -199,8 +199,8 @@ async def begin_analyze_text_cancel_job( # pylint: disable=inconsistent-return-
199199
:raises: ~azure.core.exceptions.HttpResponseError
200200
"""
201201
api_version = self._get_api_version('begin_analyze_text_cancel_job')
202-
if api_version == '2022-03-01-preview':
203-
from ..v2022_03_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
202+
if api_version == '2022-04-01-preview':
203+
from ..v2022_04_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
204204
else:
205205
raise ValueError("API version {} does not have operation 'begin_analyze_text_cancel_job'".format(api_version))
206206
mixin_instance = OperationClass()
@@ -222,7 +222,7 @@ async def begin_analyze_text_submit_job(
222222
executed as a long-running operation.
223223
224224
:param body: Collection of documents to analyze and one or more tasks to execute.
225-
:type body: ~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextJobsInput
225+
:type body: ~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextJobsInput
226226
:keyword callable cls: A custom type or function that will be passed the direct response
227227
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
228228
:keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod.
@@ -234,12 +234,12 @@ async def begin_analyze_text_submit_job(
234234
:return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeTextJobState or
235235
the result of cls(response)
236236
:rtype:
237-
~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v2022_03_01_preview.models.AnalyzeTextJobState]
237+
~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v2022_04_01_preview.models.AnalyzeTextJobState]
238238
:raises: ~azure.core.exceptions.HttpResponseError
239239
"""
240240
api_version = self._get_api_version('begin_analyze_text_submit_job')
241-
if api_version == '2022-03-01-preview':
242-
from ..v2022_03_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
241+
if api_version == '2022-04-01-preview':
242+
from ..v2022_04_01_preview.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass
243243
else:
244244
raise ValueError("API version {} does not have operation 'begin_analyze_text_submit_job'".format(api_version))
245245
mixin_instance = OperationClass()

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi
5959
LATEST_PROFILE = ProfileDefinition({
6060
_PROFILE_TAG: {
6161
None: DEFAULT_API_VERSION,
62-
'analyze_text': '2022-03-01-preview',
63-
'analyze_text_job_status': '2022-03-01-preview',
64-
'begin_analyze_text_cancel_job': '2022-03-01-preview',
65-
'begin_analyze_text_submit_job': '2022-03-01-preview',
62+
'analyze_text': '2022-04-01-preview',
63+
'analyze_text_job_status': '2022-04-01-preview',
64+
'begin_analyze_text_cancel_job': '2022-04-01-preview',
65+
'begin_analyze_text_submit_job': '2022-04-01-preview',
6666
}},
6767
_PROFILE_TAG + " latest"
6868
)
@@ -75,7 +75,7 @@ def __init__(
7575
profile: KnownProfiles = KnownProfiles.default,
7676
**kwargs # type: Any
7777
) -> None:
78-
if api_version == '2022-03-01-preview':
78+
if api_version == '2022-04-01-preview':
7979
base_url = '{Endpoint}/language'
8080
elif api_version == 'v3.0':
8181
base_url = '{Endpoint}/text/analytics/v3.0'
@@ -98,12 +98,12 @@ def _models_dict(cls, api_version):
9898
def models(cls, api_version=DEFAULT_API_VERSION):
9999
"""Module depends on the API version:
100100
101-
* 2022-03-01-preview: :mod:`v2022_03_01_preview.models<azure.ai.textanalytics.v2022_03_01_preview.models>`
101+
* 2022-04-01-preview: :mod:`v2022_04_01_preview.models<azure.ai.textanalytics.v2022_04_01_preview.models>`
102102
* v3.0: :mod:`v3_0.models<azure.ai.textanalytics.v3_0.models>`
103103
* v3.1: :mod:`v3_1.models<azure.ai.textanalytics.v3_1.models>`
104104
"""
105-
if api_version == '2022-03-01-preview':
106-
from ..v2022_03_01_preview import models
105+
if api_version == '2022-04-01-preview':
106+
from ..v2022_04_01_preview import models
107107
return models
108108
elif api_version == 'v3.0':
109109
from ..v3_0 import models

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# Licensed under the MIT License. See License.txt in the project root for
55
# license information.
66
# --------------------------------------------------------------------------
7-
from .v2022_03_01_preview.models import *
7+
from .v2022_04_01_preview.models import *
88
from .v3_1.models import *
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma
2828
:param endpoint: Supported Cognitive Services endpoint (e.g.,
2929
https://:code:`<resource-name>`.api.cognitiveservices.azure.com).
3030
:type endpoint: str
31-
:keyword api_version: Api Version. The default value is "2022-03-01-preview". Note that
31+
:keyword api_version: Api Version. The default value is "2022-04-01-preview". Note that
3232
overriding this default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
@@ -40,7 +40,7 @@ def __init__(
4040
**kwargs: Any
4141
) -> None:
4242
super(TextAnalyticsClientConfiguration, self).__init__(**kwargs)
43-
api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str
43+
api_version = kwargs.pop('api_version', "2022-04-01-preview") # type: str
4444

4545
if credential is None:
4646
raise ValueError("Parameter 'credential' must not be None.")

0 commit comments

Comments
 (0)