Skip to content

PTHMINT-130: Update SDK version handling and tests to include version…#67

Open
zulquer wants to merge 2 commits into
masterfrom
PTHMINT-130
Open

PTHMINT-130: Update SDK version handling and tests to include version…#67
zulquer wants to merge 2 commits into
masterfrom
PTHMINT-130

Conversation

@zulquer

@zulquer zulquer commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Added a __version__ variable set to "3.0.0" in src/multisafepay/__init__.py and included it in the module's public API.
  • Updated src/multisafepay/util/version.py to import __version__ and include it in the string returned by Version.get_version(). [1] [2]

Testing updates:

  • Modified the unit test in tests/multisafepay/unit/util/test_unit_version.py to expect the new version string format including the SDK version.… information

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.67%. Comparing base (b6f3587) to head (75492bc).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielcivit danielcivit requested a review from Copilot July 7, 2026 12:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the multisafepay package 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.

Comment on lines 50 to +63
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__}"
Comment on lines 10 to 13
from typing import Optional

from multisafepay import __version__
from pydantic import BaseModel
Comment thread tests/multisafepay/unit/util/test_unit_version.py
@danielcivit danielcivit self-requested a review July 7, 2026 12:25

@danielcivit danielcivit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check the GitHub Copilot feedback. In my opinion there are relavant comments to check in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants