Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor settings #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

melvyn-apryl
Copy link
Contributor

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.

- 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
@dmwyatt
Copy link

dmwyatt commented Nov 22, 2022

@DataGreed any chance of getting this merged?

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.

2 participants