feat: integrated snapshot processors to Switcher resolver #27
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 refactors and improves the codebase of the
switcher_clientlibrary. The main focus is on standardizing imports to use relative paths, introducing a more robust strategy validation mechanism, and simplifying how entries are handled for strategy checks. Additionally, several utility and error-handling enhancements have been made.Strategy Validation and Entry Handling
Entryclass tolib/types.pyto encapsulate strategy and input values, and standardized how entries are constructed and passed throughout the codebase. The newget_entryutility function inlib/utils/__init__.pyprepares entries for strategy checks. [1] [2]lib/resolver.pyto use the newEntryclass andget_entryfunction, and added more granular methods for checking strategies and configurations. [1] [2]process_operationfunction inlib/snapshot.pyto accept aStrategyConfigobject directly, and standardized strategy type names (e.g.,PAYLOAD_VALIDATIONinstead ofPAYLOAD). [1] [2]Import and Path Refactoring
client.py,lib/remote.py,lib/remote_auth.py,lib/snapshot_loader.py,lib/globals/global_snapshot.py, and others. [1] [2] [3] [4] [5] [6] [7] [8] [9]API and Error Handling Improvements
clear_resourcesstatic method toClientfor cleaning up resources, improving lifecycle management.__all__declaration toerrors/__init__.pyto clarify exported error classes.Miscellaneous Enhancements
.coveragercto omitversion.pyfrom coverage reports.These changes collectively improve code clarity, maintainability, and the robustness of strategy validation within the
switcher_clientlibrary.