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.
Before submitting PRs to add new behaviors, I wanted to wrap my head around the current codebase. I started with some basic contributor-friendly changes:
local
instead ofl
)I had to do a lot of mocking to get my first wave of test cases working. To reduce the complexity of test cases, I needed to rearrange code to better encapsulate behaviors. This PR is the product of that effort and includes changes like (edit: renamed
State
classes to clearly indicate storage backend):__init__
(should avoid issues like Replace -p with ENV Variable #15 for programmatic users)pull
#16),DiffResolver
(formerlyFlatDictDiffer
) is now injected into theParameterStore
(formelyRemoteState
) constructor.DiffResolver
without coupling, I created aconfigure()
classmethod that uses functools.partial()` to pre-populate constructor kwargs.DiffResolver
. This simplifies the interface onParameterStore
andYAMLFile
(formelyLocalState
) which only accept nested dicts (thoughRemoteState
uses some flattened endpoints).DiffResolver
) could be reverted, but I changed the signature of most/all methods so it wouldn't really help backwards compatibility.This PR should be 100% backwards compatible for CLI users. Obviously, the interfaces for most classes/methods have changed so it will be a breaking change (i.e. major release) for programmatic users.
I know big rewrites aren't normally welcomed from a new contributor, but I hope you'll forgive the overhaul since it should simplify/enable additional improvements. I'm going to submit additional PRs, all based on this foundation. If you object to this direction, I can certainly try to rewrite more to your liking.