You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Separate nav items instead of single include-based page
- Merge description.adoc content into index.adoc
- Remove license.adoc, add inline license to index.adoc
- Change nav label from Start to Overview
Signed-off-by: jimisola <jimisola@jimisola.com>
This Hatch build hook generates annotations and assembles reqstool data during `hatch build`. It collects decorated code using https://github.com/reqstool/reqstool-python-decorators[reqstool-python-decorators] and packages everything for consumption by the reqstool CLI.
4
4
5
-
include::configuration.adoc[]
5
+
=== Features
6
6
7
-
include::usage.adoc[]
7
+
* *Hatch integration*: Runs automatically as a build hook during `hatch build`
8
+
* *Combines annotations*: Collects `@Requirements` and `@SVCs` decorators from source and test code
9
+
* *Assembles package data*: Includes requirements, test results, and annotations in the built package
10
+
* *Generates config*: Creates a `reqstool_config.yml` with correct paths for the package structure
8
11
9
-
include::license.adoc[]
12
+
=== Quick Start
13
+
14
+
==== Add the Plugin
15
+
16
+
Add the build hook dependency to your `pyproject.toml`:
17
+
18
+
[source,toml]
19
+
----
20
+
[tool.hatch.build.hooks.reqstool]
21
+
dependencies = ["reqstool-python-hatch-plugin"]
22
+
----
23
+
24
+
==== Default Behavior
25
+
26
+
The plugin automatically:
27
+
28
+
1. Runs during `hatch build`
29
+
2. Scans source and test directories for `@Requirements` and `@SVCs` decorators
30
+
3. Generates an `annotations.yml` file in `build/reqstool/`
31
+
4. Creates a `reqstool_config.yml` with paths for the package structure
32
+
5. Includes reqstool data in the built package (sdist/wheel)
33
+
34
+
==== Minimal Setup
35
+
36
+
[source]
37
+
----
38
+
my-project/
39
+
├── pyproject.toml
40
+
├── docs/
41
+
│ └── reqstool/
42
+
│ └── requirements.yml (mandatory)
43
+
├── src/
44
+
└── tests/
45
+
----
46
+
47
+
Run `hatch build` and the annotations will be generated automatically.
48
+
49
+
=== Prerequisites
50
+
51
+
* Python 3.10+
52
+
* https://hatch.pypa.io/[Hatch]
53
+
* https://github.com/reqstool/reqstool-python-decorators[reqstool-python-decorators] as a project dependency
0 commit comments