-
Notifications
You must be signed in to change notification settings - Fork 124
Enable automatic versioning from Git tags #1064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable automatic versioning from Git tags #1064
Conversation
- Use hatch-vcs to automatically derive version from Git tags - Remove hardcoded version number from pyproject.toml - Version will now be automatically extracted from latest Git tag - Eliminates need to manually update version in pyproject.toml
|
CodeAnt AI is reviewing your PR. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughBuild configuration switched to VCS-driven dynamic versioning: hatch-vcs was added and configured to produce a version file at Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
🔇 Additional comments (1)
Comment |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
toolchain/pyproject.toml(2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Lint Source
toolchain/pyproject.toml
[error] 1-1: Metadata generation failed: setuptools-scm could not detect version for 'toolchain'; set root or enable search_parent_directories in setuptools_scm, or run from the repository root. Exit code 1 during 'Preparing metadata (pyproject.toml)'.
🪛 GitHub Actions: Lint Toolchain
toolchain/pyproject.toml
[error] 1-1: Metadata generation failed during wheel build: setuptools-scm could not detect version for /home/runner/work/MFC/MFC/toolchain. The failure occurred while preparing metadata for build wheel (pyproject.toml). Exit code: 1. Suggested fixes: set relative_to/root in setuptools-scm config or run from repository root.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Github (macos, mpi, debug, false)
- GitHub Check: Agent
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Build & Publish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes MFC's Python package versioning by implementing automatic version derivation from Git tags using hatch-vcs. The changes eliminate the need to manually update version numbers in pyproject.toml, instead allowing the build system to automatically extract version information from Git tags.
Key changes:
- Adds
hatch-vcsdependency to the build system - Converts the
versionfield to be dynamically derived from Git tags - Configures hatch-vcs to generate a
_version.pyfile containing the version information
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1064 +/- ##
=======================================
Coverage 44.36% 44.36%
=======================================
Files 71 71
Lines 20590 20590
Branches 1994 1994
=======================================
Hits 9134 9134
Misses 10310 10310
Partials 1146 1146 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
User description
CodeAnt-AI Description
Derive package version from Git tags automatically
What Changed
Impact
✅ Fewer manual version updates✅ Consistent published versions✅ Clearer release metadata from tags💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.