伪Python包,用于测试https://github.com/jedie/cookiecutter_templates cookiecutter模板
项目描述
cookiecutter templates
所有模板都已通过unittest测试!
欢迎提交补丁!
Django项目
- 使用pip-tools进行需求管理
- 使用
pip-compile
冻结/固定需求与哈希值 - 使用
pip-sync
安装所有必需的包
- 使用
- manage_django_project:
- 通过调用
manage.py
自动虚拟环境启动 - 开发管理命令
- 通过调用
- 使用pyproject.toml进行所有操作
Cookiecutter模板测试在此:managed-django-project/tests.py
与vanilla cookiecutter一起使用,例如。
cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory managed-django-project
与manageprojects一起使用,例如。
./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory managed-django-project ~/foobar/
基于pipenv的Python包
- 使用pipenv进行需求管理
- 具有简单"帮助"菜单的Makefile
- 使用pyproject.toml进行所有操作
- 有基本的unittest
Cookiecutter模板测试在此:pipenv-python/tests.py
与vanilla cookiecutter一起使用,例如。
cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory pipenv-python
与manageprojects一起使用,例如。
./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory pipenv-python ~/foobar/
基于pip-tools的Python包
- 使用pip-tools进行需求管理
- 使用
pip-compile
冻结/固定需求与哈希值 - 使用
pip-sync
安装所有必需的包
- 使用
- click基于的CLI应用程序和开发模式
- 只需调用
cli.py
/dev-cli.py
即可自动虚拟环境启动 - 使用pyproject.toml进行所有操作
- 有基本的unittest
Cookiecutter模板测试在此:piptools-python/tests.py
与vanilla cookiecutter一起使用,例如。
cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory piptools-python
与manageprojects一起使用,例如。
./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory piptools-python ~/foobar/
基于Poetry的可重用Django应用
- 使用Poetry进行需求管理
- 通过
Makefile
启动 - 具有简单"帮助"菜单的Makefile
- 使用pyproject.toml进行所有操作
- 有基本的unittest
Cookiecutter模板测试在此:poetry-django-app/tests.py
与vanilla cookiecutter一起使用,例如。
cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory poetry-django-app
与manageprojects一起使用,例如。
./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory poetry-django-app ~/foobar/
基于Python的诗歌包
- 使用Poetry进行需求管理
- 通过
Makefile
启动 - 基于Typer的命令行界面(CLI)
- 使用pyproject.toml进行所有操作
- 有基本的unittest
Cookiecutter模板测试在此: poetry-python/tests.py
与vanilla cookiecutter一起使用,例如。
cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory poetry-python
与manageprojects一起使用,例如。
./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory poetry-python ~/foobar/
基本的Django YunoHost应用程序
YunoHost是一个基于Debian的开源自托管解决方案。
此Cookiecutter模板有助于构建一个YunoHost应用程序,用于基于Django的Web应用程序
- 包含所有YunoHost脚本,用于安装、备份、恢复等操作
- 使用django_yunohost_integration
- 使用pip-tools进行需求管理
- 基于click的CLI
- 通过调用
dev-cli.py
自动虚拟环境引导 - 使用pyproject.toml进行所有操作
- 项目单元测试与Django集成测试
Cookiecutter模板测试在此: yunohost_django_package/tests.py
与vanilla cookiecutter一起使用,例如。
cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory yunohost_django_package
与manageprojects一起使用,例如。
./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory yunohost_django_package ~/foobar/
贡献
设置本地测试环境
~$ git clone https://github.com/jedie/cookiecutter_templates.git
~$ cd cookiecutter_templates
~/cookiecutter_templates$ ./cli.py --help
./cli.py --help
的输出如下
Usage: ./cli.py [OPTIONS] COMMAND [ARGS]...
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ fix-file-content Unify cookiecutter variables in file content. e.g.: "{{foo}}" -> "{{ foo │
│ }}" │
│ fix-filesystem Unify cookiecutter variables in the file/directory paths. e.g.: │
│ "/{{foo}}/{{bar}}.txt" -> "/{{ foo }}/{{ bar }}.txt" │
│ reverse Reverse a /generated_templates/<pkg_name>/ back to Cookiecutter template │
│ in: ./<pkg_name>/ │
│ templates2generated Generate all cookiecutter templates │
│ update-template-req Update requirements of all cookiecutter templates │
│ version Print version and exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
运行测试,例如
~/cookiecutter_templates$ ./cli.py test
# or sub tests:
~/cookiecutter_templates$ ./cli.py test managetemplates/tests/test_piptools_python.py
# It's just a "python3 -m unittest" wrapper cli, see:
~/cookiecutter_templates$ ./cli.py test --help
链接
项目详情
下载文件
下载适合您平台的应用程序文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分发
构建分发
managetemplates-0.3.0.tar.gz的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 2413b1a7cd9a9ba8494b950c7429ba6e51e9ace880b1d5c59dd6ef960cc00ea3 |
|
MD5 | 3f6e7fa2c3d1891c5640b42131cafff4 |
|
BLAKE2b-256 | 6b8d11aafea8ef813115fc3fc4142b01a0dd82baa26d8f1a6a32f10016306469 |
managetemplates-0.3.0-py3-none-any.whl的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | b685b3c86e5b2cfa933ffe5bf89d27115ef23d39b98a2b49af63db11b20c63a4 |
|
MD5 | 8c7d798433d060c9424f8378aa872dde |
|
BLAKE2b-256 | 9ff3106feda9cdb9d711c4bbafa835c3a786643f2aad324f24f700c4e2c9d3da |