Skip to content

Commit f6e5829

Browse files
sbryngelsonclaude
andcommitted
Address AI reviewer feedback: fix configs, harden lint_docs, add Python 3.10+ guidance
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f277456 commit f6e5829

6 files changed

Lines changed: 9 additions & 6 deletions

File tree

.coderabbit.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2-
language: en-us
2+
language: en-US
33

44
reviews:
55
profile: chill
@@ -15,7 +15,8 @@ reviews:
1515
docs/documentation/contributing.md.
1616
- path: "toolchain/**/*.py"
1717
instructions: |
18-
Python toolchain code. Follow PEP 8.
18+
Python toolchain code. Follow PEP 8. Requires Python 3.10+;
19+
do not suggest __future__ imports or backwards-compatibility shims.
1920
2021
knowledge_base:
2122
code_guidelines:

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We welcome contributions of all kinds -- bug fixes, new features, documentation, tests, and issue triage.
44

5-
**Full developer guide:** [mflowcode.github.io/documentation/md_contributing.html](https://mflowcode.github.io/documentation/contributing.html)
5+
**Full developer guide:** [mflowcode.github.io/documentation/contributing.html](https://mflowcode.github.io/documentation/contributing.html)
66

77
## Quick Reference
88

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Formatting and linting are enforced by pre-commit hooks. Focus review effort on
1919
* Only `simulation` (plus its `common` dependencies) is GPU-accelerated via **OpenACC**.
2020
* Code must compile with **GNU gfortran**, **NVIDIA nvfortran**, **Cray ftn**, and **Intel ifx**.
2121
* Precision modes: double (default), single, and mixed (`wp` = working precision, `stp` = storage precision).
22+
* **Python toolchain** requires **Python 3.10+** — do not suggest `from __future__` imports or other backwards-compatibility shims.
2223

2324
---
2425

.pr_agent.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ correctness (pack/unpack offsets, GPU data coherence), precision mixing
1919
consistency (pressure formula must match model_eqns), missing case_validator.py
2020
constraints for new parameters, and compiler portability across all four
2121
supported compilers.
22+
Python toolchain requires Python 3.10+; do not suggest __future__ imports
23+
or other backwards-compatibility shims.
2224
"""
2325

2426
[pr_code_suggestions]

toolchain/bootstrap/precheck.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ log "[$CYAN 5/5$COLOR_RESET] Checking$MAGENTA doc references$COLOR_RESET..."
132132
if python3 toolchain/mfc/lint_docs.py 2>&1; then
133133
ok "Doc references are valid."
134134
else
135+
error "Doc reference check failed. Run$MAGENTA python3 toolchain/mfc/lint_docs.py$COLOR_RESET for details."
135136
FAILED=1
136137
fi
137138

toolchain/mfc/lint_docs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
"docs/documentation/running.md",
1212
"docs/documentation/case.md",
1313
".github/copilot-instructions.md",
14-
".pr_agent.toml",
15-
".coderabbit.yaml",
1614
]
1715

1816
# Match backtick-wrapped strings that look like repo-relative file paths
@@ -28,7 +26,7 @@ def check_docs(repo_root: Path) -> list[str]:
2826
doc_path = repo_root / doc
2927
if not doc_path.exists():
3028
continue
31-
text = doc_path.read_text()
29+
text = doc_path.read_text(encoding="utf-8")
3230
for match in PATH_RE.finditer(text):
3331
path_str = match.group(1)
3432
if SKIP_RE.search(path_str):

0 commit comments

Comments
 (0)