fix(cli): sync version with package metadata#21
fix(cli): sync version with package metadata#21looooown2006 wants to merge 2 commits intoayhammouda:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR synchronizes package version management by replacing the hardcoded ChangesVersion Resolution and Testing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_packaging.py`:
- Around line 111-126: The test
test_source_tree_import_without_installed_metadata should be isolated from
repo-installed metadata: add the pytest tmp_path fixture to the test signature
and pass cwd=str(tmp_path) into the subprocess.run call so the child process
runs from an empty temporary directory; keep the existing PYTHONPATH env setup
and other subprocess args unchanged so the test exercises the pyproject.toml
fallback rather than any .dist-info/.egg-info in the repo root.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a3e55042-bd34-4122-a04b-2de009c5bfa8
📒 Files selected for processing (2)
src/mcp_server_python_docs/__init__.pytests/test_packaging.py
Summary
mcp_server_python_docs.__version__from installed package metadata.--versionis checked against the metadata version instead of a hardcoded string.__version__synchronized with package metadata.Tests
git diff --checkuv run ruff check src/ tests/uv run pyright src/uv run mcp-server-python-docs --versionuv run pytest tests/test_packaging.py::TestVersionFlag tests/test_packaging.py::TestInstallability::test_module_runnable -q$env:PYTHONUTF8='1'; uv run pytest --tb=short -qResults:
mcp-server-python-docs --versionnow printsmcp-server-python-docs 0.1.1.Local Windows note:
uv run pytest --tb=short -qwithoutPYTHONUTF8=1fails on this Windows shell because several existingPath.read_text()calls use the default GBK locale and hit UTF-8 bytes in repo files. With UTF-8 mode enabled, the same suite passes.Closes #11.
Summary by CodeRabbit
Refactor
Tests