-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Python Module Rewrite #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…GitHub Copilot in Python
…s for better understanding
…t Mode and enhance context for instructions files
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request modernizes the documentation for GitHub Copilot tutorials in both Python and C# modules, transforming them from basic usage guides into comprehensive, hands-on learning experiences with structured sections and clear learning objectives.
- Complete restructuring of content with learning goals and multi-section organization
- Introduction of GitHub Copilot Agent Mode and Model Context Protocol coverage
- Enhanced instructions for inline suggestions, Next Edit Suggestions, and custom instructions
Reviewed Changes
Copilot reviewed 2 out of 14 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
Using-GitHub-Copilot-with-Python/README.md | Major rewrite with new sections on project exploration, code completion, Agent Mode, and customization features |
Using-GitHub-Copilot-with-CSharp/README.md | Updates to add learning goals, improve section numbering, fix alt text descriptions, and enhance formatting consistency |
- **What you'll build**: Python files that will have code generated by Copilot AI for code and comment suggestions. | ||
- **Prerequisites**: GitHub Copilot is available to use for free, sign up for [GitHub Copilot](https://gh.io/copilot). | ||
- **Timing**: This module can be completed in under an hour. | ||
|
||
By the end of this module, you'll aquire the skills to be able to: | ||
By the end of this module, you'll acquire the skills to be able to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed spelling error: 'aquire' should be 'acquire'
Copilot uses AI. Check for mistakes.
|
||
GitHub Copilot instructions files are markdown documents that provide essential context to guide Copilot’s behavior within a specific codebase. These files help tailor AI-generated suggestions to match your team’s coding standards, architectural patterns, naming conventions, testing strategies, and deployment practices. There are two types of instructions files: global instructions, which apply to the entire repository and are stored in `copilot-instructions.md`, and scoped instructions, which apply only to specific files or folders and are placed in `.github/instructions/*instructions.md`. | ||
|
||
By supplying Copilot with detailed project context, instructions files significantly improve the relevance and accuracy of its code suggestions. For example, if your project uses Blazor and ASP.NET Core, Copilot can generate components that follow your preferred structure, use modern Python features, and adhere to your naming conventions. This leads to more consistent code and reduces the need for manual corrections or lengthy code reviews. Instructions files also enhance Copilot’s ability to generate meaningful tests and documentation. With the right context, Copilot can suggest unit tests using unittest or pytest, integration tests with tools like requests or httpx, and even add docstrings or OpenAPI annotations to your FastAPI or Flask endpoints. When refactoring or adding new features, Copilot respects your dependency injection setup, configuration patterns, and error-handling strategies, making it a smarter and more reliable assistant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence mentions 'Blazor and ASP.NET Core' in a Python tutorial, but then talks about 'modern Python features'. This is inconsistent - it should reference Python frameworks like FastAPI, Django, or Flask instead of .NET technologies.
By supplying Copilot with detailed project context, instructions files significantly improve the relevance and accuracy of its code suggestions. For example, if your project uses Blazor and ASP.NET Core, Copilot can generate components that follow your preferred structure, use modern Python features, and adhere to your naming conventions. This leads to more consistent code and reduces the need for manual corrections or lengthy code reviews. Instructions files also enhance Copilot’s ability to generate meaningful tests and documentation. With the right context, Copilot can suggest unit tests using unittest or pytest, integration tests with tools like requests or httpx, and even add docstrings or OpenAPI annotations to your FastAPI or Flask endpoints. When refactoring or adding new features, Copilot respects your dependency injection setup, configuration patterns, and error-handling strategies, making it a smarter and more reliable assistant. | |
By supplying Copilot with detailed project context, instructions files significantly improve the relevance and accuracy of its code suggestions. For example, if your project uses Django, FastAPI, or Flask, Copilot can generate components that follow your preferred structure, use modern Python features, and adhere to your naming conventions. This leads to more consistent code and reduces the need for manual corrections or lengthy code reviews. Instructions files also enhance Copilot’s ability to generate meaningful tests and documentation. With the right context, Copilot can suggest unit tests using unittest or pytest, integration tests with tools like requests or httpx, and even add docstrings or OpenAPI annotations to your FastAPI or Flask endpoints. When refactoring or adding new features, Copilot respects your dependency injection setup, configuration patterns, and error-handling strategies, making it a smarter and more reliable assistant. |
Copilot uses AI. Check for mistakes.
|
||
```md | ||
**Code Structure Issues Fixed** | ||
- Replaced JavaScript-style comment () with proper Python comments (#) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment about 'JavaScript-style comment ()' is unclear. It should specify what JavaScript-style comment syntax was replaced, such as '// comments' or '/* comments */'.
- Replaced JavaScript-style comment () with proper Python comments (#) | |
- Replaced JavaScript-style single-line comments (//) with proper Python comments (#) |
Copilot uses AI. Check for mistakes.
@@ -124,19 +132,19 @@ The output should be similar to this: | |||
<img src="./images/006internalrecord.jpg" alt="changes to existing record" width="500" height="300"> | |||
</div> | |||
|
|||
4. Now we want to use the inline feature of Copilot. Using the inline feature we can focus on the code in front of us and make progressive changes as needed in our code base. Next, we will create a new C# class by creating a new file under the `Backend` folder: `SampleApp\BackEnd\Customer.cs`. | |||
1. Now we want to use the inline feature of Copilot. When using the inline feature we can focus on the code in front of us and make progressive changes as needed in our code base. Next, we will create a new C# class by creating a new file under the `Backend` folder: `SampleApp\BackEnd\Customer.cs`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The numbering is inconsistent. This should be '4.' to continue the sequence from the previous numbered steps, not '1.'
1. Now we want to use the inline feature of Copilot. When using the inline feature we can focus on the code in front of us and make progressive changes as needed in our code base. Next, we will create a new C# class by creating a new file under the `Backend` folder: `SampleApp\BackEnd\Customer.cs`. | |
4. Now we want to use the inline feature of Copilot. When using the inline feature we can focus on the code in front of us and make progressive changes as needed in our code base. Next, we will create a new C# class by creating a new file under the `Backend` folder: `SampleApp\BackEnd\Customer.cs`. |
Copilot uses AI. Check for mistakes.
This pull request updates the documentation for using GitHub Copilot with C# and Python, focusing on improving clarity, adding learning goals, and refining instructions. Key changes include rephrasing steps for better readability, introducing learning goals in specific sections, and enhancing descriptions of Copilot's features and capabilities.