Regenerate azure-planetarycomputer from TypeSpec commit f6aac155e9a422cf0251498788e5726c3b615bf3#45268
Regenerate azure-planetarycomputer from TypeSpec commit f6aac155e9a422cf0251498788e5726c3b615bf3#45268chahibi wants to merge 3 commits intoAzure:mainfrom
azure-planetarycomputer from TypeSpec commit f6aac155e9a422cf0251498788e5726c3b615bf3#45268Conversation
…9a422cf0251498788e5726c3b615bf3`
There was a problem hiding this comment.
Pull request overview
Regenerates azure-planetarycomputer from a newer TypeSpec commit and updates the hand-written surface area (samples/tests/docs) to match the regenerated API (notably list_collections → get_collections) and newly-typed response models.
Changes:
- Regenerated client/operations/models from TypeSpec commit
f6aac155…and updated APIView metadata. - Updated samples and tests for renamed STAC collections operation and for return types that now deserialize into model-backed
MutableMappings. - Updated package docs (CONTRIBUTING + CHANGELOG) to reflect regeneration workflow and API changes.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/planetarycomputer/azure-planetarycomputer/tsp-location.yaml | Bumps the TypeSpec source commit used for regeneration. |
| sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_operations.py | Regenerated sync operations; includes rename to get_collections, new typed deserialization, and search signing params. |
| sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_operations.py | Regenerated async operations matching the sync surface changes. |
| sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/models/_models.py | Adds new models and updates types (e.g., geometry coordinate typing, datetime fields). |
| sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/models/init.py | Exports newly introduced models. |
| sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_types.py | Removes the no-longer-used interval legend element alias. |
| sdk/planetarycomputer/azure-planetarycomputer/apiview-properties.json | Updates cross-language IDs for newly added models and renamed operations. |
| sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_00_stac_collection.py | Updates sample call sites to get_collections. |
| sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_02_stac_specification.py | Updates sample call sites to get_collections. |
| sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_00_stac_collection_async.py | Updates async sample call sites to get_collections. |
| sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_02_stac_specification_async.py | Updates async sample call sites to get_collections. |
| sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection.py | Updates test call sites + type assertions for MutableMapping-compatible responses. |
| sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection_async.py | Updates async test call sites + type assertions for MutableMapping-compatible responses. |
| sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification.py | Updates test call site for get_collections. |
| sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification_async.py | Updates async test call site for get_collections. |
| sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends.py | Updates assertions to accept MutableMapping-compatible typed model responses. |
| sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends_async.py | Updates assertions to accept MutableMapping-compatible typed model responses. |
| sdk/planetarycomputer/azure-planetarycomputer/CONTRIBUTING.md | Updates regeneration checklist and guidance for lint/doc fixes. |
| sdk/planetarycomputer/azure-planetarycomputer/CHANGELOG.md | Records breaking rename and new models/return type changes. |
| > **Critical: Run Black _before_ adding pylint suppressions.** Black reformats imports (turning single-line into multi-line), which changes where `# pylint: disable` comments must go. If you add suppressions first and then run Black, the comments may end up on the wrong line. The correct order is: (1) run `tox -e black`, (2) restore tests/samples, (3) add pylint suppressions. | ||
|
|
||
| ### Sample Updates | ||
| > **Emitter version variability:** The emitter may add different inline suppressions to different functions. For example, `build_data_get_mosaics_tile_json_request` gets the full `too-many-locals,too-many-branches,too-many-statements`, while `build_data_get_mosaics_tile_request` only gets `too-many-locals`. Always check the pylint output to see if additional suppressions are needed beyond what the emitter provides. |
There was a problem hiding this comment.
This section still states the generator produces # pylint: disable=line-too-long,useless-suppression,too-many-lines, but the regenerated _operations.py in this PR now has only # pylint: disable=too-many-lines. Please update the guidance to match the current generated output so future regenerations don’t follow stale instructions.
| _deserialize_xml, | ||
| ) | ||
| from .._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _deserialize_xml # pylint: disable=unused-import | ||
| # pylint: disable=unused-import |
There was a problem hiding this comment.
Line 37 introduces a file-level # pylint: disable=unused-import (and it’s also duplicated with the inline suppression on the import). This ends up disabling unused-import for the rest of the module and can mask real lint issues. Please remove the standalone disable on line 37 and keep the suppression scoped to the specific import line only (or format the import so a single inline suppression is sufficient).
| # pylint: disable=unused-import |
|
|
||
| Generate a `SAS Token | ||
| <https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | ||
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
There was a problem hiding this comment.
The docstring link has an extra slash (docs.microsoft.com//azure/...), which will render as an incorrect URL in the generated docs. Please fix the URL (and consider switching to the current learn.microsoft.com link) so it resolves correctly.
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | |
| <https://learn.microsoft.com/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
|
|
||
| Revoke a `SAS Token | ||
| <https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | ||
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
There was a problem hiding this comment.
The docstring link has an extra slash (docs.microsoft.com//azure/...), which will render as an incorrect URL in the generated docs. Please fix the URL (and consider switching to the current learn.microsoft.com link) so it resolves correctly.
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | |
| <https://learn.microsoft.com/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
| "azure.planetarycomputer.models.AssetStatisticsResponse": "Microsoft.PlanetaryComputer.AssetStatisticsResponse", | ||
| "azure.planetarycomputer.models.BandStatistics": "Microsoft.PlanetaryComputer.BandStatistics", | ||
| "azure.planetarycomputer.models.BandStatisticsMap": "Microsoft.PlanetaryComputer.BandStatisticsMap", | ||
| "azure.planetarycomputer.models.ClassMapLegendResponse": "ClassMapLegendResponse", |
There was a problem hiding this comment.
ClassMapLegendResponse is the only service model here that doesn’t use the Microsoft.PlanetaryComputer.* prefix (compare to AssetStatisticsResponse, BandStatisticsMap, etc.). If this is unintentional, it can prevent APIView cross-language ID matching for that type. Please align this value with the other PlanetaryComputer models (or add a short comment explaining why it’s intentionally unprefixed).
| "azure.planetarycomputer.models.ClassMapLegendResponse": "ClassMapLegendResponse", | |
| "azure.planetarycomputer.models.ClassMapLegendResponse": "Microsoft.PlanetaryComputer.ClassMapLegendResponse", |
|
|
||
| Signs a HREF (a link URL) by appending a `SAS Token | ||
| <https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. | ||
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. |
There was a problem hiding this comment.
The docstring link has an extra slash (docs.microsoft.com//azure/...), which will render as an incorrect URL in the generated docs. Please fix the URL (and consider switching to the current learn.microsoft.com link) so it resolves correctly.
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. | |
| <https://learn.microsoft.com/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. |
|
|
||
| Revoke a `SAS Token | ||
| <https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | ||
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
There was a problem hiding this comment.
The docstring link has an extra slash (docs.microsoft.com//azure/...), which will render as an incorrect URL in the generated docs. Please fix the URL (and consider switching to the current learn.microsoft.com link) so it resolves correctly.
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | |
| <https://learn.microsoft.com/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
|
|
||
| Signs a HREF (a link URL) by appending a `SAS Token | ||
| <https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. | ||
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. |
There was a problem hiding this comment.
The docstring link has an extra slash (docs.microsoft.com//azure/...), which will render as an incorrect URL in the generated docs. Please fix the URL (and consider switching to the current learn.microsoft.com link) so it resolves correctly.
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. | |
| <https://learn.microsoft.com/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_. |
|
|
||
| Generate a `SAS Token | ||
| <https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | ||
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
There was a problem hiding this comment.
The docstring link has an extra slash (docs.microsoft.com//azure/...), which will render as an incorrect URL in the generated docs. Please fix the URL (and consider switching to the current learn.microsoft.com link) so it resolves correctly.
| <https://docs.microsoft.com//azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ | |
| <https://learn.microsoft.com/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works>`_ |
| ## 1.0.0b1 (Unreleased) | ||
|
|
||
| - Initial version | ||
| ### Features Added | ||
|
|
||
| ### Other Changes | ||
| - Added models `AssetStatisticsResponse`, `BandStatisticsMap`, `ClassMapLegendResponse`, `QueryableDefinitionsResponse`, `TilerAssetGeoJson`, `TilerInfoMapResponse`. |
There was a problem hiding this comment.
This CHANGELOG entry is missing the standard subsections used across the repo (e.g., ### Bugs Fixed and ### Other Changes, even if empty). Please add the missing headings so the unreleased section follows the same structure as other SDK CHANGELOGs (see e.g. sdk/core/azure-core/CHANGELOG.md).
Description
Regenerates
azure-planetarycomputerfrom TypeSpec commitf6aac155e9a422cf0251498788e5726c3b615bf3using@azure-tools/typespec-python@0.60.1.Breaking API Bugfix Changes
Renamed operations:
StacOperations.list_collections→StacOperations.get_collectionsNew models:
AssetStatisticsResponseBandStatisticsMapClassMapLegendResponseQueryableDefinitionsResponseTilerAssetGeoJsonTilerInfoMapResponseReturn type changes:
get_collection_queryables/list_queryablesnow returnQueryableDefinitionsResponseinstead ofdict[str, Any]get_class_map_legendnow returnsClassMapLegendResponseinstead ofdict[str, Any]Non-generated changes
list_collections→get_collectionscallsisinstance(dict)→isinstance(MutableMapping)for changed return types_operations.py)Validation
All local checks pass:
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines