Skip to content

Commit

Permalink
Merge pull request #31 from qiang1218/main
Browse files Browse the repository at this point in the history
虚拟环境和依赖管理的推荐工具升级为poetry
  • Loading branch information
whg517 committed Dec 9, 2022
2 parents b8e2d30 + 5cb3ef2 commit 9bb14ec
Show file tree
Hide file tree
Showing 23 changed files with 487 additions and 915 deletions.
3 changes: 2 additions & 1 deletion .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ MD013:
MD012:
maximum: 20

MD046: false
MD046: false
MD051: false
41 changes: 23 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

指南主要包含以下主题:


- [x] 快速上手(一个最通用,最初级的示例项目)
- [x] 开发前准备
- [x] Python 环境的安装
Expand All @@ -23,7 +22,7 @@
- [x] Python 规范
- [x] 风格规范
- [x] 语言规范
- [x] 项目工程化
- [x] 应用开发实践
- [x] 初级教程(一个包含完整开发流程的示例项目)
- [x] 初始化项目
- [x] 功能开发
Expand All @@ -42,18 +41,21 @@
- [x] 项目结构
- [x] 文档管理
- [x] 打包发布
- [ ] 开发实践
- [ ] Web
- [x] Fastapi
- [ ] Django
- [ ] Flask
- [ ] 爬虫
- [ ] Scrapy
- [ ] aiohttp
- [ ] 数据库
- [ ] SQLALchemy

> 如果您对文档有任何建议或意见,欢迎提交 [issues](https://github.com/pyloong/pythonic-project-guidelines/issues) 进行讨论。当然我们更期待与您共同协作开发,让文档变得更加完善。
- [ ] 开发实践
- [ ] Web
- [x] Fastapi
- [ ] Django
- [ ] Flask
- [ ] 爬虫
- [ ] Scrapy
- [ ] aiohttp
- [ ] 数据库
- [ ] SQLALchemy
- [x] 数据开发实践
- [x] 初级教程

> 如果您对文档有任何建议或意见,欢迎提交 [issues](https://github.com/pyloong/pythonic-project-guidelines/issues)
> 进行讨论。当然我们更期待与您共同协作开发,让文档变得更加完善。
## 使用方式

Expand All @@ -65,7 +67,9 @@ git clone https://github.com/pyloong/pythonic-project-guidelines

### 2. 初始化环境

项目预览需要安装 Python 环境来启动 server,强烈建议使用 Python 3.9+ 的版本。如果本地没有 Python 环境,也可以使用 [Docker预览服务器](https://squidfunk.github.io/mkdocs-material/creating-your-site/#creating-your-site) 来启动。
项目预览需要安装 Python 环境来启动 server,强烈建议使用 Python 3.9+ 的版本。如果本地没有 Python
环境,也可以使用 [Docker预览服务器](https://squidfunk.github.io/mkdocs-material/creating-your-site/#creating-your-site)
来启动。

#### 2.1 本地初始化

Expand Down Expand Up @@ -98,7 +102,7 @@ mkdocs serve

#### 3.2 使用 Docker 预览

**uinx**:
**unix**:

```bash
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material:8.4.1
Expand All @@ -112,8 +116,9 @@ docker run --rm -it -p 8000:8000 -v "%cd%":/docs squidfunk/mkdocs-material:8.4.1

## 协作规范

文档使用 Markdown 编写,使用 [mkdocs](https://www.mkdocs.org/) 配合 [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) 主题构建。
文档使用 Markdown 编写,使用 [mkdocs](https://www.mkdocs.org/)
配合 [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) 主题构建。

- form
- fork
- code
- pr
Binary file modified docs/assets/images/ides/windows-vscode-demo-new-file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/ides/windows-vscode-demo-run-file-out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/ides/windows-vscode-demo-run-file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/guidelines/advanced/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def init_yml_log() -> None:
#### 2.3.1 优化

根据文档中 [优化](https://docs.python.org/zh-cn/3/howto/logging.html#optimization) 一节内容描述,日志中的参数化消息,
应该延迟加载。这么做是为了减少在计算日志参数是所消耗的资源,因为如果日志记录非丢弃,则不需要消耗这部分资源。所以在
应该延迟加载。这么做是为了减少在计算日志参数时所消耗的资源,因为如果日志记录非丢弃,则不需要消耗这部分资源。所以在
日志记录上,应采用 `%` 的方式,而不是其他字符串格式化。

关于性能的讨论可以参考 [W1202 - logging-fstring-interpolation is not useful](https://github.com/PyCQA/pylint/issues/2395)
Loading

0 comments on commit 9bb14ec

Please sign in to comment.