Skip to content

[python] add baseline of generated code before regenerate#10565

Open
msyyc wants to merge 6 commits intomainfrom
optimize-pipeline-for-complete-test-cases
Open

[python] add baseline of generated code before regenerate#10565
msyyc wants to merge 6 commits intomainfrom
optimize-pipeline-for-complete-test-cases

Conversation

@msyyc
Copy link
Copy Markdown
Contributor

@msyyc msyyc commented Apr 30, 2026

Summary

Optimize the regeneration pipeline so test cases more accurately reflect a real customer workflow.

Changes

  • regenerate.ts: introduce a preProcess() step that runs before any flavor regeneration:
    • resetBaselineFromSdkRepo — reset tests/generated to the baseline checked in at Azure/azure-sdk-for-python:eng/tools/emitter/gen so we always start from a known-good baseline that includes any required customized code.
    • deleteSomeGeneratedFiles — delete tests/generated/azure/authentication-http-custom and tests/generated/unbranded/encode-array so regeneration has to create these packages from scratch, exercising the "complete package from zero" scenario.
  • Copy missing test files from autorest.python repo so that there are complete test suits

@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Apr 30, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@10565

commit: e9b59c1

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - internal ✏️

add baseline of generated code before regenerate

@azure-sdk
Copy link
Copy Markdown
Collaborator

azure-sdk commented Apr 30, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants