-
Notifications
You must be signed in to change notification settings - Fork 154
feature/refactor-versions #88
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
Merged
yuval-qf
merged 13 commits into
qualifire-dev:main
from
puwun:feature/refactor-versions
Oct 20, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0f6bd58
feat: implement single source of truth for version management
puwun 3e4abb6
feat: centralise version management
puwun e9e7856
resolve merge conflicts
puwun 613a5ae
style: fix indentation and apply review fixes
puwun 0127fa2
Merge branch 'qualifire-dev:main' into feature/refactor-versions
puwun 1aafe0b
Merge branch 'qualifire-dev:main' into feature/refactor-versions
puwun a286cc7
build(sdk): centralize versioning for python sdk
puwun df721b0
Merge branch 'main' into feature/refactor-versions
drorIvry 7c8ca92
chore: centralize versioning and improve local development workflow
puwun 558a821
chore: fix code formatting to pass codestyle checks
puwun e71128e
chore: refine version management in rogue-sdk per coding guidelines
puwun b5a2c85
Merge branch 'main' into feature/refactor-versions
puwun 545da85
Apply suggestion from @yuval-qf
yuval-qf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 0.1.12 | ||
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
yuval-qf marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package tui | ||
|
|
||
| // Version will be set at build time via ldflags | ||
| // Default to "dev" if not set during build | ||
| var Version = "vdev" |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| """ | ||
| Shared version retrieval logic. | ||
| """ | ||
|
|
||
| from pathlib import Path | ||
|
|
||
|
|
||
| def get_version(package_name: str) -> str: | ||
| """ | ||
| Retrieves the package version. | ||
|
|
||
| It first tries to find a 'VERSION' file by traversing up from the current | ||
| file's location. If found, its content is returned. | ||
|
|
||
| As a fallback, it tries to get the version from the installed package | ||
| metadata using importlib.metadata. | ||
|
|
||
| If both methods fail, it returns a default development version string. | ||
|
|
||
| Args: | ||
| package_name: The name of the package to look up in the metadata. | ||
|
|
||
| Returns: | ||
| The version string. | ||
| """ | ||
| try: | ||
| # Find project root by looking for the VERSION file | ||
| current_path = Path(__file__).resolve() | ||
| for parent in current_path.parents: | ||
| version_file = parent / "VERSION" | ||
| if version_file.exists(): | ||
| return version_file.read_text().strip() | ||
| except Exception: | ||
| pass # nosec B110 | ||
|
|
||
| try: | ||
| # Fall back to installed package metadata | ||
| from importlib.metadata import version | ||
|
|
||
| return version(package_name) | ||
| except Exception: | ||
| return "0.0.0-dev" |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.