Skip to content

Commit 9ca891d

Browse files
[textanalytics] python sdk 2025-05-15-preview (#42928)
* Configurations: 'specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml', API Version: 2025-05-15-preview, SDK Release Type: beta, and CommitSHA: '261adc4ae25d7e639c4e13a1d63f0301e137c79d' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5314004 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * adjust the version to 6.0.0b1 * allow CI to temporarily ignore an entire path when necessary * removed generated tests and samples * check in all the tests from old branch * udpated with new commit id * checked in all samples from old branch * change all azure.ai.language.text to azure.ai.textanalytics in tests * changed all azure.ai.language.text to azure.ai.textanalytics in all samples * added AnalyzeTextLROPoller and custom begin_analyze_text_job in _patch.py * added AnalyzeTextAsyncLROPoller and custom begin_analyze_text_job in aio/_patch.py * updated cspell.json * udpated assets.json * updated changelog * removed _parse_operation_id from aio/_patch and import it from _patch.py * added general readme * updated link in readme * make original begin_analyze_text_job private * udpated snippets * added disclaimer in old package readme * fixed pylint * updated release date --------- Co-authored-by: azure-sdk <[email protected]>
1 parent 51b4bb5 commit 9ca891d

File tree

95 files changed

+22590
-1
lines changed

Some content is hidden

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

95 files changed

+22590
-1
lines changed

.vscode/cspell.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,74 @@
817817
"filename": "sdk/core/azure-core-tracing-opentelemetry/**",
818818
"words": [ "ctxt", "somethingstuid" ]
819819
},
820+
{
821+
"filename": "sdk/cognitivelanguage/azure-ai-textanalytics/**",
822+
"words": [
823+
"fhir",
824+
"BRCPF",
825+
"IDRG",
826+
"EUGPS",
827+
"PLREGON",
828+
"REGON",
829+
"ESDNI",
830+
"USUK",
831+
"ARMN",
832+
"Bangla",
833+
"ETHI",
834+
"Ethi",
835+
"GEOR",
836+
"Geor",
837+
"GREK",
838+
"Grek",
839+
"GUJR",
840+
"Gujr",
841+
"HANI",
842+
"Hani",
843+
"HEBR",
844+
"Hebr",
845+
"JPAN",
846+
"Jpan",
847+
"KHMR",
848+
"Khmr",
849+
"KNDA",
850+
"Knda",
851+
"LAOO",
852+
"Laoo",
853+
"MLYM",
854+
"Mlym",
855+
"MTEI",
856+
"Mtei",
857+
"Meitei",
858+
"MYMR",
859+
"Mymr",
860+
"OLCK",
861+
"Olck",
862+
"ORYA",
863+
"Orya",
864+
"SHRD",
865+
"Shrd",
866+
"Sharada",
867+
"TAML",
868+
"Taml",
869+
"TELU",
870+
"Telu",
871+
"THAA",
872+
"Thaa",
873+
"Thaana",
874+
"TIBT",
875+
"Tibt",
876+
"UMLS",
877+
"Effile",
878+
"gont",
879+
"mundo",
880+
"naam",
881+
"DBAUTH",
882+
"Kelvey",
883+
"CMLC",
884+
"Absractive"
885+
],
886+
"caseSensitive": false
887+
},
820888
{
821889
"filename": "sdk/cognitivelanguage/azure-ai-language-conversations/**",
822890
"words": [ "conv", "summ", "Enviar", "presentación", "CLU's"],

eng/scripts/get_package_properties.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import Dict, List
66

77
from ci_tools.parsing import ParsedSetup
8+
from ci_tools.functions import PATHS_EXCLUDED_FROM_DISCOVERY
89

910
additional_pr_triggers: Dict[str, List[str]] = {
1011
"azure-core":[
@@ -51,6 +52,13 @@
5152
try:
5253
parsed = ParsedSetup.from_path(root)
5354

55+
# Remove any packages excluded from discovery
56+
# Skip packages whose folder path matches any entry in PATHS_EXCLUDED_FROM_DISCOVERY.
57+
# PATHS_EXCLUDED_FROM_DISCOVERY contains subpaths (eg. "sdk/foo/bar") relative to repo root.
58+
parsed_folder_norm = parsed.folder.replace("\\", "/")
59+
if any(excluded_path in parsed_folder_norm for excluded_path in PATHS_EXCLUDED_FROM_DISCOVERY):
60+
continue
61+
5462
dependent_packages = ""
5563
if parsed.name in additional_pr_triggers:
5664
dependent_packages = ",".join(additional_pr_triggers[parsed.name])

eng/tools/azure-sdk-tools/ci_tools/functions.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@
4343
"azure-mgmt-core",
4444
]
4545

46+
# In very rare situations, we need to actively transition a package from one part of the code base to another
47+
# in a multi-stage process. For example, migrating "azure-ai-textanalytics" from "sdk/textanalytics" to "sdk/ai".
48+
# Both need to simultaneously exist for a short period of time, but we need to prevent discovery of the package
49+
# so that downstream checks aren't broken by this.
50+
# We need to actively prevent ourselves from discovering the package in its old location. To do that we:
51+
# - Add the path to this list, any entrypoints that use discover_targeted_packages should exclude these paths
52+
# - This will also affect usage of get_package_properties.py (Save-Package-Properties stage of CI), so please be aware of this!
53+
PATHS_EXCLUDED_FROM_DISCOVERY = [
54+
"sdk/textanalytics/azure-ai-textanalytics",
55+
]
56+
4657
TEST_COMPATIBILITY_MAP = {"azure-ai-ml": ">=3.7", "azure-ai-evaluation": ">=3.9, !=3.13.*"}
4758
TEST_PYTHON_DISTRO_INCOMPATIBILITY_MAP = {
4859
"azure-storage-blob": "pypy",
@@ -183,6 +194,15 @@ def glob_packages(glob_string: str, target_root_dir: str) -> List[str]:
183194
p for p in collected_top_level_directories if not any(part in ("test", "tests") for part in p.split(os.sep))
184195
]
185196

197+
# remove any packages that might exist in the PATHS_EXCLUDED_FROM_DISCOVERY path list (relative from repo root)
198+
excluded = set(PATHS_EXCLUDED_FROM_DISCOVERY)
199+
filtered = []
200+
for pkg_path in collected_top_level_directories:
201+
rel = os.path.relpath(pkg_path, target_root_dir).replace(os.sep, '/')
202+
if not any(rel == excl or rel.startswith(excl + '/') for excl in excluded):
203+
filtered.append(pkg_path)
204+
collected_top_level_directories = filtered
205+
186206
# deduplicate, in case we have double coverage from the glob strings. Example: "azure-mgmt-keyvault,azure-mgmt-*"
187207
return list(set(collected_top_level_directories))
188208

sdk/cognitivelanguage/azure-ai-textanalytics/CHANGELOG.md

Lines changed: 526 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) Microsoft Corporation.
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include *.md
2+
include LICENSE
3+
include azure/ai/textanalytics/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/ai/__init__.py

0 commit comments

Comments
 (0)