跳转到主要内容

创建python项目骨架

项目描述

python-seed

python-seed

创建新Python包的启动套件。

Test Coverage Package version Downloads

这是一个创建新Python包的启动仓库。包括标准文件的模板以及最佳实践。

安装

您可以使用pip安装python-seed

$ pip install -U pip
$ pip install python-seed

或从源安装

$ git clone https://github.com/developmentseed/python-seed.git
$ cd python-seed
$ pip install -U pip
$ pip install -e .

用法

$ 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运行isortflake8pydocstringblack("坚定的Python代码格式化器")和mypy。

$ pre-commit install

关于

python-seed由Development Seed创建

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

python-seed-1.1.1.tar.gz (10.1 kB 查看哈希值)

上传时间

由以下支持