从基本模板创建新的python包
pypkg-generator的Python项目详细描述
Pypkg生成器
Create a simple template of a python package.
使用简单的命令行工具创建python包的基本模板。
安装
OS X和Linux:
来自PYPI
$ pip3 install pypkg-generator
从源头出发
$ git clone https://github.com/dany2691/pypkg-generator.git
$ cd pypkg-generator
$ python3 setup.py install
用法示例
打开终端并键入:
$ pkg-generator --help
它将显示:
Options:
-n, --name TEXT The name of the package
-p, --path TEXT The path where the package will be created
--tests / --no-tests Create test suite directory or not, created by default
--help Show this message and exit.
有许多自定义选项,您可以决定是否创建文件。
您必须指定一个名称,否则项目将是名称forgotten\u name。
$ pkg-generator --name my-awesome-project
可以显式传递路径,否则,将在当前目录中创建项目。
$ pkg-generator --name my-awesome-project --path /home/user/Documents/
开发设置
此项目使用pipenv进行依赖性解析。这是一种混合 皮普和维图阿列诺夫。按照下面的说明设置开发环境。
$ git clone https://github.com/dany2691/pypkg-generator.git
$ cd pypkg-generator
$ pipenv shell
$ pip3 install -e .
要运行测试套件,请在pypkg generator目录内:
$ pytest -vv test/
元
丹尼尔·奥马尔·维加拉·佩雷斯–@dan1_net–daniel.omar.vergara@gmail.com
贡献
- 叉它(https://gitlab.com/hexagondata_projects/pypkg-generator)
- 创建功能分支(
git checkout -b feature/fooBar
) - 提交更改(
git commit -am 'Add some fooBar'
) - 推到分支(
git push origin feature/fooBar
) - 创建新的拉取请求