Reqstool Python Poetry Plugin
Project description
Reqstool Python Poetry Plugin
Description
This provides a generic plugin for Poetry that runs during the build process.
What the plugin does is collect decorated code, formatting it and writing it to a yaml file saved to the dist
folder, utilizing the reqstool-decorators
package for the processing.
Installation
Plugin
The package name is reqstool-poetry-plugin
.
- Using poetry:
$poetry add reqstool-poetry-plugin
- pip install (unsure if working as intended):
$pip install reqstool-poetry-plugin
Dependencies
reqstool-decorators
The plugin reads decorators available in the reqstool-decorators
package.
$pip install reqstool-decorators
pyproject.toml
[tool.poetry.dependencies]
reqstool-decorators = "^0.1.5"
Usage
pyproject.toml
Paths
The plugin gets the paths where it will look for decorated code from ("." is filtered out):
[tool.pytest.ini_options]
pythonpath = [".", "src", "tests"]
So in this example all files in "src" and "tests", including subfolders, will be processed.
Poetry
This will be added when running poetry add reqstool-poetry-plugin
[tool.poetry.dependencies]
reqstool-poetry-plugin = "<version>"
Decorators
Used to decorate your code as seen in the examples below, the decorator processing that runs during the build process collects data from the decorated code.
Import decorators:
from reqstool-decorators.decorators.decorators import Requirements, SVCs
Example usage of the decorators:
@Requirements(REQ_111, REQ_222)
def somefunction():
@SVCs(SVC_111, SVC_222)
def test_somefunction():
Poetry build
When running $poetry build
or $poetry install
the plugin will run the activate
function located inside DecoratorsPlugin
, calling functions from the reqstool-decorators
package and generate a yaml file in the dist
folder containing formatted data on all decorated code found.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for reqstool_python_poetry_plugin-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81f53745597f80b03b1f2362537f2d1a1fb7e90305c5aeb9d9999595441024c6 |
|
MD5 | 2e2c0d55ee551d1bdd5df6265af9be3b |
|
BLAKE2b-256 | 1492e249e58c94df5a70f754a8b57008e19fb266e18cb7d79d20d89292f595c3 |
Hashes for reqstool_python_poetry_plugin-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09761a4cae8c49a6d2ca292fc6c4ce6f5842012dd12975d0c161aca2f788a6e6 |
|
MD5 | 6237acded2a27217ea2c50b376eda3b8 |
|
BLAKE2b-256 | 62c3d6a635f3121cb7bce84550dd682faefdfb55c4b47e6188baec6fdabc5efd |