Poetry Multiproject Plugin 使用教程

Poetry Multiproject Plugin 使用教程

poetry-multiproject-pluginA Poetry plugin that makes it simple to share code between projects in monorepos.项目地址:https://gitcode.com/gh_mirrors/po/poetry-multiproject-plugin

1. 项目的目录结构及介绍

poetry-multiproject-plugin/
├── README.md
├── poetry_multiproject_plugin/
│   ├── __init__.py
│   ├── build_project.py
│   ├── check_project.py
│   └── utils.py
├── tests/
│   ├── __init__.py
│   ├── test_build_project.py
│   └── test_check_project.py
├── pyproject.toml
└── .gitignore
  • README.md: 项目说明文档。
  • poetry_multiproject_plugin/: 项目的主要代码目录。
    • __init__.py: 模块初始化文件。
    • build_project.py: 实现 build-project 命令的代码。
    • check_project.py: 实现 check-project 命令的代码。
    • utils.py: 工具函数。
  • tests/: 测试代码目录。
    • __init__.py: 测试模块初始化文件。
    • test_build_project.py: 测试 build-project 命令的代码。
    • test_check_project.py: 测试 check-project 命令的代码。
  • pyproject.toml: 项目的配置文件。
  • .gitignore: Git 忽略文件配置。

2. 项目的启动文件介绍

项目的启动文件主要是 pyproject.toml 文件中的配置,通过 Poetry 命令来启动项目。

[tool.poetry]
name = "poetry-multiproject-plugin"
version = "1.6.0"
description = "A Poetry plugin that makes it possible to use relative package includes"
authors = ["David Vujic <david.vujic@gmail.com>"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.dev-dependencies]
pytest = "^6.2"

[tool.poetry.plugins."poetry.application.plugin"]
"poetry-multiproject-plugin" = "poetry_multiproject_plugin:MultiProjectPlugin"
  • [tool.poetry]: 项目的基本信息。
  • [tool.poetry.dependencies]: 项目依赖。
  • [tool.poetry.dev-dependencies]: 开发依赖。
  • [tool.poetry.plugins."poetry.application.plugin"]: 插件注册。

3. 项目的配置文件介绍

项目的配置文件主要是 pyproject.toml 文件,其中包含了项目的依赖、插件注册等信息。

[tool.poetry]
name = "poetry-multiproject-plugin"
version = "1.6.0"
description = "A Poetry plugin that makes it possible to use relative package includes"
authors = ["David Vujic <david.vujic@gmail.com>"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.dev-dependencies]
pytest = "^6.2"

[tool.poetry.plugins."poetry.application.plugin"]
"poetry-multiproject-plugin" = "poetry_multiproject_plugin:MultiProjectPlugin"
  • [tool.poetry]: 项目的基本信息。
  • [tool.poetry.dependencies]: 项目依赖。
  • [tool.poetry.dev-dependencies]: 开发依赖。
  • [tool.poetry.plugins."poetry.application.plugin"]: 插件注册。

通过以上配置,可以使用 Poetry 命令来安装和使用该插件。

poetry-multiproject-pluginA Poetry plugin that makes it simple to share code between projects in monorepos.项目地址:https://gitcode.com/gh_mirrors/po/poetry-multiproject-plugin

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

时飞城Herdsman

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值