Skip to content

Regenerate azure-planetarycomputer from TypeSpec commit f6aac155e9a422cf0251498788e5726c3b615bf3#45268

Open
chahibi wants to merge 3 commits intoAzure:mainfrom
chahibi:mpc-pro-update-take-2
Open

Regenerate azure-planetarycomputer from TypeSpec commit f6aac155e9a422cf0251498788e5726c3b615bf3#45268
chahibi wants to merge 3 commits intoAzure:mainfrom
chahibi:mpc-pro-update-take-2

Conversation

@chahibi
Copy link
Member

@chahibi chahibi commented Feb 20, 2026

Description

Regenerates azure-planetarycomputer from TypeSpec commit f6aac155e9a422cf0251498788e5726c3b615bf3 using @azure-tools/typespec-python@0.60.1.

Breaking API Bugfix Changes

Renamed operations:

  • StacOperations.list_collectionsStacOperations.get_collections

New models:

  • AssetStatisticsResponse
  • BandStatisticsMap
  • ClassMapLegendResponse
  • QueryableDefinitionsResponse
  • TilerAssetGeoJson
  • TilerInfoMapResponse

Return type changes:

  • get_collection_queryables / list_queryables now return QueryableDefinitionsResponse instead of dict[str, Any]
  • get_class_map_legend now returns ClassMapLegendResponse instead of dict[str, Any]

Non-generated changes

  • Samples (4 files): Updated list_collectionsget_collections calls
  • Tests (8 files): Updated API calls for rename, updated isinstance(dict)isinstance(MutableMapping) for changed return types
  • CONTRIBUTING.md: Improved checklist ordering (Black before pylint), added Sphinx docstring and test update guidance
  • Generated code fixes: Pylint suppressions, Sphinx docstring formatting (both sync and async _operations.py)

Validation

All local checks pass:

  • Pylint: 10.00/10
  • Sphinx: OK
  • MyPy: OK
  • Pyright: OK
  • Tests: 202 passed (playback mode)
  • ApiStub: OK

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@chahibi chahibi marked this pull request as ready for review February 20, 2026 12:21
Copilot AI review requested due to automatic review settings February 20, 2026 12:21
@chahibi chahibi enabled auto-merge (squash) February 20, 2026 12:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_collectionsget_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.

Comment on lines +80 to +82
> **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.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
_deserialize_xml,
)
from .._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _deserialize_xml # pylint: disable=unused-import
# pylint: disable=unused-import
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
# pylint: disable=unused-import

Copilot uses AI. Check for mistakes.

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>`_
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>`_

Copilot uses AI. Check for mistakes.

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>`_
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>`_

Copilot uses AI. Check for mistakes.
"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",
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
"azure.planetarycomputer.models.ClassMapLegendResponse": "ClassMapLegendResponse",
"azure.planetarycomputer.models.ClassMapLegendResponse": "Microsoft.PlanetaryComputer.ClassMapLegendResponse",

Copilot uses AI. Check for mistakes.

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>`_.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>`_.

Copilot uses AI. Check for mistakes.

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>`_
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>`_

Copilot uses AI. Check for mistakes.

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>`_.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>`_.

Copilot uses AI. Check for mistakes.

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>`_
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>`_

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +7
## 1.0.0b1 (Unreleased)

- Initial version
### Features Added

### Other Changes
- Added models `AssetStatisticsResponse`, `BandStatisticsMap`, `ClassMapLegendResponse`, `QueryableDefinitionsResponse`, `TilerAssetGeoJson`, `TilerInfoMapResponse`.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments