Repository navigation
Adding agents.md file to H2I repository - #950
genevievestarke wants to merge 2 commits into
Conversation
RHammond2
left a comment
There was a problem hiding this comment.
I've added a few comments, though based on today's meeting I believe there will be some further revisions, and didn't do a complete review. In general, this could be a good opportunity to split up some of our contributing guidelines and use more actionable language within them, and reference those documents here.
|
|
||
| ## Python style and checks | ||
|
|
||
| - Target Python 3.13 and a maximum line length of 100 characters. Follow PEP 8 and the local Ruff |
There was a problem hiding this comment.
We technically target the minimum Python to ensure compatibility with lower-versioned environments, which is 3.11 here.
| - Call `super().setup()` where required by the base class so standard OpenMDAO inputs and outputs | ||
| are registered. Preserve units, port names, output contracts, and control behavior. | ||
|
|
||
| ## Python style and checks |
There was a problem hiding this comment.
I would just offload this section to point towards our contributor's guidelines (similar to pandas or scikit-learn) and listing the specific command that should be run (below).
- Run
pre-commit run --from-ref=upstream/develop --to-ref=HEAD --all-files
There was a problem hiding this comment.
Are you suggesting we add the specific command to the docs and refer the agents.md file there, or directly in the agents.md file?
There was a problem hiding this comment.
That's a good question. Maybe in here for now since this is the only agent-specific infrastructure. I think some of our code contributing guides will need to be revamped in conjunction with our AI strategy, but that may already be underway and I'm unaware.
| - Follow existing package/module organization and reuse the relevant base class, shared fixtures, | ||
| configuration patterns, and helpers rather than introducing parallel abstractions. |
There was a problem hiding this comment.
We should likely expand on this to fully delineate the package structure.
| - Use descriptive `lowercase_with_underscores` names and add type hints to function parameters and | ||
| return values. Use NumPy arrays for array data rather than Python lists. |
There was a problem hiding this comment.
I believe ruff will flag bad variable names, and this is Python, so snake case variables is the expectation. If we still need this, it's better suited for the code style/conventions section.
| - Use an attrs configuration class (`@define(kw_only=True)`) based on the appropriate existing | ||
| config class. Name model-specific config classes `{ModelName}Config`, validate inputs with the | ||
| existing config mechanisms, and instantiate the config in `setup()`. | ||
| - Call `super().setup()` where required by the base class so standard OpenMDAO inputs and outputs |
There was a problem hiding this comment.
also super().initialize() where required by the base class so that standard OpenMDAO options are registered.
| - Update relevant user/developer documentation and docstrings when behavior, configuration, | ||
| model interfaces, or examples change. Keep explanations clear and concise, and keep examples | ||
| executable and consistent with the current API. | ||
| - Use Google-style docstrings for functions, methods, and classes. Describe purpose, important |
There was a problem hiding this comment.
For functions and methods, include the Args and Returns sections in the doc-strings.
There was a problem hiding this comment.
Change Args to Attributes based on #999
|
Posting connection to my related comment and attached agents.md file in issue #976 (#976 (comment)) |
|
This PR is now updated from feedback! I took a longer approach for the file for now, although the pandas and scikit examples are very short and point to the documentation. I personally like the longer version as it's a nice place to gather the essentials of the code into one place, but it might also be hard to keep it up to date moving forwards. Let me know if you prefer a longer, more specific agents.md file, or a shorter one! |
| configuration, templates, or generators instead. | ||
| - Defer documentation updates until the user confirms code work is complete, approves all code changes, and all | ||
| required tests pass. Only then update affected documentation. Do not build the documentation unless the user explicitly requests it. | ||
| - Append "(AI)" to inline comments written by an agent (not docstrings) |
elenya-grant
left a comment
There was a problem hiding this comment.
this looks good to me Gen! Thank you!
Adding agents.md file to H2I repository
This PR puts forth an agents.md file for the H2I repository to establish repository norms across the code. The information for this file was taken from the H2I documentation and edited to be what I thought would be good to define at a general level.
Type of Contribution
Draft PR Checklist
TODO
Type of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
Some general questions:
Other feedback:
General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Related Issues
[N/A or appropriately link related issues]
Impacted Areas of the Software
New Files
path/to/file.extensionmethod1: What and why something was changed in one sentence or less.Modified Files
path/to/file.extensionmethod1: What and why something was changed in one sentence or less.Release checklist
h2integrate/__init__.py