-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feat: settings/configuration helper #144
Merged
Merged
Conversation
This file contains 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
thekaveman
force-pushed
the
feat/configuration
branch
from
September 7, 2022 17:19
06bb199
to
633706c
Compare
the sample settings are loaded by default when running the server locally/devcontainer including in tests this just moves them to be the default settings and leaves a note in the sample file of how to override helps writing tests that check defaults and change settings values
properties proxy to the current_app.config setting
thekaveman
force-pushed
the
feat/configuration
branch
from
September 7, 2022 22:20
633706c
to
3d82953
Compare
focus tests less on configured key paths and more on the reading functionality
thekaveman
force-pushed
the
feat/configuration
branch
from
September 7, 2022 22:23
3d82953
to
a120ec0
Compare
Merged
angela-tran
approved these changes
Sep 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a big fan of the sample settings cleanup, the Configuration
object, and the test_keypair
cleanup that focuses more on reading the file. These changes look great 💯
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.
Closes #142
Based on #140, will keep up to date with that branch and wait for it to be merged tomain
.Introduces a new
Configuration
class in thesettings.py
module, with@property
attributes for each of the settingsVARIABLES
. Property names are thelower_case
version of their setting.Use it like:
Note: omitted the
SQLALCHEMY
settings as these are not used directly in the app code.