Skip to content

Commit d992c48

Browse files
committed
Update skill
1 parent 1b634d7 commit d992c48

1 file changed

Lines changed: 39 additions & 9 deletions

File tree

  • sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec

sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,21 @@ Note:
9191

9292
---
9393

94-
## Step 5: Run post-emitter fixes
94+
## Step 5: Commit and push
95+
96+
Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch:
97+
98+
```
99+
git add -A -- ':!.env*'
100+
git commit -m "Part 1: Emit SDK from TypeSpec"
101+
102+
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
103+
git push -u origin <topic-branch>
104+
```
105+
106+
---
107+
108+
## Step 6: Run post-emitter fixes
95109

96110
After a successful emit, run the post-emitter fix script located in the `sdk/ai/azure-ai-projects` folder:
97111

@@ -105,7 +119,21 @@ This script applies azure-ai-projects-specific corrections to the emitted code (
105119

106120
---
107121

108-
## Step 6: Fix patched code related to preview feature headers
122+
## Step 7: Commit and push
123+
124+
Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch:
125+
126+
```
127+
git add -A -- ':!.env*'
128+
git commit -m "Part 2: Apply post-emitter-fixes.cmd"
129+
130+
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
131+
git push -u origin <topic-branch>
132+
```
133+
134+
---
135+
136+
## Step 8: Fix patched code related to preview feature headers
109137

110138
The emitted code may have introduced another beta sub-client (a new property on class `BetaOperations`). It may have also added another enum value to the existing internal class `_FoundryFeaturesOptInKeys`. This means that the client library needs to set a new HTTP request header when making REST API calls to the service, to opt-in to the new service features which are still in preview. If that's the case, do the following:
111139

@@ -117,9 +145,11 @@ The emitted code may have introduced another beta sub-client (a new property on
117145

118146
If a new enum value was added to `_AgentDefinitionOptInKeys`, please print a note on screen that mentions which value was added, and tell the user that a review is needed to make sure this new value is properly used. But otherwise continue on.
119147

148+
Important: Under the `azure\ai\projects` folder, you are only allowed to edit Python source files that start with "_patch". If you see that changes are needed in other files, stop and report this to the user instead of making the changes yourself.
149+
120150
---
121151

122-
## Step 7: Update samples and tests
152+
## Step 9: Update samples and tests
123153

124154
If there were any breaking changes in existing APIs, like class or method renames:
125155
* update the patched code accordingly in the client library to reflect those changes. Changes should be made to Python source file names that start with "_patch", under the `azure\ai\projects` folder.
@@ -128,13 +158,13 @@ If there were any breaking changes in existing APIs, like class or method rename
128158

129159
---
130160

131-
## Step 8: Install package from sources
161+
## Step 10: Install package from sources
132162

133163
In the folder `sdk\ai\azure-ai-projects`, run `pip install -e .` to install the package from sources. If there are any errors, stop and report the error to the user. Do not continue.
134164

135165
---
136166

137-
## Step 9: Update CHANGELOG.md
167+
## Step 11: Update CHANGELOG.md
138168

139169
Use the **`azsdk-common-generate-sdk-locally`** skill's changelog capability (`azsdk_package_update_changelog_content`) to update `CHANGELOG.md` in the `sdk/ai/azure-ai-projects` folder with a summary of changes from the TypeSpec emit. Some guidelines to follow:
140170
* Start by examining the public SDK API surface of the latest released version of the azure-ai-projects package. The source code for this version can be found in the Main branch of the `azure-sdk-for-python` repository, in the folder `sdk\ai\azure-ai-projects`.
@@ -145,21 +175,21 @@ Use the **`azsdk-common-generate-sdk-locally`** skill's changelog capability (`a
145175

146176
---
147177

148-
## Step 10: Commit and push
178+
## Step 12: Commit and push
149179

150180
Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch:
151181

152182
```
153183
git add -A -- ':!.env*'
154-
git commit -m "Emit SDK from TypeSpec and apply post-emitter fixes
184+
git commit -m "Part 3: Additional edits"
155185
156186
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
157187
git push -u origin <topic-branch>
158188
```
159189

160190
---
161191

162-
## Step 11: Create a Pull Request
192+
## Step 13: Create a Pull Request
163193

164194
Create a draft PR from the **topic branch** to the **base branch** (recorded in Step 2):
165195

@@ -176,7 +206,7 @@ Open a new tab in the default browser and navigate to the PR URL.
176206

177207
---
178208

179-
## Step 12: Optionally run tests locally
209+
## Step 14: Optionally run tests locally
180210

181211
Prompt the user with this message: "Tests will run as part of the Pull Request. However, you can optionally run tests locally in a Python virtual environment, right now. It will take a few minutes. Do you want to run tests locally? (yes/no)"
182212

0 commit comments

Comments
 (0)