Usage

Basic Usage

Add the plugin and configure it in your pyproject.toml:

[tool.poetry.dependencies]
reqstool-python-decorators = "<version>"

[tool.reqstool]
sources = ["src", "tests"]
test_results = ["build/**/junit.xml"]
dataset_directory = "docs/reqstool"
output_directory = "build/reqstool"

Decorator Dependency

To use @Requirements and @SVCs decorators in your code, add the decorators package as a dependency:

[tool.poetry.dependencies]
reqstool-python-decorators = "<version>"

See reqstool-python-decorators for decorator usage.

Running the Build

poetry build

Default Lifecycle

The plugin integrates into the Poetry build process:

  1. poetry build is invoked

  2. The plugin scans sources directories for decorated code

  3. An annotations.yml is generated in the output_directory

  4. A reqstool_config.yml is created in the project root for sdist inclusion

  5. reqstool data is included in the built package

  6. The temporary reqstool_config.yml is removed after the build completes