-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate for typespec-python (2024-12-18 06:23:49)
- Loading branch information
AutoPrFromHttpClientPython
authored and
AutoPrFromHttpClientPython
committed
Dec 18, 2024
1 parent
1ade76e
commit e74697c
Showing
106 changed files
with
10,880 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/typespec-python/test/azure/generated/azure-payload-pageable/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Release History | ||
|
||
## 1.0.0b1 (1970-01-01) | ||
|
||
- Initial version |
21 changes: 21 additions & 0 deletions
21
packages/typespec-python/test/azure/generated/azure-payload-pageable/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Copyright (c) Microsoft Corporation. | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
8 changes: 8 additions & 0 deletions
8
packages/typespec-python/test/azure/generated/azure-payload-pageable/MANIFEST.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
include *.md | ||
include LICENSE | ||
include specs/azure/payload/pageable/py.typed | ||
recursive-include tests *.py | ||
recursive-include samples *.py *.md | ||
include specs/__init__.py | ||
include specs/azure/__init__.py | ||
include specs/azure/payload/__init__.py |
45 changes: 45 additions & 0 deletions
45
packages/typespec-python/test/azure/generated/azure-payload-pageable/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
|
||
# Specs Azure Payload Pageable client library for Python | ||
<!-- write necessary description of service --> | ||
|
||
## Getting started | ||
|
||
### Install the package | ||
|
||
```bash | ||
python -m pip install specs-azure-payload-pageable | ||
``` | ||
|
||
#### Prequisites | ||
|
||
- Python 3.8 or later is required to use this package. | ||
- You need an [Azure subscription][azure_sub] to use this package. | ||
- An existing Specs Azure Payload Pageable instance. | ||
|
||
## Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require | ||
you to agree to a Contributor License Agreement (CLA) declaring that you have | ||
the right to, and actually do, grant us the rights to use your contribution. | ||
For details, visit https://cla.microsoft.com. | ||
|
||
When you submit a pull request, a CLA-bot will automatically determine whether | ||
you need to provide a CLA and decorate the PR appropriately (e.g., label, | ||
comment). Simply follow the instructions provided by the bot. You will only | ||
need to do this once across all repos using our CLA. | ||
|
||
This project has adopted the | ||
[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, | ||
see the Code of Conduct FAQ or contact [email protected] with any | ||
additional questions or comments. | ||
|
||
<!-- LINKS --> | ||
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ | ||
[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token | ||
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials | ||
[azure_identity_pip]: https://pypi.org/project/azure-identity/ | ||
[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential | ||
[pip]: https://pypi.org/project/pip/ | ||
[azure_sub]: https://azure.microsoft.com/free/ | ||
|
7 changes: 7 additions & 0 deletions
7
...s/typespec-python/test/azure/generated/azure-payload-pageable/apiview_mapping_python.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"CrossLanguagePackageId": "_Specs_.Azure.Payload.Pageable", | ||
"CrossLanguageDefinitionId": { | ||
"specs.azure.payload.pageable.models.User": "_Specs_.Azure.Payload.Pageable.User", | ||
"specs.azure.payload.pageable.PageableClient.list": "_Specs_.Azure.Payload.Pageable.list" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/typespec-python/test/azure/generated/azure-payload-pageable/dev_requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-e ../../../tools/azure-sdk-tools | ||
../../core/azure-core | ||
aiohttp |
35 changes: 35 additions & 0 deletions
35
...s/typespec-python/test/azure/generated/azure-payload-pageable/generated_tests/conftest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) Python Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
import os | ||
import pytest | ||
from dotenv import load_dotenv | ||
from devtools_testutils import ( | ||
test_proxy, | ||
add_general_regex_sanitizer, | ||
add_body_key_sanitizer, | ||
add_header_regex_sanitizer, | ||
) | ||
|
||
load_dotenv() | ||
|
||
|
||
# For security, please avoid record sensitive identity information in recordings | ||
@pytest.fixture(scope="session", autouse=True) | ||
def add_sanitizers(test_proxy): | ||
pageable_subscription_id = os.environ.get("PAGEABLE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") | ||
pageable_tenant_id = os.environ.get("PAGEABLE_TENANT_ID", "00000000-0000-0000-0000-000000000000") | ||
pageable_client_id = os.environ.get("PAGEABLE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") | ||
pageable_client_secret = os.environ.get("PAGEABLE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=pageable_subscription_id, value="00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=pageable_tenant_id, value="00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=pageable_client_id, value="00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=pageable_client_secret, value="00000000-0000-0000-0000-000000000000") | ||
|
||
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") | ||
add_header_regex_sanitizer(key="Cookie", value="cookie;") | ||
add_body_key_sanitizer(json_path="$..access_token", value="access_token") |
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
...pespec-python/test/azure/generated/azure-payload-pageable/generated_tests/testpreparer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) Python Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer | ||
import functools | ||
from specs.azure.payload.pageable import PageableClient | ||
|
||
|
||
class PageableClientTestBase(AzureRecordedTestCase): | ||
|
||
def create_client(self, endpoint): | ||
credential = self.get_credential(PageableClient) | ||
return self.create_client_from_credential( | ||
PageableClient, | ||
credential=credential, | ||
endpoint=endpoint, | ||
) | ||
|
||
|
||
PageablePreparer = functools.partial( | ||
PowerShellPreparer, "pageable", pageable_endpoint="https://fake_pageable_endpoint.com" | ||
) |
20 changes: 20 additions & 0 deletions
20
...-python/test/azure/generated/azure-payload-pageable/generated_tests/testpreparer_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) Python Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
from devtools_testutils import AzureRecordedTestCase | ||
from specs.azure.payload.pageable.aio import PageableClient | ||
|
||
|
||
class PageableClientTestBaseAsync(AzureRecordedTestCase): | ||
|
||
def create_async_client(self, endpoint): | ||
credential = self.get_credential(PageableClient, is_async=True) | ||
return self.create_client_from_credential( | ||
PageableClient, | ||
credential=credential, | ||
endpoint=endpoint, | ||
) |
72 changes: 72 additions & 0 deletions
72
packages/typespec-python/test/azure/generated/azure-payload-pageable/setup.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) Python Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
# coding: utf-8 | ||
|
||
import os | ||
import re | ||
from setuptools import setup, find_packages | ||
|
||
|
||
PACKAGE_NAME = "specs-azure-payload-pageable" | ||
PACKAGE_PPRINT_NAME = "Specs Azure Payload Pageable" | ||
|
||
# a-b-c => a/b/c | ||
package_folder_path = PACKAGE_NAME.replace("-", "/") | ||
|
||
# Version extraction inspired from 'requests' | ||
with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: | ||
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) | ||
|
||
if not version: | ||
raise RuntimeError("Cannot find version information") | ||
|
||
|
||
setup( | ||
name=PACKAGE_NAME, | ||
version=version, | ||
description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), | ||
long_description=open("README.md", "r").read(), | ||
long_description_content_type="text/markdown", | ||
license="MIT License", | ||
author="Microsoft Corporation", | ||
author_email="[email protected]", | ||
url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", | ||
keywords="azure, azure sdk", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"License :: OSI Approved :: MIT License", | ||
], | ||
zip_safe=False, | ||
packages=find_packages( | ||
exclude=[ | ||
"tests", | ||
# Exclude packages that will be covered by PEP420 or nspkg | ||
"specs", | ||
"specs.azure", | ||
"specs.azure.payload", | ||
] | ||
), | ||
include_package_data=True, | ||
package_data={ | ||
"specs.azure.payload.pageable": ["py.typed"], | ||
}, | ||
install_requires=[ | ||
"isodate>=0.6.1", | ||
"azure-core>=1.30.0", | ||
"typing-extensions>=4.6.0", | ||
], | ||
python_requires=">=3.8", | ||
) |
1 change: 1 addition & 0 deletions
1
packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore |
1 change: 1 addition & 0 deletions
1
packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore |
1 change: 1 addition & 0 deletions
1
...pespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore |
32 changes: 32 additions & 0 deletions
32
...thon/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) Python Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
# pylint: disable=wrong-import-position | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from ._patch import * # pylint: disable=unused-wildcard-import | ||
|
||
from ._client import PageableClient # type: ignore | ||
from ._version import VERSION | ||
|
||
__version__ = VERSION | ||
|
||
try: | ||
from ._patch import __all__ as _patch_all | ||
from ._patch import * | ||
except ImportError: | ||
_patch_all = [] | ||
from ._patch import patch_sdk as _patch_sdk | ||
|
||
__all__ = [ | ||
"PageableClient", | ||
] | ||
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore | ||
|
||
_patch_sdk() |
Oops, something went wrong.