PTHMINT-64: Remove sdk version#8
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request removes the sdk_version attribute and its associated functionality from the Plugin and Version classes to simplify the codebase and clean up dependencies.
- Removed all sdk_version references and methods from both Plugin and Version classes.
- Updated the test suite to reflect the sdk_version removal and cleaned up unused dependencies in pyproject.toml.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/multisafepay/unit/util/test_unit_version.py | Removed sdk_version references from tests and updated version serialization/deserialization tests. |
| tests/multisafepay/unit/api/path/orders/request/components/test_unit_plugin.py | Removed tests for add_sdk_version and sdk_version checks in Plugin. |
| src/multisafepay/util/version.py | Removed sdk_version attribute, related methods, and dependency on tomlkit for sdk_version detection. |
| src/multisafepay/api/paths/orders/request/components/plugin.py | Removed sdk_version attribute and related method from the Plugin class. |
| pyproject.toml | Removed the toml dependency no longer needed for sdk_version detection. |
Comment on lines
86
to
88
| print(version.get_version()) | ||
| assert version.get_version() == "Plugin 1.0.1" | ||
|
|
There was a problem hiding this comment.
Remove the print statement used for debugging in the test_version_get_version test to keep the test output clean.
Suggested change
| print(version.get_version()) | |
| assert version.get_version() == "Plugin 1.0.1" |
…_version_get_version
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8 +/- ##
==========================================
- Coverage 90.72% 90.71% -0.01%
==========================================
Files 106 106
Lines 2317 2293 -24
==========================================
- Hits 2102 2080 -22
+ Misses 215 213 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
danielcivit
approved these changes
Apr 23, 2025
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.
This pull request removes the
sdk_versionattribute and its associated functionality from thePluginandVersionclasses, simplifying the codebase. Additionally, it cleans up related dependencies and updates the test suite accordingly.Removal of
sdk_versionfunctionality:src/multisafepay/api/paths/orders/request/components/plugin.py: Removed thesdk_versionattribute, its initialization, and theadd_sdk_versionmethod from thePluginclass. [1] [2]src/multisafepay/util/version.py: Removed thesdk_versionattribute, thedetect_sdk_versionmethod, and related getter and setter methods from theVersionclass. Updated theget_versionmethod to excludesdk_version. [1] [2] [3]Dependency cleanup:
pyproject.toml: Removed thetomldependency, which was previously used for detecting the SDK version.src/multisafepay/util/version.py: Removed unused imports related to thesdk_versionfunctionality, includingPath,parse, andMissingPluginVersionException.Test suite updates:
tests/multisafepay/unit/api/path/orders/request/components/test_unit_plugin.py: Removed tests related tosdk_versionin thePluginclass, including its initialization and theadd_sdk_versionmethod. [1] [2]tests/multisafepay/unit/util/test_unit_version.py: Updated or removed tests for theVersionclass to reflect the removal ofsdk_versionand its associated methods. [1] [2] [3] [4] [5] [6] [7] [8]