Move version into the package and make it more discoverable.#64
Open
elainethale wants to merge 1 commit intomainfrom
Open
Move version into the package and make it more discoverable.#64elainethale wants to merge 1 commit intomainfrom
elainethale wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes the package version inside the stride Python package and exposes it via the CLI, while updating packaging metadata to source the distribution version from code.
Changes:
- Added
stride.__version__and exported it fromsrc/stride/__init__.py. - Added
-V/--versionsupport to thestrideCLI viaclick.version_option. - Switched
pyproject.tomlto a dynamic version read by Hatch fromsrc/stride/__init__.py.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/stride/cli/stride.py | Imports __version__ and adds stride --version support. |
| src/stride/init.py | Defines and exports __version__. |
| pyproject.toml | Moves to dynamic versioning and configures Hatch to read the version from code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
4
| __version__ = "2.0.0" | ||
|
|
||
| from stride.project import Project | ||
| from stride.models import ( |
| from loguru import logger | ||
|
|
||
| from stride import Project | ||
| from stride import Project, __version__ |
Comment on lines
30
to
32
| @click.group("stride") | ||
| @click.version_option(__version__, "-V", "--version", prog_name="stride") | ||
| @click.option( |
Comment on lines
+70
to
+72
| [tool.hatch.version] | ||
| path = "src/stride/__init__.py" | ||
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64 +/- ##
=======================================
Coverage 75.55% 75.55%
=======================================
Files 50 50
Lines 7935 7937 +2
=======================================
+ Hits 5995 5997 +2
Misses 1940 1940 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
No description provided.