-
Notifications
You must be signed in to change notification settings - Fork 27
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
🔨 Updates settings and removes config files: storage service #2369
🔨 Updates settings and removes config files: storage service #2369
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2369 +/- ##
========================================
+ Coverage 74.3% 74.8% +0.4%
========================================
Files 395 516 +121
Lines 16941 20029 +3088
Branches 1781 1971 +190
========================================
+ Hits 12599 14990 +2391
- Misses 3870 4525 +655
- Partials 472 514 +42
Flags with carried forward coverage won't be shown. Click here to find out more.
|
cb24bde
to
a8e98f1
Compare
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.
great! this will simplify things a good way. maybe just check my minor comments...
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.
Very nice overall. I like overall simplification of the settings management system.
Pleas find below some questions and proposals.
fb75e78
to
0fa6fcf
Compare
3979902
to
57868ef
Compare
What do these changes do?
The Problem
Currently the design of service configs have some issues:
Refactored Solution
This PR proposes a new design for the service configs that address the problems above. I have created a simplified sample service that implements this approach to facilitate the review.
In this new approach:
Settings
class under{app_package_name}.settings.py
postgres, s3, etc
Settings
instance is app-scopedmodels_library.settings
) either as a subsection of inheritingSettings
-like classes inherit frommodels_library.settings.base.BaseCustomSettings
Here an example (notice that it even captures the information in the pydantic fields if needed)
This PR
The refactoring will be implemented in three steps:
storage
.webserver
(which will also remove a dependency withtrafaret
)models_library.settings
Related issue/s
This is part of the overall refactoring planned for storage in #2276
How to test
Export
.env
and create a envfile, a json or a json-schemaChecklist
make openapi-specs
,git commit ...
and thenmake version-*
)