AI code policy, and AI-assissted function rewrites#764
AI code policy, and AI-assissted function rewrites#764jkirk5 merged 10 commits intoOpenMDAO:mainfrom
Conversation
- AI was used to suggest code improvements
Manual docstring update
hschilling
left a comment
There was a problem hiding this comment.
We can always change it but it is important to get our best effort policy out there sooner rather than later.
|
|
||
| ## 1. Disclose any use of AI | ||
|
|
||
| Any use of AI tools should be clearly disclosed. It is helpful to separate AI-generated code into their own commits, but is not always possible. Mention that AI was used in the commit messages. Give additional details in your pull request descriptions about how AI was used. Include a brief explanation of what you used the AI for (debugging, generating new code, etc.), which model you used, and which files were affected. |
There was a problem hiding this comment.
I am not sure the AI code included in this PR complies with #1.
There was a problem hiding this comment.
Cursor doesn't disclose which model(s?) it uses, so I don't actually have that information
ehariton
left a comment
There was a problem hiding this comment.
If we want to disclose use of AI, we should add a checkbox and and prompt on the PR page.
Was AI Used In this PR Y/N
- Was AI Used to Generate Data Y/N
- Did you use AI to generate unit tests Y/N
- What unit tests cover this code?
- Did you use AI to generate documentation Y/N
|
Given a component, can AI help summarize its functionality? Can AI create necessary unit tests or at least give a list of necessary unit tests? |
AI is decent at summarizing code, so it may be useful as a starting place for writing docstrings. AI should not be used for writing unittests (policy item 3), since we need to be careful about which cases we run and have good values for our "truth" data |
Summary
Adds documentation page on our AI use policy.
Used AI (through cursor, which does not disclose models used) to resolve 2 TODOs in engine_deck.py by modifying existing code.
extend_array()and_hybrid_throttle_norm()are the two functions with AI-written code.Some additional manual cleanup, review, and formatting of that file, including updated docstrings to reflect new code.
Related Issues
Backwards incompatibilities
None
New Dependencies
None