-
Notifications
You must be signed in to change notification settings - Fork 577
Add AI policy to contribution guide #3959
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
72d6fa2
fc2b4d6
efffd2a
ea83451
d443547
be9df8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,7 +158,39 @@ For example, assume Python 3.A is declared end-of-life while Pyomo is on | |
| version 6.3.Y. After the release of Pyomo 6.3.(Y+1), Python 3.A will be removed, | ||
| and the next Pyomo release will be 6.4.0. | ||
|
|
||
|
|
||
| Use of Generative AI | ||
| ++++++++++++++++++++ | ||
|
|
||
| Pyomo contributors are welcome to use AI-assisted coding tools (e.g., Copilot/Codex) to | ||
| draft code, tests, documentation, and commit messages. However, the author remains fully | ||
| responsible for the correctness, security, licensing compliance, and maintainability of | ||
| every changed line and must be prepared to explain design choices and review changed | ||
| code personally before submitting. The use of PR and issue templates is mandatory and | ||
| contributions that do not use the templates will be closed. | ||
|
|
||
| PRs with substantial AI-generated portions often require significantly more reviewer | ||
| time (including extra scrutiny of tests) and may therefore take longer to review or be | ||
| deprioritized, especially when the author is not actively engaging with maintainers | ||
| (e.g., responding promptly on the PR, coordinating by email, or participating in | ||
| developer calls). To help us review efficiently, contributors must disclose whether and | ||
| how AI tools were used and highlight any areas of uncertainty or where they want focused | ||
| reviewer feedback. | ||
|
|
||
| The use of an AI agent to autonomously open, or comment on, PRs or issues is not | ||
| permitted. When interacting with maintainers please do not use AI to speak for you. | ||
|
|
||
| We recognize that generative AI tools are rapidly evolving and this AI contribution | ||
| policy will be updated regularly based on our observations. The following list includes | ||
| specific items we are seeing with AI-generated code contributions and our expectations: | ||
|
|
||
| * **Use of `mock` in unit tests is prohibited**: We do not allow the use of `mock` | ||
|
blnicho marked this conversation as resolved.
Outdated
|
||
| in our unit tests unless the developer can explain why they can't do unit testing | ||
| without it. We have observed that AI-generated unit tests excessively use `mock` to | ||
|
blnicho marked this conversation as resolved.
Outdated
|
||
| write weak tests that ignore the broader context of the code being tested. | ||
| * **Keep comments concise and curated**: Humans are reading every comment on every | ||
| PR and issue. Help us out by keeping comments short and direct. PR review comments | ||
| can be marked as resolved without commenting "Done" on every one. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am hesitant about the second sentence on PR review comments. We have gone back and forth about how people should resolve comments (e.g., should they wait until the reviewer says it's good?).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I often respond to comments (manually) saying I have completed a requested change.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But maybe I should not do that?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that's why I don't think I like the guidance here. Even we don't universally follow this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine with removing it and will make that change. |
||
|
|
||
| Review Process | ||
| -------------- | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.