This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# 贡献指南
|
||||
|
||||
感谢您对 DjangoAdmin Tornado+EleVue 项目的关注!
|
||||
|
||||
## 开发环境
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
poetry install
|
||||
|
||||
# 启动服务(默认端口 8041)
|
||||
poetry run python app.py
|
||||
```
|
||||
|
||||
## 代码规范
|
||||
|
||||
- 运行 `poetry run flake8 src tests` 检查代码规范
|
||||
- 运行 `poetry run mypy src` 做类型检查
|
||||
- 运行 `poetry run ruff check --fix src tests` 自动格式化
|
||||
- 提交前建议安装 pre-commit 钩子:`poetry run pre-commit install`
|
||||
|
||||
## 测试
|
||||
|
||||
```bash
|
||||
# 单元测试
|
||||
poetry run pytest tests/unit
|
||||
|
||||
# 全部测试
|
||||
poetry run pytest
|
||||
```
|
||||
|
||||
集成测试需要本地 MySQL 与 Redis 服务,未配置时自动跳过。
|
||||
|
||||
## 提交规范
|
||||
|
||||
- 提交信息使用中文,遵循语义化描述(feat/fix/refactor/docs/test/chore)
|
||||
- 涉及新功能请同时补充测试
|
||||
- 涉及 API 变更请同步更新 `document/api/swagger.yaml`
|
||||
Reference in New Issue
Block a user