Version dev#3365
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThe PR refactors package version management by moving the version string from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/pypi.yml (1)
47-49: Deprecatedset-outputsyntax.The
::set-outputcommand has been deprecated by GitHub Actions. Consider using the new environment file syntax instead.Suggested fix
- name: Extract tag name id: tag - run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
🤖 Fix all issues with AI agents
In @.github/workflows/pypi.yml:
- Around line 51-53: The "Update version in VERSION file" step currently uses
echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION which
removes all 'v' characters; change the sed expression to only strip a leading
'v' (e.g., use a pattern like s/^v//) so TAG_NAME (from
steps.tag.outputs.TAG_NAME) is written to VERSION without removing internal 'v'
characters.
| - name: Update version in VERSION file | ||
| run: | | ||
| sed -i -E 's/version="([0-9.]+)",/version="${{ steps.tag.outputs.TAG_NAME }}",/g' setup.py | ||
| echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION |
There was a problem hiding this comment.
The sed pattern may incorrectly strip 'v' from anywhere in the version string.
Using sed -e's/v//g' removes all occurrences of 'v', not just the leading one. If a tag like v1.0.0-preview is used, this would produce 1.0.0-preiew.
Suggested fix to strip only the leading 'v'
- name: Update version in VERSION file
run: |
- echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION
+ echo "${{ steps.tag.outputs.TAG_NAME }}" | sed 's/^v//' > VERSION📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Update version in VERSION file | |
| run: | | |
| sed -i -E 's/version="([0-9.]+)",/version="${{ steps.tag.outputs.TAG_NAME }}",/g' setup.py | |
| echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION | |
| - name: Update version in VERSION file | |
| run: | | |
| echo "${{ steps.tag.outputs.TAG_NAME }}" | sed 's/^v//' > VERSION |
🤖 Prompt for AI Agents
In @.github/workflows/pypi.yml around lines 51 - 53, The "Update version in
VERSION file" step currently uses echo "${{ steps.tag.outputs.TAG_NAME }}" | sed
-e's/v//g' > VERSION which removes all 'v' characters; change the sed expression
to only strip a leading 'v' (e.g., use a pattern like s/^v//) so TAG_NAME (from
steps.tag.outputs.TAG_NAME) is written to VERSION without removing internal 'v'
characters.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Description
Motivation and Context
How has this been tested?
AI Usage Disclaimer
Screenshots (if appropriate)
Types of changes
Social Handles (Optional)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.