You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,16 @@ When someone asks to run validation on their library, ask them what supported en
13
13
14
14
Initialize and validate a TypeSpec client library for Azure SDK for Python. Please:
15
15
16
-
1. If the typespec mcp tool is available use that for generating or initializing. Otherwise please follow the instructions below to generate an SDK from TypeSpec.
16
+
1. If the typespec mcp tool is available use that for generating or initializing. If asked to update changes from local spec repo, lets find the path to that local azure-rest-api-specs repo for our tools. Otherwise please follow the instructions below to generate an SDK from TypeSpec.
17
17
- Ensure that node, python, and the required dependencies are installed in your environment (@azure-tools/typespec-client-generator-cli)
18
18
- If provided a url to a tspconfig.yaml ensure it has the most recent commit hash of the tspconfig.yaml file instead of a branch name like `main`. If the url does not have a commit hash, use the GitHub API to get the most recent commit hash of the tspconfig.yaml file. If you are unable to do this, ask the user to provide the correct url. `curl -s "https://api.github.com/repos/Azure/azure-rest-api-specs/commits?path=,path to tspconfig.yaml>&per_page=1"` helpful.
19
19
- If prompted to initialize the SDK from a url or a local repo use the command `npx @azure-tools/typespec-client-generator-cli init --tsp-config [URL or local azure-rest-api-specs path to tspconfig.yaml]`. The tsp-client init command runs sync and generate under the hood, so generation is complete after the init concludes. If the tspconfig.yaml value is a path to a local file, you can mention that the user will have to populate the values in tsp-location.yaml themselves.
20
20
- If prompted to update the SDK use the command `npx @azure-tools/typespec-client-generator-cli update`.
21
21
- If prompted to generate the SDK use the command `npx @azure-tools/typespec-client-generator-cli generate`.
22
22
- If prompted to sync the SDK use the command `npx @azure-tools/typespec-client-generator-cli sync`.
23
23
- If prompted to sync with local code use the command `npx @azure-tools/typespec-client-generator-cli sync --local-spec-repo [path to local azure-rest-api-specs repo]`.
24
-
- If syncing from a local repo, do not grab a commit hash and do not manually create directories. The command will create the directories for you.
24
+
- If syncing from a local repo, do not grab a commit hash.
25
+
- Do not manually create directories. The command will create the directories for you.
25
26
- If asked to sync or generate `package-name` we need to find the path to the package's tsp-location.yaml in the azure-sdk-for-python repo and run the command in the same directory.
26
27
27
28
2. After generation is complete, validate the output by:
@@ -33,6 +34,13 @@ Initialize and validate a TypeSpec client library for Azure SDK for Python. Plea
33
34
34
35
3. If any errors or warnings are found, after running all validation checks provide guidance on fixing them following Azure SDK best practices.
35
36
37
+
4. After the above steps, let's use the GitHub mcp tool to create a pull request with the changes. The pull request should include:
38
+
- A title that describes the changes made.
39
+
- A description that includes the following:
40
+
- A summary of the changes made.
41
+
- A list of any issues or warnings found during validation and how they were fixed.
42
+
- Any additional notes or comments about the changes made.
43
+
36
44
Please use Python 3.9 for compatibility, and refer to the Azure SDK design guidelines (https://azure.github.io/azure-sdk/python_design.html) for any implementation decisions.
0 commit comments