Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@azure-tools/typespec-python"
---

Remove `specs.` from namespace path
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"cwd": "${workspaceFolder}/packages/typespec-python",
"args": [
"compile",
"${workspaceFolder}/packages/typespec-python/node_modules/@azure-tools/cadl-ranch-specs/http/server/versions/not-versioned",
"${workspaceFolder}/packages/typespec-python/node_modules/@azure-tools/azure-http-specs/specs/azure/client-generator-core/access",
"--emit",
"${workspaceFolder}/packages/typespec-python/dist/src/index.js",
"--option=@azure-tools/typespec-python.debug=true"
Expand Down Expand Up @@ -61,6 +61,7 @@
"args": ["run", "${relativeFile}"],
"smartStep": true
},
{
"name": "npm: regenerate",
"request": "launch",
"type": "node",
Expand Down
2 changes: 1 addition & 1 deletion packages/autorest.python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
"dependencies": {
"@typespec/http-client-python": "~0.9.3-dev.1",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDc2MTY5Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.9.2.tgz",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "~4.19.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/typespec-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"js-yaml": "~4.1.0",
"semver": "~7.6.2",
"tsx": "~4.19.1",
"@typespec/http-client-python": "~0.9.3-dev.1",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDc2MTY5Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.9.2.tgz",
"fs-extra": "~11.2.0"
},
"devDependencies": {
Expand All @@ -82,7 +82,7 @@
"@azure-tools/typespec-azure-rulesets": "~0.54.0",
"@azure-tools/typespec-autorest": "~0.54.0",
"@azure-tools/typespec-client-generator-core": "~0.54.0",
"@azure-tools/azure-http-specs": "0.1.0-alpha.13",
"@azure-tools/azure-http-specs": "0.1.0-alpha.14-dev.8",
"@typespec/http-specs": "0.1.0-alpha.17",
"@types/js-yaml": "~4.0.5",
"@types/node": "~22.13.14",
Expand Down
48 changes: 0 additions & 48 deletions packages/typespec-python/scripts/eng/regenerate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,54 +20,6 @@ interface TspCommand {
}

const AZURE_EMITTER_OPTIONS: Record<string, Record<string, string> | Record<string, string>[]> = {
"azure/client-generator-core/access": {
namespace: "specs.azure.clientgenerator.core.access",
},
"azure/client-generator-core/api-version": {
namespace: "specs.azure.clientgenerator.core.apiversion",
},
"azure/client-generator-core/client-initialization": {
namespace: "specs.azure.clientgenerator.core.clientinitialization",
},
"azure/client-generator-core/flatten-property": {
namespace: "specs.azure.clientgenerator.core.flattenproperty",
},
"azure/client-generator-core/usage": {
namespace: "specs.azure.clientgenerator.core.usage",
},
"azure/core/basic": {
namespace: "specs.azure.core.basic",
},
"azure/core/lro/rpc": {
namespace: "specs.azure.core.lro.rpc",
},
"azure/core/lro/standard": {
namespace: "specs.azure.core.lro.standard",
},
"azure/core/model": {
namespace: "specs.azure.core.model",
},
"azure/core/page": {
namespace: "specs.azure.core.page",
},
"azure/core/scalar": {
namespace: "specs.azure.core.scalar",
},
"azure/core/traits": {
namespace: "specs.azure.core.traits",
},
"azure/encode/duration": {
namespace: "specs.azure.encode.duration",
},
"azure/example/basic": {
namespace: "specs.azure.example.basic",
},
"azure/payload/pageable": {
namespace: "specs.azure.payload.pageable",
},
"client/structure/default": {
namespace: "client.structure.service",
},
"client/structure/multi-client": {
"package-name": "client-structure-multiclient",
"namespace": "client.structure.multiclient",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
include *.md
include LICENSE
include specs/azure/clientgenerator/core/access/py.typed
include azure/clientgenerator/core/access/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include specs/__init__.py
include specs/azure/__init__.py
include specs/azure/clientgenerator/__init__.py
include specs/azure/clientgenerator/core/__init__.py
include azure/__init__.py
include azure/clientgenerator/__init__.py
include azure/clientgenerator/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Specs Azure Clientgenerator Core Access client library for Python
# Azure Clientgenerator Core Access client library for Python
<!-- write necessary description of service -->

## Getting started

### Install the package

```bash
python -m pip install specs-azure-clientgenerator-core-access
python -m pip install azure-clientgenerator-core-access
```

#### Prequisites

- Python 3.9 or later is required to use this package.
- You need an [Azure subscription][azure_sub] to use this package.
- An existing Specs Azure Clientgenerator Core Access instance.
- An existing Azure Clientgenerator Core Access instance.


## Contributing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"CrossLanguagePackageId": "_Specs_.Azure.ClientGenerator.Core.Access",
"CrossLanguageDefinitionId": {
"specs.azure.clientgenerator.core.access.models.NoDecoratorModelInPublic": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.NoDecoratorModelInPublic",
"specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal": "_Specs_.Azure.ClientGenerator.Core.Access.InternalOperation.PublicDecoratorModelInInternal",
"specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.PublicDecoratorModelInPublic",
"specs.azure.clientgenerator.core.access.models.SharedModel": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.SharedModel",
"specs.azure.clientgenerator.core.access.AccessClient.public_operation.no_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.noDecoratorInPublic",
"specs.azure.clientgenerator.core.access.AccessClient.public_operation.public_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.publicDecoratorInPublic",
"specs.azure.clientgenerator.core.access.AccessClient.shared_model_in_operation.public": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.public"
"azure.clientgenerator.core.access.models.NoDecoratorModelInPublic": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.NoDecoratorModelInPublic",
"azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal": "_Specs_.Azure.ClientGenerator.Core.Access.InternalOperation.PublicDecoratorModelInInternal",
"azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.PublicDecoratorModelInPublic",
"azure.clientgenerator.core.access.models.SharedModel": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.SharedModel",
"azure.clientgenerator.core.access.AccessClient.public_operation.no_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.noDecoratorInPublic",
"azure.clientgenerator.core.access.AccessClient.public_operation.public_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.publicDecoratorInPublic",
"azure.clientgenerator.core.access.AccessClient.shared_model_in_operation.public": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.public"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ class AccessClient: # pylint: disable=client-accepts-api-version-keyword

:ivar public_operation: PublicOperationOperations operations
:vartype public_operation:
specs.azure.clientgenerator.core.access.operations.PublicOperationOperations
azure.clientgenerator.core.access.operations.PublicOperationOperations
:ivar internal_operation: InternalOperationOperations operations
:vartype internal_operation:
specs.azure.clientgenerator.core.access.operations.InternalOperationOperations
azure.clientgenerator.core.access.operations.InternalOperationOperations
:ivar shared_model_in_operation: SharedModelInOperationOperations operations
:vartype shared_model_in_operation:
specs.azure.clientgenerator.core.access.operations.SharedModelInOperationOperations
azure.clientgenerator.core.access.operations.SharedModelInOperationOperations
:ivar relative_model_in_operation: RelativeModelInOperationOperations operations
:vartype relative_model_in_operation:
specs.azure.clientgenerator.core.access.operations.RelativeModelInOperationOperations
azure.clientgenerator.core.access.operations.RelativeModelInOperationOperations
:keyword endpoint: Service host. Default value is "http://localhost:3000".
:paramtype endpoint: str
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AccessClientConfiguration: # pylint: disable=too-many-instance-attributes
def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None:

self.endpoint = endpoint
kwargs.setdefault("sdk_moniker", "specs-azure-clientgenerator-core-access/{}".format(VERSION))
kwargs.setdefault("sdk_moniker", "clientgenerator-core-access/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ class AccessClient: # pylint: disable=client-accepts-api-version-keyword

:ivar public_operation: PublicOperationOperations operations
:vartype public_operation:
specs.azure.clientgenerator.core.access.aio.operations.PublicOperationOperations
azure.clientgenerator.core.access.aio.operations.PublicOperationOperations
:ivar internal_operation: InternalOperationOperations operations
:vartype internal_operation:
specs.azure.clientgenerator.core.access.aio.operations.InternalOperationOperations
azure.clientgenerator.core.access.aio.operations.InternalOperationOperations
:ivar shared_model_in_operation: SharedModelInOperationOperations operations
:vartype shared_model_in_operation:
specs.azure.clientgenerator.core.access.aio.operations.SharedModelInOperationOperations
azure.clientgenerator.core.access.aio.operations.SharedModelInOperationOperations
:ivar relative_model_in_operation: RelativeModelInOperationOperations operations
:vartype relative_model_in_operation:
specs.azure.clientgenerator.core.access.aio.operations.RelativeModelInOperationOperations
azure.clientgenerator.core.access.aio.operations.RelativeModelInOperationOperations
:keyword endpoint: Service host. Default value is "http://localhost:3000".
:paramtype endpoint: str
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AccessClientConfiguration: # pylint: disable=too-many-instance-attributes
def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None:

self.endpoint = endpoint
kwargs.setdefault("sdk_moniker", "specs-azure-clientgenerator-core-access/{}".format(VERSION))
kwargs.setdefault("sdk_moniker", "clientgenerator-core-access/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PublicOperationOperations:
**DO NOT** instantiate this class directly.

Instead, you should access the following operations through
:class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s
:class:`~azure.clientgenerator.core.access.aio.AccessClient`'s
:attr:`public_operation` attribute.
"""

Expand All @@ -68,7 +68,7 @@ async def no_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.N
:paramtype name: str
:return: NoDecoratorModelInPublic. The NoDecoratorModelInPublic is compatible with
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.NoDecoratorModelInPublic
:rtype: ~azure.clientgenerator.core.access.models.NoDecoratorModelInPublic
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -128,7 +128,7 @@ async def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _mode
:paramtype name: str
:return: PublicDecoratorModelInPublic. The PublicDecoratorModelInPublic is compatible with
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic
:rtype: ~azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -187,7 +187,7 @@ class InternalOperationOperations:
**DO NOT** instantiate this class directly.

Instead, you should access the following operations through
:class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s
:class:`~azure.clientgenerator.core.access.aio.AccessClient`'s
:attr:`internal_operation` attribute.
"""

Expand All @@ -208,7 +208,7 @@ async def _no_decorator_in_internal(
:paramtype name: str
:return: NoDecoratorModelInInternal. The NoDecoratorModelInInternal is compatible with
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.NoDecoratorModelInInternal
:rtype: ~azure.clientgenerator.core.access.models._models.NoDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -272,8 +272,7 @@ async def _internal_decorator_in_internal(
:paramtype name: str
:return: InternalDecoratorModelInInternal. The InternalDecoratorModelInInternal is compatible
with MutableMapping
:rtype:
~specs.azure.clientgenerator.core.access.models._models.InternalDecoratorModelInInternal
:rtype: ~azure.clientgenerator.core.access.models._models.InternalDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -337,7 +336,7 @@ async def _public_decorator_in_internal(
:paramtype name: str
:return: PublicDecoratorModelInInternal. The PublicDecoratorModelInInternal is compatible with
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal
:rtype: ~azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -396,7 +395,7 @@ class SharedModelInOperationOperations:
**DO NOT** instantiate this class directly.

Instead, you should access the following operations through
:class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s
:class:`~azure.clientgenerator.core.access.aio.AccessClient`'s
:attr:`shared_model_in_operation` attribute.
"""

Expand All @@ -414,7 +413,7 @@ async def public(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
:keyword name: Required.
:paramtype name: str
:return: SharedModel. The SharedModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel
:rtype: ~azure.clientgenerator.core.access.models.SharedModel
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -473,7 +472,7 @@ async def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
:keyword name: Required.
:paramtype name: str
:return: SharedModel. The SharedModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel
:rtype: ~azure.clientgenerator.core.access.models.SharedModel
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -532,7 +531,7 @@ class RelativeModelInOperationOperations:
**DO NOT** instantiate this class directly.

Instead, you should access the following operations through
:class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s
:class:`~azure.clientgenerator.core.access.aio.AccessClient`'s
:attr:`relative_model_in_operation` attribute.
"""

Expand Down Expand Up @@ -561,7 +560,7 @@ async def _operation(self, *, name: str, **kwargs: Any) -> _models._models.Outer
:keyword name: Required.
:paramtype name: str
:return: OuterModel. The OuterModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.OuterModel
:rtype: ~azure.clientgenerator.core.access.models._models.OuterModel
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down Expand Up @@ -628,7 +627,7 @@ async def _discriminator(self, *, kind: str, **kwargs: Any) -> _models._models.A
:keyword kind: Required.
:paramtype kind: str
:return: AbstractModel. The AbstractModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.AbstractModel
:rtype: ~azure.clientgenerator.core.access.models._models.AbstractModel
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class OuterModel(BaseModel):
:ivar name: Required.
:vartype name: str
:ivar inner: Required.
:vartype inner: ~specs.azure.clientgenerator.core.access.models._models.InnerModel
:vartype inner: ~azure.clientgenerator.core.access.models._models.InnerModel
"""

inner: "_models._models.InnerModel" = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down
Loading
Loading