Refactor settings#10
Open
melvyn-apryl wants to merge 2 commits into
Open
Conversation
- Implement application settings as a writeable wrapper for Django's
settings that the application will consult.
NOTE: because of the way the tests work, we can't make use of
@cached_property.
- Implement settings as dictionary to namespace the variables
- Substitute use of settings with app_settings in sqs and views modules
- Adjust tests to default to EB_SQS dictionary modifications
- Use cached_property for all values - Implement a reconfigure method that removes all cached properties, so that tests can modify settings - Implement an override to the test case settings context that calls reconfigure if the module is already loaded so that overrides take effect as if this application was started with those settings - Implement app settings for the decorators
|
@DataGreed any chance of getting this merged? |
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.
Implements settings as an application specific entity that is hydrated from the Django settings. Similar patterns can be seen in packages such as all_auth.
Also moves settings to an EB_SQS dictionary and issues deprecation warning if found in the global namespace. (see #8 for reasoning).
Last but not least, implements a TODO: puts queues on the settings and caches them.