|
2 | 2 | sidebar_position: 1 |
3 | 3 | title: Installation |
4 | 4 | --- |
| 5 | + |
5 | 6 | # Installation |
6 | 7 |
|
7 | | -## Requirements |
| 8 | +There are two options depending on whether you want to install Python or not: |
| 9 | + |
| 10 | +- **[Option 1: Ready-to-use executable](#option-1-ready-to-use-executable)** (**No Python required**. Download a zip, extract, run. Best for Windows service deployments.) |
| 11 | +- **[Option 2: Install with Python](#option-2-install-with-python)** (For users who have Python or are installing it. Managed via pip.) |
8 | 12 |
|
9 | | -- **Python 3.10 or higher** — [Download Python](https://www.python.org/downloads/) |
10 | | -- **pip** — included with Python 3.4+; verify with `pip --version` |
11 | 13 | --- |
12 | 14 |
|
13 | | -## Option 1: Install from PyPI *(Recommended)* |
| 15 | +## Option 1: Ready-to-use executable |
14 | 16 |
|
15 | | -Install the latest release directly from [PyPI](https://pypi.org/project/testbench-defect-service/): |
| 17 | +The executable is a self-contained zip archive. No Python, no pip, no virtual environment needed. Both clients (JSONL and Jira) are included. |
16 | 18 |
|
17 | | -```bash |
18 | | -pip install testbench-defect-service |
| 19 | +**1. Download the zip** |
| 20 | + |
| 21 | +Either use the zip you received directly, or download it from the [GitHub releases page](https://github.com/imbus/testbench-defect-service/releases) — expand **Assets** and pick the file for your platform (e.g. `testbench-defect-service-x.y.z-win_amd64.zip`). |
| 22 | + |
| 23 | +**2. Extract to a permanent location** |
| 24 | + |
| 25 | +Unzip to a folder you won't move later, for example `C:\TestBenchDefectService\`: |
| 26 | + |
| 27 | +``` |
| 28 | +C:\TestBenchDefectService\ |
| 29 | + testbench-defect-service.exe |
| 30 | + <support files> |
19 | 31 | ``` |
20 | 32 |
|
21 | | -To include Jira support: |
| 33 | +**3. Verify** |
22 | 34 |
|
23 | | -```bash |
24 | | -pip install "testbench-defect-service[jira]" |
| 35 | +```cmd |
| 36 | +C:\TestBenchDefectService\testbench-defect-service.exe --version |
25 | 37 | ``` |
26 | 38 |
|
27 | 39 | --- |
28 | 40 |
|
29 | | -## Option 2: Install from a wheel package *(Offline)* |
| 41 | +## Option 2: Install with Python |
30 | 42 |
|
31 | | -Use this option when installing on a machine without internet access, for example when you received an offline installation package (`.zip`). |
| 43 | +Use this option if you have Python installed or are about to install it. |
32 | 44 |
|
33 | | -**1. Extract the zip:** |
| 45 | +### Requirements |
34 | 46 |
|
35 | | -Unzip the provided package to a local folder, e.g. `C:\install\`: |
| 47 | +- **Python 3.10–3.14** — 3.13 recommended ([download](https://www.python.org/downloads/)) |
| 48 | +- **pip** (included with Python) |
36 | 49 |
|
| 50 | +### Set up a virtual environment |
| 51 | + |
| 52 | +:::note |
| 53 | +For [From source](#from-source-developers): skip this step and create the virtual environment inside the cloned repository instead (shown there). |
| 54 | +::: |
| 55 | + |
| 56 | +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: |
| 57 | + |
| 58 | +```bash |
| 59 | +python -m venv .venv |
37 | 60 | ``` |
38 | | -C:\install\ |
39 | | - testbench_defect_service-x.y.z-py3-none-any.whl |
40 | | - <dependency wheels ...> |
| 61 | + |
| 62 | +```bash |
| 63 | +# Windows |
| 64 | +.venv\Scripts\activate |
| 65 | + |
| 66 | +# Linux / macOS |
| 67 | +source .venv/bin/activate |
41 | 68 | ``` |
42 | 69 |
|
43 | | -**2. Install from the local folder:** |
| 70 | +--- |
| 71 | + |
| 72 | +### From PyPI *(online, recommended)* |
44 | 73 |
|
45 | 74 | ```bash |
46 | | -pip install --no-index --find-links "C:\install" testbench-defect-service |
| 75 | +pip install testbench-defect-service |
47 | 76 | ``` |
48 | 77 |
|
49 | | -To include optional extras, add them as usual — pip will resolve them from the local folder: |
| 78 | +The base install includes the [JSONL client](../clients/jsonl-client.md). Add extras for other clients: |
50 | 79 |
|
| 80 | +| Client | Install command | |
| 81 | +|--------|-----------------| |
| 82 | +| [JSONL](../clients/jsonl-client.md) *(default)* | `pip install testbench-defect-service` | |
| 83 | +| [Jira](../clients/jira-client.md) | `pip install testbench-defect-service[jira]` | |
| 84 | + |
| 85 | +Verify: |
51 | 86 | ```bash |
52 | | -pip install --no-index --find-links "C:\install" testbench-defect-service[jira] |
| 87 | +testbench-defect-service --version |
53 | 88 | ``` |
54 | 89 |
|
55 | | -:::note |
56 | | -The offline package is platform- and Python-version-specific. Make sure you use the package that matches your system (e.g. `win_amd64`, `py310`). |
57 | | -::: |
58 | | - |
59 | 90 | --- |
60 | 91 |
|
61 | | -## Option 3: Install from Source *(Development)* |
| 92 | +### From a wheel file *(offline)* |
62 | 93 |
|
63 | | -Clone the repository and install in editable mode: |
| 94 | +Use this if you received a `.whl` file or downloaded one from the [GitHub releases page](https://github.com/imbus/testbench-defect-service/releases) (look for `testbench_defect_service-x.y.z-py3-none-any.whl` in the Assets). |
64 | 95 |
|
65 | 96 | ```bash |
66 | | -git clone https://github.com/imbus/testbench-defect-service.git |
67 | | -cd defect-service-python |
68 | | -pip install -e ".[dev,jira]" |
| 97 | +pip install testbench_defect_service-x.y.z-py3-none-any.whl |
69 | 98 | ``` |
70 | 99 |
|
71 | | -Available extras: |
| 100 | +With optional extras: |
| 101 | + |
| 102 | +```bash |
| 103 | +pip install "testbench_defect_service-x.y.z-py3-none-any.whl[jira]" |
| 104 | +``` |
72 | 105 |
|
73 | | -| Extra | Packages installed | When to use | |
74 | | -|---|---|---| |
75 | | -| *(default)* | — | Uses JSONL files as data source; included in base install | |
76 | | -| `jira` | `jira`, `beautifulsoup4` | Required for Jira backend | |
77 | | -| `dev` | `ruff`, `pre-commit`, `invoke`, `mypy`, `flit`, `wheel`, `robotframework`, `pytest`, … | Development, linting, and testing | |
| 106 | +Verify: |
78 | 107 |
|
79 | | ---- |
| 108 | +```bash |
| 109 | +testbench-defect-service --version |
| 110 | +``` |
| 111 | + |
| 112 | +:::note Fully offline install |
| 113 | +By default pip still fetches dependencies from PyPI. To install on a machine with no internet access: |
| 114 | + |
| 115 | +**On a machine with internet access**, download the wheel and all its dependencies into a local folder: |
| 116 | + |
| 117 | +```bash |
| 118 | +pip download "testbench_defect_service-x.y.z-py3-none-any.whl[jira]" -d ./wheels |
| 119 | +``` |
| 120 | + |
| 121 | +This saves every required wheel into `./wheels/`. Copy that folder together with the `.whl` file to the target machine. |
| 122 | + |
| 123 | +**On the target machine**, install entirely from the local folder: |
| 124 | + |
| 125 | +```bash |
| 126 | +pip install --no-index --find-links ./wheels "testbench_defect_service-x.y.z-py3-none-any.whl[jira]" |
| 127 | +``` |
| 128 | +::: |
80 | 129 |
|
81 | | -## Verifying the Installation |
| 130 | +--- |
82 | 131 |
|
83 | | -After installation, verify the CLI is available: |
| 132 | +### From source *(developers)* |
84 | 133 |
|
85 | 134 | ```bash |
86 | | -testbench-defect-service --help |
| 135 | +git clone https://github.com/imbus/testbench-defect-service.git |
| 136 | +cd testbench-defect-service |
87 | 137 | ``` |
88 | 138 |
|
89 | | -Expected output: |
| 139 | +Create and activate the virtual environment inside the cloned repository. See [Set up a virtual environment](#set-up-a-virtual-environment). |
90 | 140 |
|
| 141 | +Install with all clients and development dependencies: |
| 142 | + |
| 143 | +```bash |
| 144 | +pip install -e .[jira,dev] |
91 | 145 | ``` |
92 | | -Usage: testbench-defect-service [OPTIONS] COMMAND [ARGS]... |
93 | 146 |
|
94 | | -Options: |
95 | | - --help Show this message and exit. |
| 147 | +Verify: |
96 | 148 |
|
97 | | -Commands: |
98 | | - configure Create or update the service configuration interactively. |
99 | | - init Initialize a new service configuration interactively. |
100 | | - set-credentials Set the service username and password. |
101 | | - start Start the defect service. |
| 149 | +```bash |
| 150 | +testbench-defect-service --version |
102 | 151 | ``` |
103 | 152 |
|
104 | 153 | --- |
105 | 154 |
|
106 | | -## Next Step |
| 155 | +## Next steps |
107 | 156 |
|
108 | | -→ [Quick Start](quickstart.md) |
| 157 | +Head to the [Quickstart](quickstart.md) to configure and start the service. |
0 commit comments