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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0557ddd898a528924898f6e7fab546bf0261f5a6af05fb7f905f2ce49c3e01e |
|
MD5 | 808d93c681c7dc2b1556b4a0576588ee |
|
BLAKE2b-256 | 57effc8f0a6ced0409d0fc83c97ae491920fb4a15d38ca987ff3817672aaf03c |
Hashes for reqstool_python_poetry_plugin-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cb21e0a751a6b6d62d03b2279a7e9aa22550730af75b9dfe147f0b085473c60 |
|
MD5 | 4e9f5e09f6d247b56ecf98ecd46b47ea |
|
BLAKE2b-256 | 1e1b96a05f50f5e85081791c11aa63acaba1cd0d39c0aef31dc8da91c3019682 |