Skip to content

test(wren-pydantic): stop hardcoding version in smoke test#2267

Merged
goldmedal merged 1 commit into
mainfrom
fix/wren-pydantic-smoke-test-version
May 14, 2026
Merged

test(wren-pydantic): stop hardcoding version in smoke test#2267
goldmedal merged 1 commit into
mainfrom
fix/wren-pydantic-smoke-test-version

Conversation

@PaulChen79
Copy link
Copy Markdown
Contributor

@PaulChen79 PaulChen79 commented May 14, 2026

Summary

  • Replaces the hardcoded assert wren_pydantic.__version__ == "0.1.0" in tests/test_smoke.py with a type/non-empty check.
  • Unblocks release-please PRs that bump the version (e.g. chore(main): release wren-pydantic 0.2.0 #2261tests (py3.11) and tests (py3.12) both failed because __version__ was already updated to 0.2.0 by release-please but the test still expected 0.1.0).
  • Future release-please bumps no longer need a corresponding test update.

Why this assertion shape

The smoke test's job is to verify the package imports and exposes a version string. The exact value is enforced in .github/workflows/publish-wren-pydantic.yml (regex \d+\.\d+\.\d+(rc\d+)? during the build step), so the test doesn't need to duplicate that check.

Test plan

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Improved package version validation in smoke tests to ensure compatibility across different version formats, replacing a hard-coded version check with flexible string validation.

Review Change Stack

The smoke test asserted `__version__ == "0.1.0"`, which broke every
release-please PR that bumped the version (e.g. #2261 failed on
py3.11/py3.12 after the 0.2.0 bump). Replace it with a type/non-empty
check so the smoke test verifies importability without coupling to a
specific release number.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c816df86-f753-46df-a721-29ed6179ff7a

📥 Commits

Reviewing files that changed from the base of the PR and between dc7f182 and 4c3aa81.

📒 Files selected for processing (1)
  • sdk/wren-pydantic/tests/test_smoke.py

Walkthrough

The smoke test for wren_pydantic is updated to validate that __version__ is a string and non-empty, replacing the previous hard-coded check against version "0.1.0".

Changes

Smoke Test Version Validation

Layer / File(s) Summary
Version assertion update
sdk/wren-pydantic/tests/test_smoke.py
Replaced the fixed version assertion with checks that __version__ is a str and has a truthy value, making the smoke test version-agnostic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

ci

Poem

🐰 A test was tamed with gentle care,
No hardcoded version string to snare,
Just check it's there, just check it's real,
Now smoke flows smooth—what a deal! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: removing hardcoded version assertions from the smoke test in favor of flexible validation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wren-pydantic-smoke-test-version

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@goldmedal goldmedal merged commit be11db8 into main May 14, 2026
8 checks passed
@goldmedal goldmedal deleted the fix/wren-pydantic-smoke-test-version branch May 14, 2026 03:13
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