rovidence-eval 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. rovidence_eval-0.1.0/.gitignore +8 -0
  2. rovidence_eval-0.1.0/LICENSE +21 -0
  3. rovidence_eval-0.1.0/PKG-INFO +255 -0
  4. rovidence_eval-0.1.0/README.md +227 -0
  5. rovidence_eval-0.1.0/examples/acceptance_gates.yaml +32 -0
  6. rovidence_eval-0.1.0/examples/sample_pilot_log.csv +217 -0
  7. rovidence_eval-0.1.0/pyproject.toml +47 -0
  8. rovidence_eval-0.1.0/schemas/pilot-config.schema.json +353 -0
  9. rovidence_eval-0.1.0/schemas/pilot-log-row.schema.json +110 -0
  10. rovidence_eval-0.1.0/schemas/pilot-report.schema.json +610 -0
  11. rovidence_eval-0.1.0/scripts/check_release.py +17 -0
  12. rovidence_eval-0.1.0/scripts/detect_release.py +48 -0
  13. rovidence_eval-0.1.0/scripts/smoke_test.py +28 -0
  14. rovidence_eval-0.1.0/src/rovidence_eval/__init__.py +42 -0
  15. rovidence_eval-0.1.0/src/rovidence_eval/calculator.py +296 -0
  16. rovidence_eval-0.1.0/src/rovidence_eval/cli.py +330 -0
  17. rovidence_eval-0.1.0/src/rovidence_eval/csvlog.py +332 -0
  18. rovidence_eval-0.1.0/src/rovidence_eval/data/acceptance_gates.yaml +32 -0
  19. rovidence_eval-0.1.0/src/rovidence_eval/data/blank_gates.yaml +28 -0
  20. rovidence_eval-0.1.0/src/rovidence_eval/data/sample_pilot_log.csv +217 -0
  21. rovidence_eval-0.1.0/src/rovidence_eval/evaluator.py +317 -0
  22. rovidence_eval-0.1.0/src/rovidence_eval/report.py +144 -0
  23. rovidence_eval-0.1.0/src/rovidence_eval/schemas.py +174 -0
  24. rovidence_eval-0.1.0/tests/__init__.py +0 -0
  25. rovidence_eval-0.1.0/tests/conftest.py +19 -0
  26. rovidence_eval-0.1.0/tests/fixtures/ts_vectors.json +1 -0
  27. rovidence_eval-0.1.0/tests/fixtures/web_report.json +535 -0
  28. rovidence_eval-0.1.0/tests/test_cli.py +159 -0
  29. rovidence_eval-0.1.0/tests/test_parity.py +82 -0
  30. rovidence_eval-0.1.0/tests/test_release_detection.py +38 -0
  31. rovidence_eval-0.1.0/tests/test_sample_report.py +55 -0
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.egg-info/
3
+ .pytest_cache/
4
+ .venv/
5
+ dist/
6
+ build/
7
+ report.json
8
+ report.md
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rovidence
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,255 @@
1
+ Metadata-Version: 2.5
2
+ Name: rovidence-eval
3
+ Version: 0.1.0
4
+ Summary: Vendor-neutral robot pilot acceptance checks: availability, MTBF, MTTR, mission success, interventions, cost per task and payback, scored against your Go/No-Go gates.
5
+ Project-URL: Homepage, https://rovidence.com/tools/robot-pilot-evaluator
6
+ Project-URL: Methodology, https://rovidence.com/methodology
7
+ Project-URL: Sample report, https://rovidence.com/sample-report
8
+ Author-email: Rovidence <hello@rovidence.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: acceptance-testing,amr,availability,kpi,mtbf,pilot,procurement,robotics,warehouse
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Manufacturing
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Requires-Python: >=3.9
20
+ Requires-Dist: pydantic<3,>=2.0
21
+ Requires-Dist: pyyaml>=6
22
+ Requires-Dist: rich>=13
23
+ Requires-Dist: typer>=0.9
24
+ Provides-Extra: test
25
+ Requires-Dist: packaging>=24; extra == 'test'
26
+ Requires-Dist: pytest>=7; extra == 'test'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # rovidence-eval
30
+
31
+ **Score a robot pilot against its Go/No-Go acceptance gates, using the same formulas as [rovidence.com](https://rovidence.com/methodology).**
32
+
33
+ > Not a terminal person? Use the browser version: **[rovidence.com/tools/robot-pilot-evaluator](https://rovidence.com/tools/robot-pilot-evaluator)**. Upload the same CSV, set the same gates, get the same verdict. No sign-up, and the file never leaves your browser.
34
+
35
+ `rovidence-eval` takes a pilot log (one row per shift or day, exported from a fleet manager, WMS or spreadsheet) and the buyer's acceptance gates, and returns:
36
+
37
+ - **Availability, MTBF, MTTR, mission success, interventions per 1,000 tasks, cost per task and payback**, overall and week by week
38
+ - a **pass/miss for every gate** and a **GO / CONDITIONAL GO / NO-GO** verdict, with the conditions a vendor has to close
39
+ - what's behind the numbers: the top failure and intervention causes, temperature context, and operator time spent on interventions
40
+ - a **JSON report with SHA-256 hashes** that anyone can check with `rovidence-eval verify`
41
+ - **exit codes** you can use to gate a pipeline
42
+
43
+ It's vendor-neutral and deterministic, and it runs offline. Every formula is a line-for-line port of the Rovidence app's metric engine. The test suite checks the results against vectors produced by the app's own TypeScript code, and the floats have to match exactly.
44
+
45
+ ## Quick start
46
+
47
+ ```sh
48
+ pip install rovidence-eval # or: uv tool install rovidence-eval / pipx install rovidence-eval
49
+ rovidence-eval init # writes sample_pilot_log.csv + acceptance_gates.yaml
50
+ rovidence-eval run sample_pilot_log.csv --gates acceptance_gates.yaml
51
+ ```
52
+
53
+ ```text
54
+ ROVIDENCE PILOT EVALUATION rovidence-eval 0.1.0
55
+ AMR each-picking pilot (illustrative sample) · Vendor A
56
+ 12 weeks · 84 days · 216 rows · 2026-06-08 → 2026-08-29
57
+
58
+ Gate Target Measured Result
59
+ ──────────────────────────────────────────────────────────────────
60
+ Availability ≥ 92% 91.2% MISS
61
+ MTBF ≥ 200 h 212 h PASS
62
+ MTTR ≤ 60 min 47 min PASS
63
+ Mission success ≥ 95% 96.8% PASS
64
+ Interventions ≤ 10 / 1,000 tasks 14.3 / 1,000 tasks MISS
65
+ Cost per task ≤ £0.15 £0.14 PASS
66
+ Payback ≤ 24 months 22 months PASS
67
+ Availability 91.2% Mission success 96.8% MTBF 212 h MTTR 47 min
68
+ ╭──────────────────────────────────────────────────────────────────────────────────────╮
69
+ │ │
70
+ │ CONDITIONAL GO 5 of 7 acceptance gates met │
71
+ │ │
72
+ │ Proceed to a phased rollout, conditional on the vendor closing the gaps on │
73
+ │ availability and interventions. Re-measure all acceptance gates at 90 days. │
74
+ │ │
75
+ │ Conditions │
76
+ │ • Vendor to demonstrate availability ≥ 92% (measured 91.2%) at re-measurement. │
77
+ │ • Vendor to demonstrate interventions ≤ 10 / 1,000 tasks (measured 14.3 / 1,000 │
78
+ │ tasks) at re-measurement. │
79
+ │ │
80
+ ╰──────────────────────────────────────────────────────────────────────────────────────╯
81
+
82
+ What the numbers show
83
+ • #1 failure cause: Thermal faults, 38% of 98 failure events (site averaged 31.0°C).
84
+ • #1 intervention cause: Exception handling (damaged / unreadable items), 61% of 9,152
85
+ interventions.
86
+ • At ~2 minutes per intervention, that's ~305 hours of operator time over 12 weeks —
87
+ roughly 68% of a full-time role shifted onto your floor team.
88
+ • 3 safety events logged; safety checks took 1,160 minutes of scheduled time.
89
+
90
+ Computed locally with rovidence-eval from the supplied log. Not reviewed by Rovidence:
91
+ treat every figure as self-reported (Tier 3) until the underlying export is verified.
92
+ Formulas: https://rovidence.com/methodology
93
+ ```
94
+
95
+ The sample is generated demo data for a 12-week, 12-AMR each-picking pilot. It reproduces the [Rovidence sample report](https://rovidence.com/sample-report) exactly.
96
+
97
+ ## Exit codes
98
+
99
+ | Code | Meaning |
100
+ |---:|---|
101
+ | 0 | **GO**: every gate passed |
102
+ | 2 | **CONDITIONAL GO**: at least two-thirds of gates passed |
103
+ | 1 | **NO-GO**: fewer than two-thirds passed |
104
+ | 3 | The log or config failed validation (row-numbered errors on stderr) |
105
+ | 4 | No gates configured, so there's no verdict |
106
+ | 64 | Command-line usage error |
107
+
108
+ ```sh
109
+ rovidence-eval run weekly_export.csv -g acceptance_gates.yaml -o report.json || echo "pilot not accepted ($?)"
110
+ ```
111
+
112
+ ## The pilot log (CSV)
113
+
114
+ This is the same format the Rovidence scorecard imports. Each row is one shift or one day, and every hour and minute figure is a fleet total.
115
+
116
+ ```
117
+ date,shift,operating_hours,assigned_tasks,completed_tasks,failures,failure_causes,downtime_minutes,repair_minutes,interventions,intervention_causes,charging_events,charging_minutes_lost,safety_events,safety_check_downtime,support_labor_hours,ambient_temp_c
118
+ 2026-06-08,Early,96,2568,2446,0,,30,0,39,exception_handling:22;rescue:12;restock_support:5,14,296,0,200,5.2,28.1
119
+ ```
120
+
121
+ | Column | Rules |
122
+ |---|---|
123
+ | `date` | `YYYY-MM-DD`. Slash dates are rejected because `08/06/2026` means different days in the UK and the US |
124
+ | `shift` | Any label (`Early`, `Late`, `Night`). Leave it blank for a daily row |
125
+ | `operating_hours` | Required (scheduled) robot-hours, fleet total, > 0 |
126
+ | `assigned_tasks`, `completed_tasks` | Whole numbers; completed ≤ assigned |
127
+ | `failures`, `failure_causes` | `cause:count;…` using `mechanical`, `software`, `connectivity`, `thermal`, `charging`, `operator_override`. The counts must add up to `failures` |
128
+ | `downtime_minutes`, `repair_minutes` | Stoppage and repair minutes |
129
+ | `interventions`, `intervention_causes` | `rescue`, `exception_handling`, `restock_support`, `other`. The counts must add up to `interventions` |
130
+ | `charging_events`, `charging_minutes_lost` | Count only charging that takes up scheduled time |
131
+ | `safety_events`, `safety_check_downtime` | Safety events, and scheduled minutes lost to safety checks |
132
+ | `support_labor_hours` | Staff hours spent supporting the robots |
133
+ | `ambient_temp_c` | Optional. Used for thermal context |
134
+
135
+ Rows are grouped into pilot weeks counted from `pilot_start`, or from the earliest row if it isn't set. The whole file is validated before anything is calculated, and every error is reported with its row number. Run `rovidence-eval schema columns` for the JSON Schema.
136
+
137
+ **Your export uses different column names?** Rename the headers. Or, in the browser tool or the Rovidence scorecard, map your columns to these fields once.
138
+
139
+ ## The pilot config (`acceptance_gates.yaml`)
140
+
141
+ ```yaml
142
+ pilot_name: "AMR each-picking pilot"
143
+ vendor_name: "Vendor A"
144
+ pilot_start: 2026-06-08
145
+ currency: GBP
146
+
147
+ gates: # the buyer's thresholds, set before the pilot; omit any you don't use
148
+ availability_min_pct: 92
149
+ mtbf_min_hours: 200
150
+ mttr_max_minutes: 60
151
+ mission_success_min_pct: 95
152
+ interventions_max_per_1000_tasks: 10
153
+ cost_per_task_max: 0.15 # needs costs
154
+ payback_max_months: 24 # needs costs + baseline
155
+
156
+ baseline:
157
+ manual_throughput_per_hour: 92 # tasks per labour hour before the robots; needed for payback
158
+ minutes_per_intervention: 2
159
+ fte_hours_per_week: 37.5
160
+
161
+ costs:
162
+ robot_monthly_cost: 20400 # fleet lease / RaaS / capex amortisation
163
+ integration_cost: 84000
164
+ integration_amort_months: 36
165
+ maintenance_monthly: 1950
166
+ labor_rate: 17.8 # fully loaded, per hour
167
+ total_investment: 273000
168
+ ```
169
+
170
+ Unknown keys are errors, so a typo like `min_mmbi:` can't silently turn a gate off. The camelCase keys used by the web tool's JSON export (`availabilityMin`, `robotMonthlyCost`, …) are accepted too. Run `rovidence-eval schema config` for the full schema.
171
+
172
+ ## How the numbers are calculated
173
+
174
+ | Metric | Formula |
175
+ |---|---|
176
+ | Availability | (operating hours − downtime − charging lost − safety-check downtime) ÷ operating hours. Nothing is excluded: the robot can't work while it charges or is being checked |
177
+ | MTBF | operating hours ÷ failures. With no failures, it's reported as *at least* the failure-free hours |
178
+ | MTTR | repair minutes ÷ failures |
179
+ | Mission success | completed ÷ assigned tasks |
180
+ | Interventions | interventions ÷ (completed tasks ÷ 1,000) |
181
+ | Cost per task | (robot cost + integration amortisation + maintenance + support labour) ÷ completed tasks, over the measured period |
182
+ | Payback | total investment ÷ (baseline labour cost for the same tasks − current monthly cost) |
183
+
184
+ Gates are compared at the precision they're reported at, so a displayed 91.2% never "passes" a 91.2% gate by a hidden decimal. Halves round up, as on rovidence.com.
185
+
186
+ **Verdict:** GO if every gate passes. CONDITIONAL GO if at least two-thirds pass; each miss becomes a condition. NO-GO otherwise. Full methodology: [rovidence.com/methodology](https://rovidence.com/methodology).
187
+
188
+ ## Python API
189
+
190
+ ```python
191
+ from rovidence_eval import evaluate_pilot_csv
192
+
193
+ report = evaluate_pilot_csv("sample_pilot_log.csv", "acceptance_gates.yaml")
194
+ print(report.verdict) # "GO" | "CONDITIONAL_GO" | "NO_GO" | None (no gates)
195
+ for gate in report.gates:
196
+ print(gate.label, gate.value_text, gate.threshold_text, "PASS" if gate.pass_ else "MISS")
197
+ print(report.model_dump_json(by_alias=True, indent=2))
198
+ ```
199
+
200
+ Lower-level functions are also exported: `parse_pilot_csv`, `aggregate_weeks`, `compute_metrics`, `evaluate_gates`, `verdict_for`, `PilotConfig` and `PilotDataError` (its `.errors` holds the row-numbered messages).
201
+
202
+ ## Other commands
203
+
204
+ | Command | What it does |
205
+ |---|---|
206
+ | `rovidence-eval run LOG [-g gates.yaml] [-f table\|json\|markdown] [-o report.json\|report.md] [--weeks]` | Evaluate. `LOG` can be `-` for stdin |
207
+ | `rovidence-eval init [DIR] [--blank]` | Write the sample pilot, or an empty template with `--blank` |
208
+ | `rovidence-eval verify report.json [--log LOG]` | Check that the report hasn't been edited. With `--log`, also check that it reproduces from that exact file. This works on reports downloaded from the browser tool too |
209
+ | `rovidence-eval push LOG --api-key KEY` | Send rows to **your private** Rovidence evaluation through the upload API (in batches of 250, safe to resend). Nothing is published |
210
+ | `rovidence-eval schema columns\|config\|report` | Print a JSON Schema |
211
+
212
+ ## What the report is and isn't
213
+
214
+ The JSON report records SHA-256 hashes of the input file, the config and the report itself. That proves the report hasn't been changed and makes it reproducible. It isn't a signature, and it doesn't prove the log is genuine. Results computed with this tool are **self-reported (Tier 3)** in Rovidence's [evidence tiers](https://rovidence.com/methodology) until the underlying export has been verified. Short pilots can miss rare failures and seasonal effects, so record the period, fleet size and workload alongside the verdict.
215
+
216
+ ## Development
217
+
218
+ ```sh
219
+ pip install -e ".[test]" && pytest
220
+ ```
221
+
222
+ `tests/fixtures/ts_vectors.json` is generated by running the Rovidence app's TypeScript engine (`tools/gen_vectors.mts`). If you change a formula in the app, regenerate the vectors and the tests will show any drift:
223
+
224
+ ```sh
225
+ cd ../rovidence-web && node --import tsx ../rovidence-eval/tools/gen_vectors.mts ../rovidence-eval/tests/fixtures/ts_vectors.json
226
+ ```
227
+ ### Each release: bump the version and push
228
+
229
+ 1. Increase `__version__` in `src/rovidence_eval/__init__.py`, for example from `0.1.0` to `0.1.1`.
230
+ 2. Commit and push to the repository's **default branch**, or merge a pull request containing the version bump.
231
+ 3. **Publish to PyPI** detects the changed version, runs the full CI and package checks, creates tag `v0.1.1` and publishes a GitHub release with generated release notes, then uploads the exact tested distributions to PyPI. No manual tag or release is needed. Approve the `pypi` environment only if you configured a reviewer.
232
+ 4. Confirm installation: `pip install rovidence-eval==0.1.1`, then `rovidence-eval --version`.
233
+
234
+ Unchanged versions and pushes to other branches do not release. Version decreases fail. Prerelease versions such as `0.2.0rc1` create GitHub prereleases. On an initial push with no previous version file, the current version is treated as the first release.
235
+
236
+ The workflow uses GitHub's built-in token to create the release and publishes to PyPI in the same run. No personal access token is needed. Keep the Trusted Publisher workflow filename as **`release.yml`**. If your `pypi` environment previously allowed only tags, also allow the default branch: automatic releases run from that branch.
237
+
238
+ Publishing a release manually remains supported. Its tag must match the package version, and the full checks still run. If automatic publishing fails after the GitHub release is created, rerun the failed workflow jobs; do not move an existing tag to another commit. PyPI does not allow replacing an uploaded version, so fixes to a published package require a new version. Duplicate uploads fail visibly.
239
+
240
+ ### Check a release locally without uploading
241
+
242
+ From the CLI repository root, in a fresh virtual environment:
243
+
244
+ ```sh
245
+ python -m pip install build twine
246
+ python -m build
247
+ python -m twine check --strict dist/*
248
+ python scripts/check_release.py
249
+ python -m pip install "dist/rovidence_eval-0.1.0-py3-none-any.whl[test]"
250
+ python scripts/smoke_test.py
251
+ python -m pytest -q
252
+ python -m pip check
253
+ ```
254
+
255
+ Replace the wheel version when releasing a later version. Start with an empty `dist/` directory so old releases cannot be included accidentally. Set `RELEASE_TAG=v0.1.0` when running `check_release.py` to test the tag guard too. The smoke test runs `init`, evaluation, JSON export, verification and schema output from a temporary directory, so missing wheel resources are caught before publication.
@@ -0,0 +1,227 @@
1
+ # rovidence-eval
2
+
3
+ **Score a robot pilot against its Go/No-Go acceptance gates, using the same formulas as [rovidence.com](https://rovidence.com/methodology).**
4
+
5
+ > Not a terminal person? Use the browser version: **[rovidence.com/tools/robot-pilot-evaluator](https://rovidence.com/tools/robot-pilot-evaluator)**. Upload the same CSV, set the same gates, get the same verdict. No sign-up, and the file never leaves your browser.
6
+
7
+ `rovidence-eval` takes a pilot log (one row per shift or day, exported from a fleet manager, WMS or spreadsheet) and the buyer's acceptance gates, and returns:
8
+
9
+ - **Availability, MTBF, MTTR, mission success, interventions per 1,000 tasks, cost per task and payback**, overall and week by week
10
+ - a **pass/miss for every gate** and a **GO / CONDITIONAL GO / NO-GO** verdict, with the conditions a vendor has to close
11
+ - what's behind the numbers: the top failure and intervention causes, temperature context, and operator time spent on interventions
12
+ - a **JSON report with SHA-256 hashes** that anyone can check with `rovidence-eval verify`
13
+ - **exit codes** you can use to gate a pipeline
14
+
15
+ It's vendor-neutral and deterministic, and it runs offline. Every formula is a line-for-line port of the Rovidence app's metric engine. The test suite checks the results against vectors produced by the app's own TypeScript code, and the floats have to match exactly.
16
+
17
+ ## Quick start
18
+
19
+ ```sh
20
+ pip install rovidence-eval # or: uv tool install rovidence-eval / pipx install rovidence-eval
21
+ rovidence-eval init # writes sample_pilot_log.csv + acceptance_gates.yaml
22
+ rovidence-eval run sample_pilot_log.csv --gates acceptance_gates.yaml
23
+ ```
24
+
25
+ ```text
26
+ ROVIDENCE PILOT EVALUATION rovidence-eval 0.1.0
27
+ AMR each-picking pilot (illustrative sample) · Vendor A
28
+ 12 weeks · 84 days · 216 rows · 2026-06-08 → 2026-08-29
29
+
30
+ Gate Target Measured Result
31
+ ──────────────────────────────────────────────────────────────────
32
+ Availability ≥ 92% 91.2% MISS
33
+ MTBF ≥ 200 h 212 h PASS
34
+ MTTR ≤ 60 min 47 min PASS
35
+ Mission success ≥ 95% 96.8% PASS
36
+ Interventions ≤ 10 / 1,000 tasks 14.3 / 1,000 tasks MISS
37
+ Cost per task ≤ £0.15 £0.14 PASS
38
+ Payback ≤ 24 months 22 months PASS
39
+ Availability 91.2% Mission success 96.8% MTBF 212 h MTTR 47 min
40
+ ╭──────────────────────────────────────────────────────────────────────────────────────╮
41
+ │ │
42
+ │ CONDITIONAL GO 5 of 7 acceptance gates met │
43
+ │ │
44
+ │ Proceed to a phased rollout, conditional on the vendor closing the gaps on │
45
+ │ availability and interventions. Re-measure all acceptance gates at 90 days. │
46
+ │ │
47
+ │ Conditions │
48
+ │ • Vendor to demonstrate availability ≥ 92% (measured 91.2%) at re-measurement. │
49
+ │ • Vendor to demonstrate interventions ≤ 10 / 1,000 tasks (measured 14.3 / 1,000 │
50
+ │ tasks) at re-measurement. │
51
+ │ │
52
+ ╰──────────────────────────────────────────────────────────────────────────────────────╯
53
+
54
+ What the numbers show
55
+ • #1 failure cause: Thermal faults, 38% of 98 failure events (site averaged 31.0°C).
56
+ • #1 intervention cause: Exception handling (damaged / unreadable items), 61% of 9,152
57
+ interventions.
58
+ • At ~2 minutes per intervention, that's ~305 hours of operator time over 12 weeks —
59
+ roughly 68% of a full-time role shifted onto your floor team.
60
+ • 3 safety events logged; safety checks took 1,160 minutes of scheduled time.
61
+
62
+ Computed locally with rovidence-eval from the supplied log. Not reviewed by Rovidence:
63
+ treat every figure as self-reported (Tier 3) until the underlying export is verified.
64
+ Formulas: https://rovidence.com/methodology
65
+ ```
66
+
67
+ The sample is generated demo data for a 12-week, 12-AMR each-picking pilot. It reproduces the [Rovidence sample report](https://rovidence.com/sample-report) exactly.
68
+
69
+ ## Exit codes
70
+
71
+ | Code | Meaning |
72
+ |---:|---|
73
+ | 0 | **GO**: every gate passed |
74
+ | 2 | **CONDITIONAL GO**: at least two-thirds of gates passed |
75
+ | 1 | **NO-GO**: fewer than two-thirds passed |
76
+ | 3 | The log or config failed validation (row-numbered errors on stderr) |
77
+ | 4 | No gates configured, so there's no verdict |
78
+ | 64 | Command-line usage error |
79
+
80
+ ```sh
81
+ rovidence-eval run weekly_export.csv -g acceptance_gates.yaml -o report.json || echo "pilot not accepted ($?)"
82
+ ```
83
+
84
+ ## The pilot log (CSV)
85
+
86
+ This is the same format the Rovidence scorecard imports. Each row is one shift or one day, and every hour and minute figure is a fleet total.
87
+
88
+ ```
89
+ date,shift,operating_hours,assigned_tasks,completed_tasks,failures,failure_causes,downtime_minutes,repair_minutes,interventions,intervention_causes,charging_events,charging_minutes_lost,safety_events,safety_check_downtime,support_labor_hours,ambient_temp_c
90
+ 2026-06-08,Early,96,2568,2446,0,,30,0,39,exception_handling:22;rescue:12;restock_support:5,14,296,0,200,5.2,28.1
91
+ ```
92
+
93
+ | Column | Rules |
94
+ |---|---|
95
+ | `date` | `YYYY-MM-DD`. Slash dates are rejected because `08/06/2026` means different days in the UK and the US |
96
+ | `shift` | Any label (`Early`, `Late`, `Night`). Leave it blank for a daily row |
97
+ | `operating_hours` | Required (scheduled) robot-hours, fleet total, > 0 |
98
+ | `assigned_tasks`, `completed_tasks` | Whole numbers; completed ≤ assigned |
99
+ | `failures`, `failure_causes` | `cause:count;…` using `mechanical`, `software`, `connectivity`, `thermal`, `charging`, `operator_override`. The counts must add up to `failures` |
100
+ | `downtime_minutes`, `repair_minutes` | Stoppage and repair minutes |
101
+ | `interventions`, `intervention_causes` | `rescue`, `exception_handling`, `restock_support`, `other`. The counts must add up to `interventions` |
102
+ | `charging_events`, `charging_minutes_lost` | Count only charging that takes up scheduled time |
103
+ | `safety_events`, `safety_check_downtime` | Safety events, and scheduled minutes lost to safety checks |
104
+ | `support_labor_hours` | Staff hours spent supporting the robots |
105
+ | `ambient_temp_c` | Optional. Used for thermal context |
106
+
107
+ Rows are grouped into pilot weeks counted from `pilot_start`, or from the earliest row if it isn't set. The whole file is validated before anything is calculated, and every error is reported with its row number. Run `rovidence-eval schema columns` for the JSON Schema.
108
+
109
+ **Your export uses different column names?** Rename the headers. Or, in the browser tool or the Rovidence scorecard, map your columns to these fields once.
110
+
111
+ ## The pilot config (`acceptance_gates.yaml`)
112
+
113
+ ```yaml
114
+ pilot_name: "AMR each-picking pilot"
115
+ vendor_name: "Vendor A"
116
+ pilot_start: 2026-06-08
117
+ currency: GBP
118
+
119
+ gates: # the buyer's thresholds, set before the pilot; omit any you don't use
120
+ availability_min_pct: 92
121
+ mtbf_min_hours: 200
122
+ mttr_max_minutes: 60
123
+ mission_success_min_pct: 95
124
+ interventions_max_per_1000_tasks: 10
125
+ cost_per_task_max: 0.15 # needs costs
126
+ payback_max_months: 24 # needs costs + baseline
127
+
128
+ baseline:
129
+ manual_throughput_per_hour: 92 # tasks per labour hour before the robots; needed for payback
130
+ minutes_per_intervention: 2
131
+ fte_hours_per_week: 37.5
132
+
133
+ costs:
134
+ robot_monthly_cost: 20400 # fleet lease / RaaS / capex amortisation
135
+ integration_cost: 84000
136
+ integration_amort_months: 36
137
+ maintenance_monthly: 1950
138
+ labor_rate: 17.8 # fully loaded, per hour
139
+ total_investment: 273000
140
+ ```
141
+
142
+ Unknown keys are errors, so a typo like `min_mmbi:` can't silently turn a gate off. The camelCase keys used by the web tool's JSON export (`availabilityMin`, `robotMonthlyCost`, …) are accepted too. Run `rovidence-eval schema config` for the full schema.
143
+
144
+ ## How the numbers are calculated
145
+
146
+ | Metric | Formula |
147
+ |---|---|
148
+ | Availability | (operating hours − downtime − charging lost − safety-check downtime) ÷ operating hours. Nothing is excluded: the robot can't work while it charges or is being checked |
149
+ | MTBF | operating hours ÷ failures. With no failures, it's reported as *at least* the failure-free hours |
150
+ | MTTR | repair minutes ÷ failures |
151
+ | Mission success | completed ÷ assigned tasks |
152
+ | Interventions | interventions ÷ (completed tasks ÷ 1,000) |
153
+ | Cost per task | (robot cost + integration amortisation + maintenance + support labour) ÷ completed tasks, over the measured period |
154
+ | Payback | total investment ÷ (baseline labour cost for the same tasks − current monthly cost) |
155
+
156
+ Gates are compared at the precision they're reported at, so a displayed 91.2% never "passes" a 91.2% gate by a hidden decimal. Halves round up, as on rovidence.com.
157
+
158
+ **Verdict:** GO if every gate passes. CONDITIONAL GO if at least two-thirds pass; each miss becomes a condition. NO-GO otherwise. Full methodology: [rovidence.com/methodology](https://rovidence.com/methodology).
159
+
160
+ ## Python API
161
+
162
+ ```python
163
+ from rovidence_eval import evaluate_pilot_csv
164
+
165
+ report = evaluate_pilot_csv("sample_pilot_log.csv", "acceptance_gates.yaml")
166
+ print(report.verdict) # "GO" | "CONDITIONAL_GO" | "NO_GO" | None (no gates)
167
+ for gate in report.gates:
168
+ print(gate.label, gate.value_text, gate.threshold_text, "PASS" if gate.pass_ else "MISS")
169
+ print(report.model_dump_json(by_alias=True, indent=2))
170
+ ```
171
+
172
+ Lower-level functions are also exported: `parse_pilot_csv`, `aggregate_weeks`, `compute_metrics`, `evaluate_gates`, `verdict_for`, `PilotConfig` and `PilotDataError` (its `.errors` holds the row-numbered messages).
173
+
174
+ ## Other commands
175
+
176
+ | Command | What it does |
177
+ |---|---|
178
+ | `rovidence-eval run LOG [-g gates.yaml] [-f table\|json\|markdown] [-o report.json\|report.md] [--weeks]` | Evaluate. `LOG` can be `-` for stdin |
179
+ | `rovidence-eval init [DIR] [--blank]` | Write the sample pilot, or an empty template with `--blank` |
180
+ | `rovidence-eval verify report.json [--log LOG]` | Check that the report hasn't been edited. With `--log`, also check that it reproduces from that exact file. This works on reports downloaded from the browser tool too |
181
+ | `rovidence-eval push LOG --api-key KEY` | Send rows to **your private** Rovidence evaluation through the upload API (in batches of 250, safe to resend). Nothing is published |
182
+ | `rovidence-eval schema columns\|config\|report` | Print a JSON Schema |
183
+
184
+ ## What the report is and isn't
185
+
186
+ The JSON report records SHA-256 hashes of the input file, the config and the report itself. That proves the report hasn't been changed and makes it reproducible. It isn't a signature, and it doesn't prove the log is genuine. Results computed with this tool are **self-reported (Tier 3)** in Rovidence's [evidence tiers](https://rovidence.com/methodology) until the underlying export has been verified. Short pilots can miss rare failures and seasonal effects, so record the period, fleet size and workload alongside the verdict.
187
+
188
+ ## Development
189
+
190
+ ```sh
191
+ pip install -e ".[test]" && pytest
192
+ ```
193
+
194
+ `tests/fixtures/ts_vectors.json` is generated by running the Rovidence app's TypeScript engine (`tools/gen_vectors.mts`). If you change a formula in the app, regenerate the vectors and the tests will show any drift:
195
+
196
+ ```sh
197
+ cd ../rovidence-web && node --import tsx ../rovidence-eval/tools/gen_vectors.mts ../rovidence-eval/tests/fixtures/ts_vectors.json
198
+ ```
199
+ ### Each release: bump the version and push
200
+
201
+ 1. Increase `__version__` in `src/rovidence_eval/__init__.py`, for example from `0.1.0` to `0.1.1`.
202
+ 2. Commit and push to the repository's **default branch**, or merge a pull request containing the version bump.
203
+ 3. **Publish to PyPI** detects the changed version, runs the full CI and package checks, creates tag `v0.1.1` and publishes a GitHub release with generated release notes, then uploads the exact tested distributions to PyPI. No manual tag or release is needed. Approve the `pypi` environment only if you configured a reviewer.
204
+ 4. Confirm installation: `pip install rovidence-eval==0.1.1`, then `rovidence-eval --version`.
205
+
206
+ Unchanged versions and pushes to other branches do not release. Version decreases fail. Prerelease versions such as `0.2.0rc1` create GitHub prereleases. On an initial push with no previous version file, the current version is treated as the first release.
207
+
208
+ The workflow uses GitHub's built-in token to create the release and publishes to PyPI in the same run. No personal access token is needed. Keep the Trusted Publisher workflow filename as **`release.yml`**. If your `pypi` environment previously allowed only tags, also allow the default branch: automatic releases run from that branch.
209
+
210
+ Publishing a release manually remains supported. Its tag must match the package version, and the full checks still run. If automatic publishing fails after the GitHub release is created, rerun the failed workflow jobs; do not move an existing tag to another commit. PyPI does not allow replacing an uploaded version, so fixes to a published package require a new version. Duplicate uploads fail visibly.
211
+
212
+ ### Check a release locally without uploading
213
+
214
+ From the CLI repository root, in a fresh virtual environment:
215
+
216
+ ```sh
217
+ python -m pip install build twine
218
+ python -m build
219
+ python -m twine check --strict dist/*
220
+ python scripts/check_release.py
221
+ python -m pip install "dist/rovidence_eval-0.1.0-py3-none-any.whl[test]"
222
+ python scripts/smoke_test.py
223
+ python -m pytest -q
224
+ python -m pip check
225
+ ```
226
+
227
+ Replace the wheel version when releasing a later version. Start with an empty `dist/` directory so old releases cannot be included accidentally. Set `RELEASE_TAG=v0.1.0` when running `check_release.py` to test the tag guard too. The smoke test runs `init`, evaluation, JSON export, verification and schema output from a temporary directory, so missing wheel resources are caught before publication.
@@ -0,0 +1,32 @@
1
+ # Rovidence pilot config: acceptance gates, baseline and costs.
2
+ # Illustrative values for the sample 12-week AMR each-picking pilot in sample_pilot_log.csv.
3
+ # The log is generated demo data; it reproduces https://rovidence.com/sample-report exactly.
4
+ pilot_name: "AMR each-picking pilot (illustrative sample)"
5
+ vendor_name: "Vendor A"
6
+ pilot_start: 2026-06-08 # day 1 of week 1; defaults to the earliest row
7
+ currency: GBP
8
+
9
+ # The buyer's go/no-go thresholds, set before the pilot. Delete a line to skip that gate.
10
+ gates:
11
+ availability_min_pct: 92 # uptime ÷ scheduled time; charging and safety checks count against it
12
+ mtbf_min_hours: 200 # fleet operating hours per failure
13
+ mttr_max_minutes: 60 # repair minutes per failure
14
+ mission_success_min_pct: 95 # completed ÷ assigned tasks
15
+ interventions_max_per_1000_tasks: 10
16
+ cost_per_task_max: 0.15 # needs costs below
17
+ payback_max_months: 24 # needs costs and baseline below
18
+
19
+ # Pre-pilot manual process. manual_throughput_per_hour is needed for payback.
20
+ baseline:
21
+ manual_throughput_per_hour: 92 # tasks per labour hour
22
+ minutes_per_intervention: 2 # operator time per intervention (default 2)
23
+ fte_hours_per_week: 37.5 # one full-time role (default 37.5)
24
+
25
+ # Pilot economics. robot_monthly_cost and labor_rate are needed for cost per task.
26
+ costs:
27
+ robot_monthly_cost: 20400 # 12 AMRs × £1,700/month RaaS
28
+ integration_cost: 84000
29
+ integration_amort_months: 36
30
+ maintenance_monthly: 1950
31
+ labor_rate: 17.8 # fully loaded, per hour
32
+ total_investment: 273000 # integration, site prep, Wi-Fi, chargers, commissioning, training