Skip to content

Commit 8e5dc31

Browse files
author
Jimisola Laursen
committed
docs: streamline nav and page structure
- 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>
1 parent 445b456 commit 8e5dc31

4 files changed

Lines changed: 55 additions & 61 deletions

File tree

docs/modules/ROOT/nav.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
* xref:index.adoc[Start]
1+
* xref:index.adoc[Overview]
2+
* xref:configuration.adoc[Configuration]
3+
* xref:usage.adoc[Usage]

docs/modules/ROOT/pages/description.adoc

Lines changed: 0 additions & 53 deletions
This file was deleted.

docs/modules/ROOT/pages/index.adoc

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,57 @@
11
= Reqstool Python Hatch Plugin
22

3-
include::description.adoc[]
3+
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.
44

5-
include::configuration.adoc[]
5+
=== Features
66

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
811

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
54+
55+
== License
56+
57+
MIT License.

docs/modules/ROOT/pages/license.adoc

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)