PTHMINT-130: Update SDK version handling and tests to include version…#67
PTHMINT-130: Update SDK version handling and tests to include version…#67zulquer wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67 +/- ##
=======================================
Coverage 92.67% 92.67%
=======================================
Files 182 182
Lines 3357 3359 +2
=======================================
+ Hits 3111 3113 +2
Misses 246 246 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates MultiSafepay Python SDK version reporting so Version.get_version() includes both the plugin version and the SDK version, and aligns unit tests with the new string format.
Changes:
- Added
__version__ = "3.0.0"to themultisafepaypackage and exported it via__all__. - Updated
Version.get_version()to append the SDK version to the returned version string. - Updated the unit test expectation for the new version string format.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/multisafepay/__init__.py |
Introduces and exports __version__ for SDK-level version visibility. |
src/multisafepay/util/version.py |
Uses __version__ to include SDK version in Version.get_version() output. |
tests/multisafepay/unit/util/test_unit_version.py |
Updates assertions to match the new combined version string format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def get_version(self: "Version") -> Optional[str]: | ||
| """ | ||
| Get the combined version information of the plugin and SDK. | ||
|
|
||
| Returns | ||
| ------- | ||
| Optional[str]: The combined version information in the format "Plugin {plugin_version}; Python-Sdk {sdk_version}". | ||
|
|
||
| Raises | ||
| ------ | ||
| MissingPluginVersionException: If the plugin version is "unknown". | ||
|
|
||
| """ | ||
| return f"Plugin {self.plugin_version}" | ||
| return f"Plugin {self.plugin_version}; Python-Sdk {__version__}" |
| from typing import Optional | ||
|
|
||
| from multisafepay import __version__ | ||
| from pydantic import BaseModel |
danielcivit
left a comment
There was a problem hiding this comment.
Could you please check the GitHub Copilot feedback. In my opinion there are relavant comments to check in there.
This pull request updates the way the SDK version is tracked and reported in the MultiSafepay Python SDK. The main change is to include the SDK version in the version string returned by
Version.get_version(). This ensures that both the plugin and SDK versions are visible, improving transparency for debugging and support.Versioning improvements:
__version__variable set to"3.0.0"insrc/multisafepay/__init__.pyand included it in the module's public API.src/multisafepay/util/version.pyto import__version__and include it in the string returned byVersion.get_version(). [1] [2]Testing updates:
tests/multisafepay/unit/util/test_unit_version.pyto expect the new version string format including the SDK version.… information