Skip to content

Commit ef2850e

Browse files
author
Saksham Garg
committed
Update to latest Frontend API spec from develop branch
- Pulled latest spec from azure-cleanroom develop branch - Fixed ApplicationState empty enum value (AutoRest blocker) - Regenerated analytics_frontend_api SDK with updated method signatures - Applied Microsoft MIT License headers to all SDK files - Updated custom code for SDK method renames (5 functions) - Updated test mocks for new SDK methods (14 changes across 3 files) - Added comprehensive pylint suppressions for generated code SDK Method Changes (internal, transparent to CLI): - list → list_get - analytics_dataset_* → analytics_datasets_* (plural) - check_consent_document_id_get → consent_document_id_get - set_consent_document_id_put → consent_document_id_put Validation (all passed): - pytest: 37/37 tests passed - azdev style: PASSED - azdev linter: PASSED - test_index: PASSED - aaz folder: unchanged - wheel: built successfully (157K) Version: 1.0.0b3 (kept same as requested)
1 parent 22d5e5f commit ef2850e

File tree

21 files changed

+648
-1619
lines changed

21 files changed

+648
-1619
lines changed

src/managedcleanroom/HISTORY.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ Release History
55

66
1.0.0b3
77
+++++++
8-
* Regenerated analytics_frontend_api SDK from V2026_03_01_Preview OpenAPI specification
8+
* Updated to latest Frontend API spec from develop branch (2026-03-01-preview)
9+
* Regenerated analytics_frontend_api SDK with updated method signatures
10+
* SDK Changes (internal, transparent to CLI users):
11+
- Method renames: collaboration.list → collaboration.list_get
12+
- Method renames: analytics_dataset_* → analytics_datasets_* (dataset → datasets, plural)
13+
- Method renames: check_consent_document_id_get → consent_document_id_get
14+
- Method renames: set_consent_document_id_put → consent_document_id_put
915
* BREAKING CHANGE: All frontend API endpoints now require api-version=2026-03-01-preview query parameter
1016
* Added: --api-version parameter to all frontend commands (default: 2026-03-01-preview)
1117
* Updated: SDK client now automatically injects api-version into all API requests

src/managedcleanroom/azext_managedcleanroom/_frontend_custom.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def frontend_collaboration_list(cmd, active_only=False, api_version=None):
2525
:return: List of collaboration objects with collaborationId, collaborationName, userStatus
2626
"""
2727
client = get_frontend_client(cmd, api_version=api_version)
28-
return client.collaboration.list(active_only=active_only)
28+
return client.collaboration.list_get(active_only=active_only)
2929

3030

3131
def frontend_collaboration_show(
@@ -222,7 +222,7 @@ def frontend_collaboration_dataset_show(
222222
:return: Dataset details
223223
"""
224224
client = get_frontend_client(cmd, api_version=api_version)
225-
return client.collaboration.analytics_dataset_document_id_get(
225+
return client.collaboration.analytics_datasets_document_id_get(
226226
collaboration_id, document_id)
227227

228228

@@ -244,7 +244,7 @@ def frontend_collaboration_dataset_publish(
244244
body = json.loads(body)
245245

246246
client = get_frontend_client(cmd, api_version=api_version)
247-
return client.collaboration.analytics_dataset_document_id_publish_post(
247+
return client.collaboration.analytics_datasets_document_id_publish_post(
248248
collaboration_id, document_id, body)
249249

250250

@@ -281,7 +281,7 @@ def frontend_collaboration_consent_check(
281281
:return: Consent status
282282
"""
283283
client = get_frontend_client(cmd, api_version=api_version)
284-
return client.collaboration.check_consent_document_id_get(
284+
return client.collaboration.consent_document_id_get(
285285
collaboration_id, document_id)
286286

287287

@@ -300,7 +300,7 @@ def frontend_collaboration_consent_set(
300300
"""
301301
body = {"consentAction": consent_action}
302302
client = get_frontend_client(cmd, api_version=api_version)
303-
return client.collaboration.set_consent_document_id_put(
303+
return client.collaboration.consent_document_id_put(
304304
collaboration_id, document_id, body=body
305305
)
306306

src/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
# coding=utf-8
2-
# --------------------------------------------------------------------------
3-
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# --------------------------------------------------------------------------
2+
# flake8: noqa: F403
63
# pylint: disable=wrong-import-position
74

85
from typing import TYPE_CHECKING
96

107
if TYPE_CHECKING:
11-
from ._patch import * # pylint: disable=unused-wildcard-import # noqa: F403
8+
from ._patch import * # pylint: disable=unused-wildcard-import
129

1310
from ._client import AnalyticsFrontendAPI # type: ignore
1411

1512
try:
1613
from ._patch import __all__ as _patch_all
17-
from ._patch import * # noqa: F403
14+
from ._patch import *
1815
except ImportError:
1916
_patch_all = []
2017
from ._patch import patch_sdk as _patch_sdk

src/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/_client.py

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# coding=utf-8
2-
# --------------------------------------------------------------------------
3-
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# --------------------------------------------------------------------------
62

73
from copy import deepcopy
84
from typing import Any
@@ -38,39 +34,28 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
3834
_policies = kwargs.pop("policies", None)
3935
if _policies is None:
4036
_policies = [
41-
policies.RequestIdPolicy(
42-
**kwargs),
37+
policies.RequestIdPolicy(**kwargs),
4338
self._config.headers_policy,
4439
self._config.user_agent_policy,
4540
self._config.proxy_policy,
46-
policies.ContentDecodePolicy(
47-
**kwargs),
41+
policies.ContentDecodePolicy(**kwargs),
4842
self._config.redirect_policy,
4943
self._config.retry_policy,
5044
self._config.authentication_policy,
5145
self._config.custom_hook_policy,
5246
self._config.logging_policy,
53-
policies.DistributedTracingPolicy(
54-
**kwargs),
55-
policies.SensitiveHeaderCleanupPolicy(
56-
**kwargs) if self._config.redirect_policy else None,
47+
policies.DistributedTracingPolicy(**kwargs),
48+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
5749
self._config.http_logging_policy,
5850
]
59-
self._client: PipelineClient = PipelineClient(
60-
base_url=endpoint, policies=_policies, **kwargs)
51+
self._client: PipelineClient = PipelineClient(base_url=endpoint, policies=_policies, **kwargs)
6152

6253
self._serialize = Serializer()
6354
self._deserialize = Deserializer()
6455
self._serialize.client_side_validation = False
65-
self.collaboration = CollaborationOperations(
66-
self._client, self._config, self._serialize, self._deserialize)
67-
68-
def send_request(
69-
self,
70-
request: HttpRequest,
71-
*,
72-
stream: bool = False,
73-
**kwargs: Any) -> HttpResponse:
56+
self.collaboration = CollaborationOperations(self._client, self._config, self._serialize, self._deserialize)
57+
58+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
7459
"""Runs the network request through the client's chained policies.
7560
7661
>>> from azure.core.rest import HttpRequest
@@ -90,8 +75,7 @@ def send_request(
9075

9176
request_copy = deepcopy(request)
9277
request_copy.url = self._client.format_url(request_copy.url)
93-
return self._client.send_request(
94-
request_copy, stream=stream, **kwargs) # type: ignore
78+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
9579

9680
def close(self) -> None:
9781
self._client.close()
Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# coding=utf-8
2-
# --------------------------------------------------------------------------
3-
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# --------------------------------------------------------------------------
2+
# pylint: disable=too-few-public-methods
63

74
from typing import Any
85

@@ -11,7 +8,7 @@
118
VERSION = "unknown"
129

1310

14-
class AnalyticsFrontendAPIConfiguration: # pylint: disable=too-many-instance-attributes,too-few-public-methods
11+
class AnalyticsFrontendAPIConfiguration: # pylint: disable=too-many-instance-attributes
1512
"""Configuration for AnalyticsFrontendAPI.
1613
1714
Note that all parameters used to create this instance are saved as instance
@@ -26,27 +23,17 @@ def __init__(self, **kwargs: Any) -> None:
2623
api_version: str = kwargs.pop("api_version", "2026-03-01-preview")
2724

2825
self.api_version = api_version
29-
kwargs.setdefault(
30-
"sdk_moniker",
31-
"analyticsfrontendapi/{}".format(VERSION))
26+
kwargs.setdefault("sdk_moniker", "analyticsfrontendapi/{}".format(VERSION))
3227
self.polling_interval = kwargs.get("polling_interval", 30)
3328
self._configure(**kwargs)
3429

3530
def _configure(self, **kwargs: Any) -> None:
36-
self.user_agent_policy = kwargs.get(
37-
"user_agent_policy") or policies.UserAgentPolicy(**kwargs)
38-
self.headers_policy = kwargs.get(
39-
"headers_policy") or policies.HeadersPolicy(**kwargs)
40-
self.proxy_policy = kwargs.get(
41-
"proxy_policy") or policies.ProxyPolicy(**kwargs)
42-
self.logging_policy = kwargs.get(
43-
"logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
44-
self.http_logging_policy = kwargs.get(
45-
"http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
46-
self.custom_hook_policy = kwargs.get(
47-
"custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
48-
self.redirect_policy = kwargs.get(
49-
"redirect_policy") or policies.RedirectPolicy(**kwargs)
50-
self.retry_policy = kwargs.get(
51-
"retry_policy") or policies.RetryPolicy(**kwargs)
31+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
32+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
33+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
34+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
35+
self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
36+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
37+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
38+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
5239
self.authentication_policy = kwargs.get("authentication_policy")

src/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/_patch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"""
1010

1111

12-
# Add all objects you want publicly available to users at this package level
13-
__all__: list[str] = []
12+
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
1413

1514

1615
def patch_sdk():
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
# --------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)