Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ensures the package version is resolved during builds and is accessible at runtime via magi_compiler.__version__, aligning the packaging workflow with the existing versioningit configuration in pyproject.toml.
Changes:
- Add
versioningittobuild-system.requiresso PEP 517 builds can resolve the dynamic version and writemagi_compiler/_version.py. - Expose
magi_compiler.__version__by importing from the generated_versionmodule with a safe fallback when it’s absent.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pyproject.toml |
Adds versioningit to build requirements to support dynamic version resolution during builds. |
magi_compiler/__init__.py |
Exposes __version__ from the generated _version.py (with fallback) and exports it via __all__. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗂️ PR Category
📝 Description
This fix ensures that installing the package via
pip install .correctly generatesmagi_compiler/_version.pywith the resolved version, and exposes that version throughmagi_compiler.__version__after import.