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

config: generate default config from env #431

Merged
merged 5 commits into from
Mar 30, 2023

Conversation

codysk
Copy link
Member

@codysk codysk commented Mar 29, 2023

支持一些环境变量用于初始化配置 #430

@trim21
Copy link
Member

trim21 commented Mar 29, 2023

我在考虑要不要让环境变量覆盖配置文件好?还是仅仅作为默认值?你觉得呢?

bgmi/config.py Outdated Show resolved Hide resolved
@trim21
Copy link
Member

trim21 commented Mar 29, 2023

readme?

@codysk
Copy link
Member Author

codysk commented Mar 29, 2023

感觉只用作初始化就好,基本这种特性的都是做容器部署的时候才用到,容器拉起来之后还会进去手动修改配置的话,操作的人应该很清楚自己在干啥(大概),那还是按他手动修改过的为准靠谱。

readme 回头补上(正好 github action 炸了 连 pr 的 lint 都还没过,回头等好了一块儿整

@trim21
Copy link
Member

trim21 commented Mar 29, 2023

那等ci好了再合了(

@trim21
Copy link
Member

trim21 commented Mar 29, 2023

ci挂了

Copy link
Member

@trim21 trim21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修一下(

@codysk
Copy link
Member Author

codysk commented Mar 30, 2023 via email

@codysk codysk force-pushed the feaure/env-config branch 4 times, most recently from c423cfa to 40488f9 Compare March 30, 2023 05:09
@codysk
Copy link
Member Author

codysk commented Mar 30, 2023

ci 修了,但晚点我把 readme 也补上再合呗


环境变量 *暂不支持* 配置以下项目
```
enable_global_include_keywords
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个可以支持啊,pydantic是可以解析字符串到bool的

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

就,反正开了这个还是要进去配置 global_include_keywords 之类的那些,环境变量就给他初始化个开关没啥用的样子。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有道理

README.md Outdated Show resolved Hide resolved
Co-authored-by: Trim21 <trim21.me@gmail.com>
@trim21 trim21 merged commit 643c2f1 into BGmi:master Mar 30, 2023
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.

None yet

2 participants