创建python项目的框架
python-seed的Python项目详细描述
Python种子
在
starterkit用于创建新的python包。 在
这是一个用于创建新python包的starterrepo。包括标准文件的模板以及最佳实践。在
安装
您可以使用pip安装python seed
$ pip install -U pip $ pip install python-seed
或从源安装:
^{pr2}$使用
$ pyseed --help Usage: pyseed [OPTIONS] COMMAND [ARGS]... python-seed subcommands. Options: --version Show the version and exit. --help Show this message and exit. Commands: create Create new python seed skeleton
$ pyseed create --help
Usage: pyseed create [OPTIONS] NAME
Create new python seed skeleton.
Options:
--ci [circleci|github] Add CI configuration
--help Show this message and exit.
创建一个新的python项目
# Create a project without CI $ pyseed create awesomepythonproject # List files created $ ls -1 awesomepythonproject .pre-commit-config.yaml README.md awesomepythonproject/ requirements-dev.txt requirements.txt setup.py tests/ tox.ini
使用CI框架
# Create a project github actions $ pyseed create awesomepythonproject --ci github # List files created $ ls -1 awesomepythonproject .github/workflows/ci.yml codecov.yml .pre-commit-config.yaml README.md awesomepythonproject/ requirements-dev.txt requirements.txt setup.py tests/ tox.ini
项目结构
my-project/
├── .circleci/ or .github/ - CI configuration.
├── codecov.yml - codecov configuration (only if CI is added).
├── .pre-commit-config.yaml - pre-commit configuration.
├── README.md - project readme.
├── my_project/ - core python module.
├── tests/ - tests suite placeholder for your module.
├── requirements.txt - python requirements (!!! by default requirements are written in setup.py)
├── requirements-dev.txt - python dev requirements (!!! by default requirements are written in setup.py)
└──tox.ini - TOX configuration.
贡献与发展
问题和拉取请求非常受欢迎。在
dev安装
$ git clone https://github.com/developmentseed/python-seed.git $ cd python-seed $ pip install -e .[dev]
Python3.7仅限
此回购设置为在提交新代码时使用pre-commit
来运行isort,flake8,pydocstring,black(“不妥协的Python代码格式化程序”)和mypy。在
$ pre-commit install
关于
python seed由Development Seed创建
- 项目
标签: