-
Notifications
You must be signed in to change notification settings - Fork 132
Add developer guide, streamline PR template, AI reviewers #1134
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
Conversation
- Add docs/documentation/contributing.md as canonical developer guide with coding standards (hard rules + soft guidelines), fork-based workflow, testing, and PR process - Streamline PR template: fewer checkboxes, collapsible GPU section - Update copilot-instructions.md: soften size/arg limits, require GPU macros over raw pragmas - Add .coderabbit.yaml pointing to copilot-instructions.md via code_guidelines - Add .codeant/configuration.json for file include/exclude - Update .pr_agent.toml to reference coding standards - Slim .github/CONTRIBUTING.md to pointer to docs site - Link contributing page from docs readme Co-Authored-By: Claude Opus 4.6 <[email protected]>
… AI reviewer configs - Add Common Pitfalls section to contributing.md covering array bounds, precision, memory, MPI, physics model consistency, Python toolchain, compiler portability - Add 10 step-by-step How-To Guides: adding parameters, GPU parallel loops, GPU array allocation, test cases, new modules, precision system, MPI halo exchange, post-process variables, src/common/ changes, GPU debugging - Slim copilot-instructions.md to project context + priority list pointing to contributing.md as single source of truth - Update .pr_agent.toml and .coderabbit.yaml to reference all three canonical files Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ation Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ern triggers - Add Architecture Overview section: three-phase pipeline, directory layout, simulation data flow, key data structures, build toolchain - Add CI Pipeline section: lint gate checks, build/test matrix, HPC runners, common CI failures and fixes table - Add PR-pattern triggers to copilot-instructions.md for AI reviewers to flag common mistakes (missing parameter pipeline steps, ALLOCATE/DEALLOCATE pairing, stale doc references, missing tests) - Replace inline GPU debugging tables with link to troubleshooting page - Add cross-references to parameters, case_constraints, and troubleshooting pages - Fix CONTRIBUTING.md docs site URL - Remove overly specific domain transposition guidance Co-Authored-By: Claude Opus 4.6 <[email protected]>
- New toolchain/mfc/lint_docs.py: extracts file paths from documentation markdown files and verifies they exist in the repo - Integrated as step 5/5 in precheck.sh (runs on every commit) - Scans contributing.md, gpuParallelization.md, running.md, case.md, copilot-instructions.md, .pr_agent.toml, and .coderabbit.yaml - Fix stale file paths in case.md: hardcoded IC files are in src/common/include/, not src/pre_process/include/ Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Remove "tests pass locally" checklist item (CI enforces this) - Remove compiler checklist items from GPU section (CI tests these) - Remove "Consider" profiling/scaling lines (noise for most PRs) - Narrow GPU section trigger to src/simulation/ (only GPU-accelerated target) - Simplify testing prompt to open-ended question - Fix developer guide URL Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 8. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
Warning Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories. 📝 WalkthroughWalkthroughAdds code-review/editor integration configs, rewrites GitHub contributor/Copilot/PR templates, adds a full contributing guide and docs updates, and integrates a new documentation reference linter into the precheck pipeline with an accompanying Python script. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Precheck as "precheck.sh"
participant Linter as "toolchain/mfc/lint_docs.py"
participant RepoFS as "Repository FS"
participant CI as "CI / User"
CI->>Precheck: run precheck
Precheck->>Precheck: run formatting, spell, lint steps (1-4)
Precheck->>Linter: execute doc reference check (step 5)
Linter->>RepoFS: read doc files & resolve backtick paths
RepoFS-->>Linter: return file existence results
Linter-->>Precheck: report missing references (errors) or success
Precheck->>CI: exit with status (fail if linter found issues)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 11 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In @.coderabbit.yaml:
- Line 2: The language value in .coderabbit.yaml uses the wrong case ("language:
en-us"); update the language key to match the schema enum exactly by replacing
it with "en-US" (capitalized country code). Locate the top-level "language"
entry and change its value to "en-US" so it validates against the schema.
In @.github/CONTRIBUTING.md:
- Line 5: The markdown link text and target URL are inconsistent: the visible
text shows "mflowcode.github.io/documentation/md_contributing.html" while the
href points to "contributing.html"; update the markdown so the display text
matches the actual URL (or vice versa) in the line containing the link (the link
markdown with visible text
"mflowcode.github.io/documentation/md_contributing.html"), ensuring both the
anchor text and the href reference the same file name (either
md_contributing.html or contributing.html).
In `@docs/documentation/case.md`:
- Around line 239-241: Update the incorrect file pattern
"1[2,3]dHardcodedIC.fpp" in the docs to the correct pattern
"[1,2,3]dHardcodedIC.fpp" (or explicitly list "1dHardcodedIC.fpp,
2dHardcodedIC.fpp, 3dHardcodedIC.fpp") wherever the erroneous
"1[2,3]dHardcodedIC.fpp" string appears (see the documented example and the
referenced mention of patch_icpp(patch_id)%%hcid for context).
In `@docs/documentation/contributing.md`:
- Line 695: Replace the lowercase "markdown" with the proper noun "Markdown" in
the contributing guideline line that currently reads "Update **markdown docs**
under `docs/` if user-facing behavior changes" so it reads "Update **Markdown
docs** under `docs/` if user-facing behavior changes"; edit that text in
docs/documentation/contributing.md (the contributing guideline sentence) to
apply the capitalization fix.
In `@toolchain/mfc/lint_docs.py`:
- Around line 14-15: DOCS contains entries ".pr_agent.toml" and
".coderabbit.yaml" which won't match PATH_RE because they include bare TOML/YAML
paths not wrapped in backticks; remove these two strings from the DOCS list (or
alternatively update PATH_RE in the same module to also match bare string values
in TOML/YAML) so lint_docs.py's DOCS list only contains files whose path
patterns will be found by PATH_RE (refer to the DOCS variable and the PATH_RE
regex in this file).
🧹 Nitpick comments (3)
docs/documentation/contributing.md (1)
56-64: Add a language identifier to the fenced code block.Markdownlint flags this block (MD040). Since it's a text diagram, use
textorplaintextas the language identifier.Suggested fix
-``` +```text q_cons_vf (conservative variables: density, momentum, energy, volume fractions)toolchain/mfc/lint_docs.py (1)
27-30: Silently skipping missing doc files may hide breakage.If a file in
DOCSis renamed or deleted, this script won't report that the doc itself is gone — it just skips it. Consider logging a warning (or even treating it as an error) when a listed doc doesn't exist, so renames are caught early.Proposed fix
doc_path = repo_root / doc if not doc_path.exists(): + errors.append(f" Doc file '{doc}' listed in DOCS but does not exist") continuetoolchain/bootstrap/precheck.sh (1)
130-136: Minor inconsistency: no expliciterrormessage on failure, unlike other steps.The other steps call
error "..."on failure to provide a uniform log style. Step 5 relies onlint_docs.pyto print its own error output, which works but looks different from the rest. Consider adding anerrorcall for consistency:Proposed fix
if python3 toolchain/mfc/lint_docs.py 2>&1; then ok "Doc references are valid." else + error "Doc reference check failed. See above for details." FAILED=1 fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a comprehensive developer guide, streamlines the pull request template, and configures multiple AI code review tools to reference the new documentation. The changes consolidate scattered contribution guidelines into a single, authoritative source and add automated validation for documentation file references.
Changes:
- Adds comprehensive developer guide at
docs/documentation/contributing.mdcovering architecture, coding standards, common pitfalls, and step-by-step how-to guides - Introduces
toolchain/mfc/lint_docs.pyto automatically validate that file paths referenced in documentation actually exist - Streamlines PR template and
.github/CONTRIBUTING.mdto redirect to the full developer guide - Updates AI reviewer configurations (
.pr_agent.toml,.github/copilot-instructions.md,.coderabbit.yaml,.codeant/configuration.json) to reference the new documentation - Corrects hardcoded IC file path references in
docs/documentation/case.mdfromsrc/pre_process/include/tosrc/common/include/ - Adds doc reference check as step 5/5 in
toolchain/bootstrap/precheck.sh
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
toolchain/mfc/lint_docs.py |
New linting script that validates file path references in documentation remain accurate |
toolchain/bootstrap/precheck.sh |
Updates step numbering (1/4→1/5, etc.) and adds doc reference check as final step |
docs/documentation/readme.md |
Adds "Development" section with link to contributing guide |
docs/documentation/contributing.md |
New comprehensive 715-line developer guide covering architecture, standards, pitfalls, and how-to guides |
docs/documentation/case.md |
Corrects hardcoded IC patch file paths from src/pre_process/include/ to src/common/include/ |
.pr_agent.toml |
Updates instructions to reference new documentation structure and prioritize correctness over style |
.github/copilot-instructions.md |
Streamlines and generalizes for multiple AI reviewers, references contributing.md for details |
.github/CONTRIBUTING.md |
Simplifies to redirect to full developer guide with quick reference |
.github/pull_request_template.md |
Streamlines from 58 to 32 lines, focuses on essentials, links to developer guide |
.coderabbit.yaml |
New configuration file for CodeRabbit AI reviewer |
.codeant/configuration.json |
New configuration file for CodeAnt AI reviewer |
…on 3.10+ guidance Co-Authored-By: Claude Opus 4.6 <[email protected]>
User description
PR Type
Documentation, Enhancement
Description
Add comprehensive developer guide with coding standards, architecture overview, and how-to guides
Streamline PR template and contributing docs; consolidate AI reviewer configurations
Add documentation linting tool to verify file path references in docs
Update precheck script to include doc reference validation as 5th check
Diagram Walkthrough
File Walkthrough
2 files
New tool to validate documentation file referencesAdd doc reference check as 5th precheck step3 files
New CodeAnt AI reviewer configuration fileNew CodeRabbit AI reviewer configuration with path instructionsUpdate PR Agent config to reference canonical documentation files6 files
Slim to pointer to canonical developer guideConsolidate AI reviewer instructions with references to canonical docsStreamline PR template with fewer checkboxes and collapsible GPUsectionFix file path references to src/common/ hardcoded IC filesAdd comprehensive 715-line developer guide with standards, pitfalls,and how-tosAdd Development section linking to contributing guideCodeAnt-AI Description
Add a canonical developer guide, AI reviewer configs, and a doc reference checker
What Changed
Impact
✅ Clearer contributor onboarding and expectations✅ Fewer broken documentation links detected before push✅ More focused AI/code-review feedback on correctness and GPU/MPI pitfalls💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit
Documentation
Tests & Tooling
Chores