Skip to content

Commit b065554

Browse files
committed
Further improvements based on review comments
1 parent 6b4b898 commit b065554

10 files changed

Lines changed: 100 additions & 36 deletions

File tree

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/cli-commands.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ testbench-requirement-service [COMMAND] [OPTIONS]
2929
Create a new configuration file with an interactive wizard.
3030

3131
The wizard guides you through:
32-
1. Service settings (host, port, debug mode)
32+
1. Service settings (host, port)
3333
2. Credential setup (username, password)
3434
3. Reader selection (JSONL, Excel, Jira, or Custom)
3535
4. Reader-specific configuration
@@ -143,6 +143,15 @@ testbench-requirement-service start [OPTIONS]
143143

144144
Command-line arguments take **precedence** over configuration file settings.
145145

146+
:::info Built-in reader class names
147+
When using `--reader-class`, you can specify:
148+
- `JsonlRequirementReader` — for JSONL files
149+
- `ExcelRequirementReader` — for Excel/CSV files
150+
- `JiraRequirementReader` — for Jira API
151+
152+
Or provide a custom reader (e.g. `custom_reader.py` or `custom_reader.CustomClass`).
153+
:::
154+
146155
### Examples
147156

148157
```bash

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/configuration.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The following order shows which source takes precedence when the same setting is
3737
This example uses the JSONL reader. Adjust `reader_class` and `[testbench-requirement-service.reader_config]` for other readers.
3838

3939
```toml
40+
# config.toml
4041
[testbench-requirement-service]
4142
reader_class = "JsonlRequirementReader"
4243
host = "127.0.0.1"
@@ -99,6 +100,7 @@ The path is resolved relative to the directory where the service is started.
99100
**Example:**
100101

101102
```toml
103+
# config.toml
102104
[testbench-requirement-service]
103105
reader_class = "JsonlRequirementReader"
104106
reader_config_path = "jsonl_config.toml"
@@ -116,6 +118,7 @@ reader_config_path = "jsonl_config.toml"
116118
**Example:**
117119

118120
```toml
121+
# config.toml
119122
[testbench-requirement-service]
120123
host = "127.0.0.1"
121124
port = 8020
@@ -133,6 +136,7 @@ debug = true
133136
**Example:**
134137

135138
```toml
139+
# config.toml
136140
[testbench-requirement-service]
137141
password_hash = "your_generated_hash"
138142
salt = "your_generated_salt"
@@ -154,7 +158,7 @@ You will be prompted for a username and password. The command writes `password_h
154158
Non-interactive mode (e.g. for scripts or CI pipelines — avoid passing `--password` directly in a shared-environment shell to prevent it from being written to shell history):
155159

156160
```bash
157-
testbench-requirement-service set-credentials --username ADMIN --password PASSWORD
161+
testbench-requirement-service set-credentials --username ADMIN_USERNAME --password PASSWORD
158162
```
159163

160164
### HTTPS / TLS
@@ -168,6 +172,7 @@ testbench-requirement-service set-credentials --username ADMIN --password PASSWO
168172
**Example:**
169173

170174
```toml
175+
# config.toml
171176
[testbench-requirement-service]
172177
ssl_cert = "..."
173178
ssl_key = "..."
@@ -192,6 +197,7 @@ When using mTLS (`ssl_ca_cert`), the service runs in single-process mode.
192197
**Example:**
193198

194199
```toml
200+
# config.toml
195201
[testbench-requirement-service]
196202
proxies_count = 1
197203
real_ip_header = "X-Real-IP"
@@ -235,6 +241,7 @@ server {
235241
**Service configuration:**
236242

237243
```toml
244+
# config.toml
238245
[testbench-requirement-service]
239246
host = "127.0.0.1" # bind to localhost only
240247
port = 8020
@@ -270,6 +277,7 @@ Controls how Sanic spawns and manages its worker process. In most cases you can
270277
**Example:**
271278

272279
```toml
280+
# config.toml
273281
[testbench-requirement-service.server]
274282
single_process = false
275283
keep_alive_timeout = 3
@@ -292,6 +300,7 @@ run_kwargs = { workers = 4 }
292300
**Example:**
293301

294302
```toml
303+
# config.toml
295304
[testbench-requirement-service.logging.console]
296305
log_level = "INFO"
297306
log_format = "%(asctime)s %(levelname)8s: %(message)s"
@@ -310,6 +319,7 @@ log_format = "%(asctime)s %(levelname)8s: %(message)s"
310319
**Example:**
311320

312321
```toml
322+
# config.toml
313323
[testbench-requirement-service.logging.file]
314324
log_level = "INFO"
315325
log_format = "%(asctime)s - %(levelname)8s - %(name)s - %(message)s"

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/getting-started/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Use this option if you have Python installed or are about to install it.
5454
### Set up a virtual environment
5555

5656
:::note
57-
If you are installing [From source](#from-source-developers): create the virtual environment inside the cloned repository instead.
57+
If you are installing [from source](#from-source-developers): create the virtual environment inside the cloned repository instead.
5858
:::
5959

6060
A virtual environment keeps the installation isolated and provides a stable, predictable path to the executable. Navigate to the directory where you want the service to live, then run:
@@ -92,7 +92,7 @@ The base install includes the [JSONL reader](../readers/jsonl.md). Add extras fo
9292
| [Jira](../readers/jira.md) | `pip install testbench-requirement-service[jira]` |
9393
| All readers | `pip install testbench-requirement-service[excel,jira]` |
9494

95-
Verify:
95+
Verify installation:
9696
```bash
9797
testbench-requirement-service --version
9898
```
@@ -113,7 +113,7 @@ With optional extras:
113113
pip install "testbench_requirement_service-x.y.z-py3-none-any.whl[excel,jira]"
114114
```
115115

116-
Verify:
116+
Verify installation:
117117

118118
```bash
119119
testbench-requirement-service --version
@@ -154,7 +154,7 @@ Install with all readers and development dependencies:
154154
pip install -e .[excel,jira,dev]
155155
```
156156

157-
Verify:
157+
Verify installation:
158158

159159
```bash
160160
testbench-requirement-service --version

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/getting-started/quickstart.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ testbench-requirement-service init
1818
```
1919

2020
This single command walks you through:
21-
- Service settings (host, port, debug mode)
22-
- Credentials setup (username, password)
23-
- Reader selection (JSONL, Excel, Jira, or Custom)
24-
- Reader-specific configuration
21+
- [Service settings](../configuration.md#server) (host, port, debug mode)
22+
- [Credentials setup](../configuration.md#authentication) (username, password)
23+
- Reader selection ([JSONL](../readers/jsonl.md), [Excel](../readers/excel.md), [Jira](../readers/jira.md), or [Custom](../readers/custom.md))
24+
- Reader-specific configuration (see the chosen reader's Configuration section)
2525

2626
It creates a complete `config.toml` when finished.
2727

@@ -51,11 +51,12 @@ curl -u "ADMIN_USERNAME:PASSWORD" http://127.0.0.1:8020/projects
5151

5252
Choose the extras for your data source. See [Installation](installation.md#from-pypi-online-recommended) for available options.
5353

54-
### 2. Create `config.toml`
54+
### 2. Create the configuration file
5555

56-
Start from a minimal example. Here is one for the JSONL reader:
56+
Create a new file called `config.toml` in the root directory of your installation. Start from this minimal example for the JSONL reader:
5757

5858
```toml
59+
# config.toml
5960
[testbench-requirement-service]
6061
reader_class = "JsonlRequirementReader"
6162
host = "127.0.0.1"

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/readers/custom.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Create a Pydantic `BaseModel` for your reader's configuration. The service uses
2929

3030
```python
3131
# custom_reader.py
32-
3332
from pydantic import BaseModel
3433

3534

@@ -45,6 +44,7 @@ If your reader requires no configuration, you can skip this and leave `CONFIG_CL
4544
Inherit from `AbstractRequirementReader`, set `CONFIG_CLASS`, and implement all abstract methods. Your `__init__` receives an already-validated instance of your config model — you do not need to load or parse any config file yourself:
4645

4746
```python
47+
# custom_reader.py
4848
from testbench_requirement_service.readers.abstract_reader import AbstractRequirementReader
4949

5050

@@ -111,6 +111,7 @@ Point `reader_class` at your class and add the matching `reader_config` section.
111111
**Using a file path (recommended for single-file readers):**
112112

113113
```toml
114+
# config.toml
114115
[testbench-requirement-service]
115116
reader_class = "custom_reader.py"
116117

@@ -122,6 +123,7 @@ some_option = true
122123
**Using a module string (recommended for packaged readers):**
123124

124125
```toml
126+
# config.toml
125127
[testbench-requirement-service]
126128
reader_class = "my_package.my_module.CustomRequirementReader"
127129

@@ -133,6 +135,7 @@ some_option = true
133135
**Using a separate config file** (referenced via `reader_config_path`):
134136

135137
```toml
138+
# config.toml
136139
[testbench-requirement-service]
137140
reader_class = "custom_reader.py"
138141
reader_config_path = "custom_reader_config.toml"

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/readers/excel.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Can be set globally and overridden per project.
112112

113113
| Setting | Description | Default | Example |
114114
|---------|-------------|---------|---------|
115-
| `useExcelDirectly` | `true`: use `.xlsx`/`.xls` files.<br /> `false`: use text files | `false` | `true` |
115+
| `useExcelDirectly` | `true`: use `.xlsx`/`.xls` files.<br/>`false`: use text files | `false` | `true` |
116116
| `baselinesFromSubfolders` | Search subfolders for baseline files | `false` | `true` |
117117
| `worksheetName` | Worksheet name to use in Excel files (falls back to first sheet) | first sheet | `Tabelle1` |
118118
| `dateFormat` | Date format for version dates. Accepts Java `SimpleDateFormat` (e.g. `yyyy-MM-dd HH:mm:ss`) or Python `strftime` (e.g. `%Y-%m-%d %H:%M:%S`). Auto-detected by presence of `%`. Falls back to `dateutil` auto-detection. | auto | `yyyy-MM-dd HH:mm:ss` |
@@ -196,6 +196,7 @@ For `.properties` files: place a file named `<ProjectName>.properties` inside th
196196
When configuring inline in `config.toml`, keys containing dots must be **quoted**:
197197

198198
```toml
199+
# config.toml
199200
[testbench-requirement-service]
200201
reader_class = "ExcelRequirementReader"
201202

@@ -212,7 +213,30 @@ useExcelDirectly = false
212213
"requirement.status" = 5
213214
```
214215

215-
### `.properties` file
216+
### Separate `.toml` file
217+
218+
```toml
219+
# config.toml
220+
[testbench-requirement-service]
221+
reader_class = "ExcelRequirementReader"
222+
reader_config_path = "excel_config.toml"
223+
```
224+
225+
```toml
226+
# excel_config.toml (no section prefix)
227+
requirementsDataPath = "requirements/excel/"
228+
columnSeparator = ";"
229+
arrayValueSeparator = ","
230+
baselineFileExtensions = ".tsv,.csv,.txt"
231+
useExcelDirectly = false
232+
"requirement.id" = 1
233+
"requirement.version" = 6
234+
"requirement.name" = 3
235+
"requirement.owner" = 4
236+
"requirement.status" = 5
237+
```
238+
239+
### Separate `.properties` file
216240

217241
```properties
218242
# reader_config.properties

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/readers/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A **reader** is a pluggable component that fetches projects, baselines, and requ
1313
|--------|------------|-------------------|----------|
1414
| [**JSONL**](jsonl.md) | `.jsonl` files on disk | None (included in base install) | Simple file-based requirements, CI pipelines, testing |
1515
| [**Excel**](excel.md) | `.xlsx`, `.xls`, `.csv`, `.tsv`, `.txt` files | `pip install testbench-requirement-service[excel]` | Spreadsheet-based requirement management |
16-
| [**Jira**](jira.md) | Jira REST API | `pip install testbench-requirement-service[jira]` | Teams managing requirements as Jira issues |
16+
| [**Jira**](jira.md) | Jira REST API | `pip install testbench-requirement-service[jira]` | Teams managing requirements in Jira as issues |
1717

1818
## Choosing a reader
1919

@@ -33,7 +33,7 @@ The **default reader**, so no extra installation is needed. Use this when:
3333
Reads from Excel workbooks and delimited text files. Use this when:
3434
- Your requirements live in `.xlsx`, `.xls`, `.csv`, `.tsv`, or `.txt` files.
3535
- You need flexible column mapping to match your spreadsheet layout.
36-
- You want per-project configuration overrides via `.properties` files.
36+
- You want to be able to override the configuration for a project using `.properties` files.
3737

3838
Supports dataframe buffering for performance with large files.
3939

@@ -65,6 +65,7 @@ None of the built-in readers fit? You can create your own by subclassing `Abstra
6565
Set `reader_class` in your `config.toml` and provide reader-specific settings under `[testbench-requirement-service.reader_config]`:
6666

6767
```toml
68+
# config.toml
6869
[testbench-requirement-service]
6970
reader_class = "JsonlRequirementReader" # or ExcelRequirementReader, JiraRequirementReader
7071

@@ -75,6 +76,7 @@ reader_class = "JsonlRequirementReader" # or ExcelRequirementReader, JiraRequi
7576
Alternatively, keep reader settings in a separate file using `reader_config_path`:
7677

7778
```toml
79+
# config.toml
7880
[testbench-requirement-service]
7981
reader_class = "JiraRequirementReader"
8082
reader_config_path = "jira_config.toml"

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/readers/jira.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,18 @@ The Jira account needs the following permissions:
4545
### Minimal configuration
4646

4747
```toml
48+
# config.toml
4849
[testbench-requirement-service]
4950
reader_class = "JiraRequirementReader"
5051

5152
[testbench-requirement-service.reader_config]
5253
server_url = "https://example.atlassian.net/"
5354
auth_type = "basic"
55+
username = "my-user@example.com" # (or set JIRA_USERNAME as environment variable)
56+
password = "my-api-token" # (or set JIRA_PASSWORD as environment variable)
5457
```
5558

56-
With environment variables for credentials, run in the terminal:
59+
Set credentials via environment variables, e.g. run in the terminal:
5760

5861
```bash
5962
export JIRA_USERNAME=my-user@example.com
@@ -144,7 +147,11 @@ Pick the authentication flow that matches your Jira deployment. Credentials can
144147

145148
### Project-specific overrides
146149

147-
All requirement and baseline settings can be overridden per project under `[projects.<project>]` (separate config file) or `[testbench-requirement-service.reader_config.projects.<project>]` (inline in config.toml):
150+
All requirement and baseline settings can be overridden per project.
151+
152+
**Inline in `config.toml`:** Add a `[testbench-requirement-service.reader_config.projects.<project>]` section.
153+
154+
**Separate config file:** Add a `[projects.<project>]` section in your reader config file.
148155

149156
| Setting | Description | Default |
150157
|---------|-------------|---------|
@@ -162,6 +169,7 @@ All requirement and baseline settings can be overridden per project under `[proj
162169
### Inline TOML (recommended)
163170

164171
```toml
172+
# config.toml
165173
[testbench-requirement-service]
166174
reader_class = "JiraRequirementReader"
167175

docusaurus/testbench-requirement-service_versioned_docs/version-1.0.0/readers/jsonl.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ The configuration can be added directly to `config.toml` under `[testbench-requi
4545
### Minimal configuration
4646

4747
```toml
48+
# config.toml
4849
[testbench-requirement-service]
4950
reader_class = "JsonlRequirementReader"
5051

@@ -73,7 +74,7 @@ requirements_path = "requirements/jsonl/"
7374
| **Projects** | Top-level directories inside `requirements_path` | Each directory is a project |
7475
| **Baselines** | `.jsonl` files inside a project directory | Each file is a baseline |
7576
| **Requirements** | JSON objects (one per line) in a `.jsonl` file | Each line is a requirement or folder node |
76-
| **User-defined attributes** | `UserDefinedAttributes.json` at the top of `requirements_path` | Defines available types of user defined fields (UDF) |
77+
| **User-defined attributes** | `UserDefinedAttributes.json` at the top of `requirements_path` | Defines available types of user defined fields (UDF)|
7778

7879
## Requirement JSON schema
7980

@@ -119,18 +120,18 @@ Each line in a baseline `.jsonl` file is a JSON object representing either a req
119120

120121
| Field | Type | Description |
121122
|-------|------|-------------|
122-
| `name` | string | Requirement name |
123-
| `extendedID` | string | External ID |
124-
| `key.id` | string | Unique identifier |
125-
| `key.version` | object | Version info: `name`, `date`, `author`, `comment` |
126-
| `owner` | string | Responsible person |
127-
| `status` | string | Requirement status |
128-
| `priority` | string | Priority level |
129-
| `requirement` | boolean | `true` = requirement, `false` = folder/group |
130-
| `description` | string | Requirement description |
131-
| `documents` | string[] | Attached document references |
132-
| `parent` | string or null | Parent node ID (`null` for roots) |
133-
| `userDefinedAttributes` | array | User-defined fields (see below) |
123+
| `name` | String | Requirement name |
124+
| `extendedID` | String | Extended ID |
125+
| `key.id` | String | Unique identifier |
126+
| `key.version` | Object | Version info: `name`, `date`, `author`, `comment` |
127+
| `owner` | String | Responsible person |
128+
| `status` | String | Requirement status |
129+
| `priority` | String | Priority level |
130+
| `requirement` | Boolean | `true` = requirement, `false` = folder/group |
131+
| `description` | String | Requirement description |
132+
| `documents` | List[String] | Attached document references |
133+
| `parent` | String or null | Parent node ID (`null` for roots) |
134+
| `userDefinedAttributes` | List[Object] | User-defined fields (see below) |
134135

135136
## UserDefinedAttributes.json
136137

0 commit comments

Comments
 (0)