pip install cookiecuttercookiecutter https://github.com/datadigg/python-project-template.git根据提示输入项目基础信息配置
使用 pipenv 管理依赖。所以应该现在系统环境中安装 pipenv (>=2018.10.13)
pipenv 默认管理两种模式,即常规模式和开发模式。
pipenv install requests
pipenv install -d requests使用 isort 对项目导包进行格式化
isortcoverage 是生成测试报告的一个工具。
pytest 是 Python 中简单易用的测试工具
通过 pytest-django 使用 pytest 测试 django 。
通过 pytest-cov 插件使用 coverage
使用 pytest 同时生成 html 测试报告
pytest --cov-report-html --cov使用 tox 做自动化处理。
对于 isort 检测会直接输出检测结果,而非帮助修改。
对于 flake8 采用非严格模式(命令前置 - ),输出结果,而不是终止自动化。