Skip to content

curriculum: add actionable assertion messages to functional7-9 checks - #165

Merged
abhiksark merged 8 commits into
abhiksark:devfrom
mercael91:fix/issue-87
Nov 4, 2026
Merged

abhiksark merged 8 commits into
abhiksark:devfrom
mercael91:fix/issue-87

Conversation

@mercael91

@mercael91 mercael91 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #87.

Adds beginner-facing messages to all 8 bare assertions named in the issue:

  • checks/functional/functional7.py: 2
  • checks/functional/functional8.py: 2
  • checks/functional/functional9.py: 4

Messages state the expected value (e.g. product of [2, 3, 4] should be 24,
all(x > 0 for x in [1, -2, 3]) should be False: -2 is not > 0) and never
re-call the learner's function, per CONTRIBUTING.md. Every assertion
predicate, side effect and success print is unchanged.

tests/test_functional_assertion_messages.py guards both rules for this batch:
no bare assert in the three files, and no line over 80 columns.

Local validation at f0312057f89a520e90171a8c0a1ab55ac8d88930 (Linux, Python 3.13.13):

  • python -m pytest -q: 219 passed on the PR branch.
  • Applied the PR to current dev at e53b4c0454a07c712be54b4529b2de94bcaf025f; python -m pytest -q: 242 passed.
  • python -m pythonlings --root tests/fixtures/passing_curriculum verify: passed.
  • All three affected reference solutions passed; representative wrong answers were rejected.
  • AST comparison confirms unchanged predicates, helper statements, order, and success output. The new test helper detects all eight original bare assertions.
  • PIP_CONFIG_FILE=/dev/null PIP_INDEX_URL=https://pypi.org/simple PIP_EXTRA_INDEX_URL= PIP_DEFAULT_TIMEOUT=15 PIP_RETRIES=0 python -m build --outdir /tmp/pythonlings-pr-loop.dfKE0X/pr-165-dist: source and wheel built.
  • /tmp/pythonlings-pr-loop.dfKE0X/wheel-venv/bin/python -m pip install --no-deps --force-reinstall /tmp/pythonlings-pr-loop.dfKE0X/pr-165-dist/pythonlings-0.4.4-py3-none-any.whl: passed in a temporary environment.
  • Installed-wheel smoke outside the checkout: workspace initialization and all three affected reference solutions passed.
  • git diff --check: passed.

The maintainer follow-up only adds the required repository-relative file comments. Hosted CI must pass at this head before squash merge into dev.

All eight hosted CI jobs passed at the reviewed head. The stale Python 3.12 status was retried and is now completed successfully.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3bbff87-2fa9-46f1-9a56-9215ecbff899

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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.

Share

…ctional9 checks

Signed-off-by: mercael <mercael91@gmail.com>
…ctional9 checks

Signed-off-by: mercael <mercael91@gmail.com>
…ctional9 checks

Signed-off-by: mercael <mercael91@gmail.com>
…ctional9 checks

Signed-off-by: mercael <mercael91@gmail.com>
@mercael91 mercael91 changed the title Fix #87 curriculum: add actionable assertion messages to functional7-9 checks Oct 23, 2026
Add the required repository-relative path comments without changing
execution behavior. Refs abhiksark#87.

@abhiksark abhiksark left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All eight required messages are present across functional7-9. Predicates, helper statements, execution order, and success output are unchanged; no learner function is re-called by the new messages. Branch tests (219), current-dev integration tests (242), fixture verification, build/installed-wheel smoke, and all eight hosted CI jobs passed.

@abhiksark
abhiksark merged commit f5a7779 into abhiksark:dev Nov 4, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants