Add copilot-instructions.md #3936
Add copilot-instructions.md #3936AlexanderDokuchaev wants to merge 2 commits intoopenvinotoolkit:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a Copilot instructions file to provide automated code review guidance based on the NNCF Python style guide. The file consolidates key coding standards from PyGuide.md into a concise format for GitHub Copilot to reference during pull request reviews.
Changes:
- Added
.github/copilot-instructions.mdwith Python code style guidelines derived from the project's PyGuide.md - Includes language rules, style rules, naming conventions, test suite guidelines, and review focus areas
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c4ad30a to
0e153b4
Compare
| - Avoid comment about formatting issues, focus on code logic and style | ||
| - Ensure that appropriate tests are added for the new code, and that they are well-structured, clear, and comply with the testing guidelines | ||
| - Check for proper exception handling and informative error messages | ||
| - Ensure that code is modular, reusable, and avoids unnecessary complexity |
There was a problem hiding this comment.
| - Ensure that code is modular, reusable, and avoids unnecessary complexity | |
| - Ensure that code is modular, reusable, and avoids unnecessary complexity | |
| - Request documentation updates whenever a public API or observable behavior changes |
There was a problem hiding this comment.
Without a definition of a public API, this is too general a concept.
Public API can be interpolated as any function/method/class that does not starts from _
There was a problem hiding this comment.
agree, it's hard to define, but it doesn't mean that it's not needed.
I believe it would be beneficial to record alterations in the library's behavior within the pull request that implements these changes.
what about this phrasing?
Request documentation updates whenever a change affects the library’s public API — meaning any documented, officially supported, or semantically stable behavior that users rely on.
|
|
||
| When reviewing code or suggesting changes, adhere to the following logic-first rules: | ||
|
|
||
| - Look for performance issues, potential bottlenecks and memory leaks |
There was a problem hiding this comment.
| - Look for performance issues, potential bottlenecks and memory leaks | |
| - If a contribution appears to be machine‑generated or automated, ask the author to confirm human review before approval | |
| - Look for performance issues, potential bottlenecks and memory leaks |
😆
There was a problem hiding this comment.
Since artificial intelligence is integrated into the IDE, it can be assumed that each PR includes machine-generated code.
Human review should be part of contribution guide, ai policy or PR template
There was a problem hiding this comment.
The manual review is also required by SDL.
There was a problem hiding this comment.
probably phrasing is not right. The idea was to create an instruction to catch/filter PR's that were generated fully by bots (without participation of humans).
Changes
Added on copilot-instructions.md based on https://github.com/openvinotoolkit/nncf/blob/develop/docs/styleguide/PyGuide.md
Reason for changes
To provide more control over the Copilot review process. This file may include additional instructions to refine review criteria and prevent unnecessary or irrelevant comments.