Skip to content

[typespec-python-regenerate workflow] Harden TypeSpec Python README warning workflow#47828

Merged
msyyc merged 1 commit into
mainfrom
yuchao/harden-typespec-python-readme-warning
Jul 3, 2026
Merged

[typespec-python-regenerate workflow] Harden TypeSpec Python README warning workflow#47828
msyyc merged 1 commit into
mainfrom
yuchao/harden-typespec-python-readme-warning

Conversation

@msyyc

@msyyc msyyc commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary:

  • Remove the generated README template file dependency from the TypeSpec Python regeneration workflow.
  • Generate the short test-package README warning inline before copying it to generated package READMEs.
  • Remove stale template-specific guidance from the generated-tests branch error message.

Validation:

  • git diff --check -- .github/workflows/typespec-python-regenerate.yml
  • VS Code YAML diagnostics: no errors
  • Local Git Bash temp-tree check for the simplified README warning copy flow

Test: https://github.com/Azure/azure-sdk-for-python/actions/runs/28645359471

Copilot AI review requested due to automatic review settings July 3, 2026 07:24
@msyyc msyyc requested review from a team, ChenxiJiang333, iscai-msft and tadelesh as code owners July 3, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the TypeSpec Python Regenerate Tests workflow by eliminating its dependency on a checked-in README template file. Previously the workflow copied eng/tools/azure-sdk-tools/emitter/generated/template/README.md onto every generated test-package README (and had to guard the template path during the find). Now the short "test code — do not install from PyPI" warning is generated inline into a temp file, removing the external file dependency and simplifying the copy logic.

Changes:

  • Replaced the template-file copy with an inline heredoc that writes the warning to a mktemp temp file (cleaned up via an EXIT trap).
  • Dropped the now-unnecessary ! -path "$TARGET/template/*" exclusion from the find, keeping only the top-level generated/README.md exclusion.
  • Removed stale template-specific guidance from the missing-branch error message.

@msyyc msyyc changed the title Harden TypeSpec Python README warning workflow [typespec-python-regenerate workflow] Harden TypeSpec Python README warning workflow Jul 3, 2026
@msyyc msyyc merged commit 0e10e6f into main Jul 3, 2026
25 checks passed
@msyyc msyyc deleted the yuchao/harden-typespec-python-readme-warning branch July 3, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants