ci(blueprint): add Python linting and unit tests to PR workflow#462
ci(blueprint): add Python linting and unit tests to PR workflow#462Bortlesboat wants to merge 0 commit intoNVIDIA:mainfrom
Conversation
📝 WalkthroughWalkthroughAdded CI and Makefile testing targets: a new GitHub Actions job Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pr.yaml:
- Around line 54-67: The Install uv step using the astral-sh/setup-uv@v6 action
does not pin a Python interpreter; update the "Install uv" job step to include
the python-version input (e.g., python-version: '3.11.x' or a specific patch
like '3.11.4') so the setup-uv action installs a deterministic Python runtime;
modify the action invocation for astronomal-sh/setup-uv@v6 in the "Install uv"
step to include that python-version input.
In `@nemoclaw-blueprint/Makefile`:
- Around line 14-15: Update the Makefile test target to invoke the same command
used by CI: replace the current python -m pytest invocation in the test target
with uv run --extra test pytest tests/ -v so local runs match CI; modify the
"test" target in the Makefile to call uv run --extra test pytest tests/ -v
(keeping the target name "test") ensuring developers without a global pytest
still run tests via the project's uv environment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c79ea357-c609-46ad-952c-0e6eb2d3c18a
📒 Files selected for processing (3)
.github/workflows/pr.yamlMakefilenemoclaw-blueprint/Makefile
|
Thanks for adding Python linting and unit tests to the PR workflow, this can help ensure the Python code is correct and stable. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
nemoclaw-blueprint/Makefile (1)
1-1: Consider resolving checkmake’sall/cleanphony warnings.Line 1 still triggers checkmake
minphonywarnings for missingallandclean. If this rule is enforced, adding lightweight targets (or adjusting checkmake config) will keep Makefile lint clean.Possible Makefile adjustment
-.PHONY: lint format check test +.PHONY: all clean lint format check test + +all: check + +clean: + `@true`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@nemoclaw-blueprint/Makefile` at line 1, The Makefile currently declares .PHONY: lint format check test but checkmake warns about missing phony targets all and clean; add lightweight targets named all and clean and include them in the .PHONY line so the linter stops complaining. For example, add an all: target that depends on a sensible default like check or test (e.g., all: check) and a minimal clean: target that removes generated artifacts or is a no-op (e.g., clean: ; `@echo` "nothing to clean") and update .PHONY to: .PHONY: all clean lint format check test to reference the unique symbols (.PHONY, all, clean, lint, format, check, test).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@nemoclaw-blueprint/Makefile`:
- Line 1: The Makefile currently declares .PHONY: lint format check test but
checkmake warns about missing phony targets all and clean; add lightweight
targets named all and clean and include them in the .PHONY line so the linter
stops complaining. For example, add an all: target that depends on a sensible
default like check or test (e.g., all: check) and a minimal clean: target that
removes generated artifacts or is a no-op (e.g., clean: ; `@echo` "nothing to
clean") and update .PHONY to: .PHONY: all clean lint format check test to
reference the unique symbols (.PHONY, all, clean, lint, format, check, test).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7fe74edc-577f-406e-b6d3-a6727e33feb9
📒 Files selected for processing (2)
.github/workflows/pr.yamlnemoclaw-blueprint/Makefile
✅ Files skipped from review due to trivial changes (1)
- .github/workflows/pr.yaml
|
Thanks @wscurran! Addressed the CodeRabbit feedback in the latest commit — pinned Python 3.12 and matched the Makefile test target to CI. Happy to add the /\ phony targets too if you'd like, though it's cosmetic. |
|
Thanks for adding Python linting and unit tests to the PR workflow — the blueprint CI coverage is important. The CI configuration has changed significantly since March. Could you rebase against main and verify the workflow additions still fit the current CI structure? Note this is from the same contributor as #460 — a joint rebase on both would be ideal. |
ae332b3 to
230d27e
Compare
|
Rebased this branch to current The March
I refreshed this branch and companion PR #460 to current |
Summary
The PR CI workflow only runs JavaScript/TypeScript tests — the Python blueprint code has no CI coverage. This adds a
test-blueprintjob to.github/workflows/pr.yamlthat:astral-sh/setup-uv@v6ruff checkandruff format --checkon the blueprintpytest tests/ -vusing the test extra from pyproject.tomlAlso adds
make test/make test-pytargets to both root and blueprint Makefiles for local parity with CI.Companion to #460 which adds the test suite itself.
Changes
.github/workflows/pr.yaml— newtest-blueprintjob (5 min timeout)Makefile— addtestandtest-pyphony targetsnemoclaw-blueprint/Makefile— addtestphony targetTest plan
actionlintpatterns)make test-pyruns locally and passesSummary by CodeRabbit