-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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: introduce pydantic-settings for config definition and validation #5202
Conversation
7e15429
to
e584d37
Compare
006dc60
to
82c08a2
Compare
a71e2ad
to
a562f51
Compare
18648f7
to
69fe305
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.
Thanks for your contribution! This PR will help us migrate to a more type-safe system. However, there are still some issues. Would you mind addressing them?
69fe305
to
67bb428
Compare
@laipz8200 Hi, I have resolved all the problems you listed. Please have a check. |
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.
Awesome! Thanks for your hard work.
Please avoid changing unrelated lines in poetry lockfile. Use |
411ebe3
to
085a398
Compare
You're right. |
I've done it~ Thanks for reviewing. |
* refs/heads/main: (21 commits) fix: sentry config float type err (#5416) fix: prompt editor insert cursor position (#5415) fix: Revert "feat: initial support for Milvus 2.4.x (#3795)" downgrading to 2.3.x for Linux arm64 installation failure (#5414) fix: optional parameter missing default value None in http request node (#5413) feat: new icons (#5412) fix bug: tencent vdb #5378 (#5408) Corrected an error in the APi docs (#5398) feat: update template (#5395) fix: unnecessory data fetch when swithing apps category on explore page (#5155) chore: extract retrival method literal values into enum (#5060) feat: add log date timezone (#4623) docs(api/README): Remove unnecessary `=` (#5380) Fix: use new button (#5384) refactor: refactor the button component using `forwardRef` (#4379) feat: initial support for Milvus 2.4.x (#3795) feat: introduce pydantic-settings for config definition and validation (#5202) feat: support opensearch approximate k-NN (#5322) Add sample environment variables for Aliyun OSS (#5366) Fix: multi image preview sign (#5376) feat: default timezone to user's local timezone in activate form (#5374) ... # Conflicts: # api/config.py # api/requirements.txt
langgenius#5202) Co-authored-by: -LAN- <[email protected]>
Description
pydantic-settings
for configs parsing and validation.env
, all the configs is still read viadotenv
insidepydantic-settings
app.config['XXXX']
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Suggested Checklist:
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsoptional
I have made corresponding changes to the documentationoptional
I have added tests that prove my fix is effective or that my feature worksoptional
New and existing unit tests pass locally with my changes