Skip to content

[AI Projects] Compare TypeSpec PR 12342 generated docstrings (do not merge) - #49757

Draft
Yuchao Yan (msyyc) wants to merge 1 commit into
users/msyyc/compare-typespec-12342-baselinefrom
users/msyyc/compare-typespec-12342
Draft

Yuchao Yan (msyyc) wants to merge 1 commit into
users/msyyc/compare-typespec-12342-baselinefrom
users/msyyc/compare-typespec-12342

Conversation

@msyyc

Copy link
Copy Markdown
Member

Comparison only — do not merge

Show the Azure AI Projects generated SDK changes caused by
microsoft/typespec#12342.

This draft deliberately targets users/msyyc/compare-typespec-12342-baseline,
not SDK main. The baseline contains freshly generated output from the current
TypeSpec main generator. This keeps SDK customizations and unrelated regeneration
changes out of this PR's diff.

Reproduction

  • TypeSpec main generator: d771b29578e9bcb5ad240e705cbabe4210e8e9d3.
  • TypeSpec PR Update README.md in OC #12342 generator: fbd3fabecbd3ca540acf981efd84e66e179dc761.
  • Service inputs: the SDK's saved TypeSpec location, pinned to
    Azure/azure-rest-api-specs@1ff3cf500bfd4d8f9195e09fd640a1e6b71161cd,
    under specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects.
  • Both generators use the same code model emitted by current TypeSpec main,
    the same Azure AI Projects options, and the same installed dependencies
    (TypeSpec compiler 1.16.0 and client-generator-core 0.72.1).
  • DPG models, azure.ai.projects, API version v1, no generated tests/samples,
    and generate-typeddict: false.

The shared code model isolates the Python generator changes in #12342 from an
unrelated newer-main emitter naming fix. No handwritten SDK customization,
package version, changelog, or API review artifact update is included in this
comparison diff.

What to review

The generated changes are string-literal quoting and docstring escaping/reflow.
The Projects-specific multiline prose, paragraphs, bullet lists, and JSON code
blocks remain intact. Relevant history: microsoft/typespec#8927,
microsoft/typespec#9466, and #44885.

Azure AI Projects uses DPG mode. That mode does not emit the generated operation
example block whose wrapping is removed by #12342.

Validation

  • All 26 generated Python files parse in both variants.
  • Executable ASTs match after excluding documentation strings.
  • The previous full comparison checked 2,323 runtime class/method docstrings:
    no changed reStructuredText literal blocks or new diagnostic sets.
  • Nine Projects-specific full-rendering regression cases pass against both
    generators; the multiline-prose and JSON-block cases reproduce pre-[textanalytics] Raise custom error message for AttributeError on DocumentError #9466 behavior.
  • Related generator regression tests: 245 passed.
  • Generated Python formatting and focused lint checks are run before commit.

This is a review artifact, not a release or a proposed update to SDK main.

Regenerate the identical main-emitted code model with microsoft/typespec#12342. Comparison only; no executable AST changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaeb82ef-b4f1-4a88-9442-edd2ea4061cf
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

This branch has not been deployed

No deployments
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