reqstool Python Poetry Plugin
| Poetry plugin support is currently untested. Functionality may be broken. Contributions welcome. |
This Poetry plugin generates annotations and assembles reqstool data during poetry build and poetry install. It collects decorated code using reqstool-python-decorators and packages everything for consumption by the reqstool CLI.
Features
-
Poetry integration: Runs automatically during
poetry buildandpoetry install -
Combines annotations: Collects
@Requirementsand@SVCsdecorators from source and test code -
Assembles package data: Includes requirements, test results, and annotations in the built package
-
Generates config: Creates a
reqstool_config.ymlwith correct paths for the package structure
Default Behavior
When running poetry build the plugin will:
-
Scan source and test directories for
@Requirementsand@SVCsdecorators -
Generate an
annotations.ymlfile inbuild/reqstool/ -
Create a
reqstool_config.ymlin the project root for inclusion in the sdist -
Remove
reqstool_config.ymlfrom the project root after the build completes
When running poetry install the plugin will update pyproject.toml with the necessary include entries so reqstool files are bundled into distributions.
Minimal Setup
my-project/
├── pyproject.toml
├── docs/
│ └── reqstool/
│ └── requirements.yml (mandatory)
├── src/
└── tests/
Run poetry build and the annotations will be generated automatically.
Prerequisites
-
Python 3.13+
-
reqstool-python-decorators as a project dependency