Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
-
-

## AI-Use Disclosure
<!-- Contributors must disclose whether and how AI tools were used and highlight any areas of uncertainty or where they want focused reviewer feedback -->

Comment thread
blnicho marked this conversation as resolved.
### Legal Acknowledgement

By contributing to this software project, I have read the [contribution guide](https://pyomo.readthedocs.io/en/stable/contribution_guide.html) and agree to the following terms and conditions for my contribution:
Expand Down
34 changes: 33 additions & 1 deletion doc/OnlineDocs/contribution_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Comment thread
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
Comment thread
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But maybe I should not do that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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
--------------

Expand Down
Loading