Reqstool Python Poetry Plugin
Project description
Reqstool Python Poetry Plugin
Description
This provides a generic plugin for Poetry that runs during the build process.
The plugin collects decorated code, formatting it and writing it to a annotations.yml file saved to the build/reqstool/
folder, utilizing the reqstool-python-decorators
package for the processing.
Installation
Plugin
The package name is reqstool-python-poetry-plugin
.
- Using poetry:
$poetry add reqstool-python-poetry-plugin
- pip install (unsure if working as intended):
$pip install reqstool-python-poetry-plugin
Dependencies
reqstool-decorators
The plugin reads decorators available in the reqstool-python-decorators
package.
$pip install reqstool-python-decorators
pyproject.toml
[tool.poetry.dependencies]
reqstool-python-decorators = "<version>"
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"]
In this example all files in "src" and "tests", including subfolders, will be processed.
Poetry
This will be added when running poetry add reqstool-python-poetry-plugin
[tool.poetry.dependencies]
reqstool-python-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-python-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
class, calling functions from the reqstool-python-decorators
package and generate a annotations.yml file in the build/reqstool/
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
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
File details
Details for the file reqstool_python_poetry_plugin-0.0.4.tar.gz
.
File metadata
- Download URL: reqstool_python_poetry_plugin-0.0.4.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9928c33b26ecca151af952b242f788b77fae5adf424d822868e4e6a963e4aa68 |
|
MD5 | d4eb7782c4ab5302f3b9a45f3d319f5d |
|
BLAKE2b-256 | 8a03f515f6e8e8d7124fe96492669463e4700ee6baf6e8db9ba3868bca304122 |
File details
Details for the file reqstool_python_poetry_plugin-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: reqstool_python_poetry_plugin-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77881f7ff356bfc628998eff3cc58ab0852d8ad6066a185c93c2e9259920ca60 |
|
MD5 | fb5fb94126fb2f1454b42a24333d7516 |
|
BLAKE2b-256 | d41e8c3256160beedc6a86129b63a073699f6fbc9b91cf9619ed055e78c9473a |