roombapy-prime-tools 0.3.1__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 (45) hide show
  1. roombapy_prime_tools-0.3.1/LICENSE +21 -0
  2. roombapy_prime_tools-0.3.1/PKG-INFO +194 -0
  3. roombapy_prime_tools-0.3.1/README.md +173 -0
  4. roombapy_prime_tools-0.3.1/pyproject.toml +87 -0
  5. roombapy_prime_tools-0.3.1/roombapy_prime_tools/__init__.py +15 -0
  6. roombapy_prime_tools-0.3.1/roombapy_prime_tools/_cli.py +359 -0
  7. roombapy_prime_tools-0.3.1/roombapy_prime_tools/name_clean_zone.py +264 -0
  8. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_favorite_write.py +365 -0
  9. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_local_channel.py +533 -0
  10. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_map_edit.py +606 -0
  11. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_mission_commands.py +380 -0
  12. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_mission_timeline.py +626 -0
  13. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_named_shadows.py +219 -0
  14. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_region_commands.py +2246 -0
  15. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_region_commands_session.py +292 -0
  16. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_schedule_write.py +295 -0
  17. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_settings_write.py +291 -0
  18. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_virtual_wall_write.py +457 -0
  19. roombapy_prime_tools-0.3.1/roombapy_prime_tools/verify_writes.py +1941 -0
  20. roombapy_prime_tools-0.3.1/roombapy_prime_tools.egg-info/PKG-INFO +194 -0
  21. roombapy_prime_tools-0.3.1/roombapy_prime_tools.egg-info/SOURCES.txt +43 -0
  22. roombapy_prime_tools-0.3.1/roombapy_prime_tools.egg-info/dependency_links.txt +1 -0
  23. roombapy_prime_tools-0.3.1/roombapy_prime_tools.egg-info/entry_points.txt +15 -0
  24. roombapy_prime_tools-0.3.1/roombapy_prime_tools.egg-info/requires.txt +6 -0
  25. roombapy_prime_tools-0.3.1/roombapy_prime_tools.egg-info/top_level.txt +1 -0
  26. roombapy_prime_tools-0.3.1/setup.cfg +4 -0
  27. roombapy_prime_tools-0.3.1/tests/test_flow_control_all.py +179 -0
  28. roombapy_prime_tools-0.3.1/tests/test_main_safety_gates.py +268 -0
  29. roombapy_prime_tools-0.3.1/tests/test_mqtt_connection_required.py +82 -0
  30. roombapy_prime_tools-0.3.1/tests/test_name_clean_zone.py +734 -0
  31. roombapy_prime_tools-0.3.1/tests/test_no_getattr_on_wire_data.py +111 -0
  32. roombapy_prime_tools-0.3.1/tests/test_tools_cli.py +102 -0
  33. roombapy_prime_tools-0.3.1/tests/test_verify_favorite_write.py +102 -0
  34. roombapy_prime_tools-0.3.1/tests/test_verify_local_channel.py +318 -0
  35. roombapy_prime_tools-0.3.1/tests/test_verify_map_edit.py +173 -0
  36. roombapy_prime_tools-0.3.1/tests/test_verify_map_edit_pickers.py +156 -0
  37. roombapy_prime_tools-0.3.1/tests/test_verify_mission_commands.py +242 -0
  38. roombapy_prime_tools-0.3.1/tests/test_verify_mission_timeline.py +364 -0
  39. roombapy_prime_tools-0.3.1/tests/test_verify_named_shadows.py +200 -0
  40. roombapy_prime_tools-0.3.1/tests/test_verify_region_commands.py +1563 -0
  41. roombapy_prime_tools-0.3.1/tests/test_verify_region_commands_session.py +191 -0
  42. roombapy_prime_tools-0.3.1/tests/test_verify_schedule_write.py +195 -0
  43. roombapy_prime_tools-0.3.1/tests/test_verify_settings_write.py +258 -0
  44. roombapy_prime_tools-0.3.1/tests/test_verify_virtual_wall_write.py +341 -0
  45. roombapy_prime_tools-0.3.1/tests/test_verify_writes.py +2061 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jean-Christoph (@johnnyh1975)
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,194 @@
1
+ Metadata-Version: 2.4
2
+ Name: roombapy-prime-tools
3
+ Version: 0.3.1
4
+ Summary: Diagnostic and field-test tooling for roombapy-prime (moves real robots -- read the safety notes)
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/johnnyh1975/roombapy-prime
7
+ Project-URL: Issues, https://github.com/johnnyh1975/roombapy-prime/issues
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Topic :: Home Automation
12
+ Requires-Python: >=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: roombapy-prime==0.3.1
16
+ Provides-Extra: test
17
+ Requires-Dist: pytest>=8.0; extra == "test"
18
+ Requires-Dist: pytest-asyncio>=0.24; extra == "test"
19
+ Requires-Dist: pytest-cov>=5.0; extra == "test"
20
+ Dynamic: license-file
21
+
22
+ # roombapy-prime-tools
23
+
24
+ Diagnostic and field-test tooling for
25
+ [roombapy-prime](https://github.com/johnnyh1975/roombapy-prime).
26
+
27
+ > **These scripts move a real robot.** That is why they are a separate
28
+ > distribution: the library itself is installed into Home Assistant setups via
29
+ > `ha_roomba_plus`, and robot-moving commands have no business on the PATH of
30
+ > every one of those installations. Installing the library alone gives you
31
+ > **no** console scripts at all.
32
+
33
+ ## What this is for
34
+
35
+ Almost everything this project knows about the Prime/V4 protocol came from
36
+ someone running one of these against their own robot and reporting back. If you
37
+ own a Prime robot, that is by far the most useful thing you can do — and the
38
+ read-only stages cannot change anything, so it costs you nothing but a few
39
+ minutes.
40
+
41
+ ## Install
42
+
43
+ One command; it pulls the library in as a dependency:
44
+
45
+ ```bash
46
+ python3 -m venv ~/roombapy-test-venv
47
+ source ~/roombapy-test-venv/bin/activate
48
+
49
+ pip install "roombapy-prime-tools@git+https://github.com/johnnyh1975/roombapy-prime.git@v0.3.0b10#subdirectory=tools"
50
+ ```
51
+
52
+ Requires Python 3.11+. You will need to re-run the `source` line each time you
53
+ open a new terminal.
54
+
55
+ **These are not part of Home Assistant.** They run on your own computer,
56
+ outside HA entirely. HACS does not install them and does not need to.
57
+
58
+ ## Account details
59
+
60
+ Set these once per terminal rather than retyping a 32-character BLID on every
61
+ command — every script reads them:
62
+
63
+ ```bash
64
+ export ROOMBAPY_PRIME_USERNAME="you@example.com"
65
+ export ROOMBAPY_PRIME_BLID="YOUR_ROBOT_BLID"
66
+ export ROOMBAPY_PRIME_COUNTRY="US" # your own: DE, FR, IT, ES ...
67
+ ```
68
+
69
+ The country code matters — it selects which regional endpoint you authenticate
70
+ against, and the default is `US`.
71
+
72
+ The password is deliberately **not** a command-line argument: it would end up
73
+ in your shell history and in any terminal output you paste into an issue. Set
74
+ `ROOMBAPY_PRIME_PASSWORD` for unattended runs, or let it prompt.
75
+
76
+ Any of these can be overridden per-run with `--username`/`--blid`/
77
+ `--country-code`.
78
+
79
+ ## Start here
80
+
81
+ ```bash
82
+ roombapy-prime-validate
83
+ ```
84
+
85
+ Read-only. Logs in, reads state, shadows, favorites, maps and mission history,
86
+ then prints a report. Sends nothing to the robot. Its output alone answers
87
+ several currently open questions.
88
+
89
+ Add `--dump-config diagnose.json` to save the raw responses. **Review that file
90
+ before sharing it** — redaction catches the known cases, but cannot guarantee
91
+ every surprise in an unfamiliar response shape.
92
+
93
+ ## The staged safety model
94
+
95
+ Every script that can change something follows the same pattern:
96
+
97
+ 1. **Stage 0** — reconnaissance. Reads only, sends nothing, needs no flag.
98
+ 2. **Stage 1+** — each requires an explicit `--i-understand-this-...` flag
99
+ **and** an interactive confirmation showing the exact payload before
100
+ anything is sent.
101
+
102
+ Start at stage 0. A stage-0 result is a genuinely useful contribution on its
103
+ own — several findings in this project came from nothing more.
104
+
105
+ Everything validates *before* asking for your password, so an incomplete
106
+ command tells you what is missing without making you type credentials first.
107
+
108
+ ## The scripts
109
+
110
+ | Command | What it does |
111
+ |---|---|
112
+ | `roombapy-prime-validate` | Full read-only validation run. **Start here.** |
113
+ | `…-verify-named-shadows` | Dumps all nine device shadows. The single richest source of protocol data. |
114
+ | `…-verify-commands` | Basic mission commands (start/stop/dock/…) with before/after state. |
115
+ | `…-verify-mission-timeline` | Watches the live mission/event topics. Read-only unless `--start-mission`. |
116
+ | `…-verify-region-commands` | Room-specific cleaning, staged. **Confirmed working** — see below. `--list-rooms` shows rooms *and* zones, with the source of each name. |
117
+ | `…-verify-region-commands-session` | The above as one guided session — one login, prompts between stages. |
118
+ | `…-verify-map-edit` | Renames one room and reverts it. |
119
+ | `…-verify-favorite-write` | Create/update/delete saved routines. |
120
+ | `…-verify-schedule-write` | Resend and disable schedules. |
121
+ | `…-verify-virtual-wall-write` | Keep-out zones and virtual walls. **Writes work** — the HTTP 500 was solved before 0.2.0b1. Untested: a write carrying a *changed* list. |
122
+ | `…-name-clean-zone` | Names a clean zone. **Full-list rewrite** — anything omitted is deleted. Dry run by default. |
123
+ | `…-verify-settings-write` | Child lock, eco charge, schedule hold, … Writes confirmed; most effects untested. |
124
+
125
+ Every script has `--help`, and it is worth reading before a first run.
126
+
127
+ The last two are the easiest way to contribute something genuinely new — both
128
+ start read-only.
129
+
130
+ ## Region commands: solved, and worth re-running
131
+
132
+ Room-specific cleaning works. It took three rounds to establish, and two
133
+ things were required that are not obvious:
134
+
135
+ - **`initiator` is mandatory.** A stored favorite does not carry one, so
136
+ resending one unchanged is accepted, acknowledged and silently ignored.
137
+ - **The wire keys are `start` and `region_id`**, not `clean` and `id`.
138
+
139
+ ```bash
140
+ roombapy-prime-verify-region-commands-session \
141
+ --i-understand-this-will-move-my-robot \
142
+ --i-understand-this-is-experimental-and-unconfirmed
143
+ ```
144
+
145
+ It lists your eligible favorites and you pick one by number. **Watch the
146
+ robot while it runs.** The fastest stop is the real iRobot app or the
147
+ button on the robot.
148
+
149
+ Two notes from the sessions that got this working:
150
+
151
+ - A favorite made from **specific rooms** tells you far more than a
152
+ whole-home one. If the robot cleans everything, you have only learned
153
+ that the command arrived.
154
+ - Check the delivery confirmation in the output. Every stage that
155
+ received one started a mission; every stage that did not got nothing.
156
+ A "nothing happened" without a confirmation says nothing about the
157
+ payload.
158
+
159
+ ## Virtual walls: reads work, writes do not
160
+
161
+ Stage 0 (`--list-maps`, then `--list-walls`) works and is read-only.
162
+ It is how the zone types were confirmed against real data.
163
+
164
+ `--update-unchanged` **works.** The HTTP 500 this paragraph described
165
+ was solved before 0.2.0b1 — `virwall` starts with a COUNT of the walls —
166
+ and confirmed on two accounts, including the write / re-read / write
167
+ round trip that separates "accepted" from "stored".
168
+
169
+ **What is still untested: a write carrying a CHANGED list.** Every
170
+ confirmed write resent its zones unchanged, and `set_virtual_wall`
171
+ replaces the whole shared list — anything omitted is deleted.
172
+
173
+ ## Developing from an unreleased checkout
174
+
175
+ The pin above names a git tag, which does not exist yet while a version is
176
+ still in development. From a checkout, install the core editable first and skip
177
+ dependency resolution here:
178
+
179
+ ```bash
180
+ pip install -e . # from the repository root
181
+ pip install -e ./tools --no-deps
182
+ ```
183
+
184
+ Without `--no-deps`, pip fetches a second, unrelated copy of the core from
185
+ GitHub and shadows your editable one — which then fails in ways that look like
186
+ a code bug rather than an install problem. The CI does exactly this, for
187
+ exactly this reason.
188
+
189
+ ## Versioning
190
+
191
+ This distribution pins an exact core version. The scripts reach deep into the
192
+ library, so a mismatched pair fails confusingly rather than cleanly —
193
+ `scripts/check_version_pin.py` in the repository root enforces that the two
194
+ stay in step.
@@ -0,0 +1,173 @@
1
+ # roombapy-prime-tools
2
+
3
+ Diagnostic and field-test tooling for
4
+ [roombapy-prime](https://github.com/johnnyh1975/roombapy-prime).
5
+
6
+ > **These scripts move a real robot.** That is why they are a separate
7
+ > distribution: the library itself is installed into Home Assistant setups via
8
+ > `ha_roomba_plus`, and robot-moving commands have no business on the PATH of
9
+ > every one of those installations. Installing the library alone gives you
10
+ > **no** console scripts at all.
11
+
12
+ ## What this is for
13
+
14
+ Almost everything this project knows about the Prime/V4 protocol came from
15
+ someone running one of these against their own robot and reporting back. If you
16
+ own a Prime robot, that is by far the most useful thing you can do — and the
17
+ read-only stages cannot change anything, so it costs you nothing but a few
18
+ minutes.
19
+
20
+ ## Install
21
+
22
+ One command; it pulls the library in as a dependency:
23
+
24
+ ```bash
25
+ python3 -m venv ~/roombapy-test-venv
26
+ source ~/roombapy-test-venv/bin/activate
27
+
28
+ pip install "roombapy-prime-tools@git+https://github.com/johnnyh1975/roombapy-prime.git@v0.3.0b10#subdirectory=tools"
29
+ ```
30
+
31
+ Requires Python 3.11+. You will need to re-run the `source` line each time you
32
+ open a new terminal.
33
+
34
+ **These are not part of Home Assistant.** They run on your own computer,
35
+ outside HA entirely. HACS does not install them and does not need to.
36
+
37
+ ## Account details
38
+
39
+ Set these once per terminal rather than retyping a 32-character BLID on every
40
+ command — every script reads them:
41
+
42
+ ```bash
43
+ export ROOMBAPY_PRIME_USERNAME="you@example.com"
44
+ export ROOMBAPY_PRIME_BLID="YOUR_ROBOT_BLID"
45
+ export ROOMBAPY_PRIME_COUNTRY="US" # your own: DE, FR, IT, ES ...
46
+ ```
47
+
48
+ The country code matters — it selects which regional endpoint you authenticate
49
+ against, and the default is `US`.
50
+
51
+ The password is deliberately **not** a command-line argument: it would end up
52
+ in your shell history and in any terminal output you paste into an issue. Set
53
+ `ROOMBAPY_PRIME_PASSWORD` for unattended runs, or let it prompt.
54
+
55
+ Any of these can be overridden per-run with `--username`/`--blid`/
56
+ `--country-code`.
57
+
58
+ ## Start here
59
+
60
+ ```bash
61
+ roombapy-prime-validate
62
+ ```
63
+
64
+ Read-only. Logs in, reads state, shadows, favorites, maps and mission history,
65
+ then prints a report. Sends nothing to the robot. Its output alone answers
66
+ several currently open questions.
67
+
68
+ Add `--dump-config diagnose.json` to save the raw responses. **Review that file
69
+ before sharing it** — redaction catches the known cases, but cannot guarantee
70
+ every surprise in an unfamiliar response shape.
71
+
72
+ ## The staged safety model
73
+
74
+ Every script that can change something follows the same pattern:
75
+
76
+ 1. **Stage 0** — reconnaissance. Reads only, sends nothing, needs no flag.
77
+ 2. **Stage 1+** — each requires an explicit `--i-understand-this-...` flag
78
+ **and** an interactive confirmation showing the exact payload before
79
+ anything is sent.
80
+
81
+ Start at stage 0. A stage-0 result is a genuinely useful contribution on its
82
+ own — several findings in this project came from nothing more.
83
+
84
+ Everything validates *before* asking for your password, so an incomplete
85
+ command tells you what is missing without making you type credentials first.
86
+
87
+ ## The scripts
88
+
89
+ | Command | What it does |
90
+ |---|---|
91
+ | `roombapy-prime-validate` | Full read-only validation run. **Start here.** |
92
+ | `…-verify-named-shadows` | Dumps all nine device shadows. The single richest source of protocol data. |
93
+ | `…-verify-commands` | Basic mission commands (start/stop/dock/…) with before/after state. |
94
+ | `…-verify-mission-timeline` | Watches the live mission/event topics. Read-only unless `--start-mission`. |
95
+ | `…-verify-region-commands` | Room-specific cleaning, staged. **Confirmed working** — see below. `--list-rooms` shows rooms *and* zones, with the source of each name. |
96
+ | `…-verify-region-commands-session` | The above as one guided session — one login, prompts between stages. |
97
+ | `…-verify-map-edit` | Renames one room and reverts it. |
98
+ | `…-verify-favorite-write` | Create/update/delete saved routines. |
99
+ | `…-verify-schedule-write` | Resend and disable schedules. |
100
+ | `…-verify-virtual-wall-write` | Keep-out zones and virtual walls. **Writes work** — the HTTP 500 was solved before 0.2.0b1. Untested: a write carrying a *changed* list. |
101
+ | `…-name-clean-zone` | Names a clean zone. **Full-list rewrite** — anything omitted is deleted. Dry run by default. |
102
+ | `…-verify-settings-write` | Child lock, eco charge, schedule hold, … Writes confirmed; most effects untested. |
103
+
104
+ Every script has `--help`, and it is worth reading before a first run.
105
+
106
+ The last two are the easiest way to contribute something genuinely new — both
107
+ start read-only.
108
+
109
+ ## Region commands: solved, and worth re-running
110
+
111
+ Room-specific cleaning works. It took three rounds to establish, and two
112
+ things were required that are not obvious:
113
+
114
+ - **`initiator` is mandatory.** A stored favorite does not carry one, so
115
+ resending one unchanged is accepted, acknowledged and silently ignored.
116
+ - **The wire keys are `start` and `region_id`**, not `clean` and `id`.
117
+
118
+ ```bash
119
+ roombapy-prime-verify-region-commands-session \
120
+ --i-understand-this-will-move-my-robot \
121
+ --i-understand-this-is-experimental-and-unconfirmed
122
+ ```
123
+
124
+ It lists your eligible favorites and you pick one by number. **Watch the
125
+ robot while it runs.** The fastest stop is the real iRobot app or the
126
+ button on the robot.
127
+
128
+ Two notes from the sessions that got this working:
129
+
130
+ - A favorite made from **specific rooms** tells you far more than a
131
+ whole-home one. If the robot cleans everything, you have only learned
132
+ that the command arrived.
133
+ - Check the delivery confirmation in the output. Every stage that
134
+ received one started a mission; every stage that did not got nothing.
135
+ A "nothing happened" without a confirmation says nothing about the
136
+ payload.
137
+
138
+ ## Virtual walls: reads work, writes do not
139
+
140
+ Stage 0 (`--list-maps`, then `--list-walls`) works and is read-only.
141
+ It is how the zone types were confirmed against real data.
142
+
143
+ `--update-unchanged` **works.** The HTTP 500 this paragraph described
144
+ was solved before 0.2.0b1 — `virwall` starts with a COUNT of the walls —
145
+ and confirmed on two accounts, including the write / re-read / write
146
+ round trip that separates "accepted" from "stored".
147
+
148
+ **What is still untested: a write carrying a CHANGED list.** Every
149
+ confirmed write resent its zones unchanged, and `set_virtual_wall`
150
+ replaces the whole shared list — anything omitted is deleted.
151
+
152
+ ## Developing from an unreleased checkout
153
+
154
+ The pin above names a git tag, which does not exist yet while a version is
155
+ still in development. From a checkout, install the core editable first and skip
156
+ dependency resolution here:
157
+
158
+ ```bash
159
+ pip install -e . # from the repository root
160
+ pip install -e ./tools --no-deps
161
+ ```
162
+
163
+ Without `--no-deps`, pip fetches a second, unrelated copy of the core from
164
+ GitHub and shadows your editable one — which then fails in ways that look like
165
+ a code bug rather than an install problem. The CI does exactly this, for
166
+ exactly this reason.
167
+
168
+ ## Versioning
169
+
170
+ This distribution pins an exact core version. The scripts reach deep into the
171
+ library, so a mismatched pair fails confusingly rather than cleanly —
172
+ `scripts/check_version_pin.py` in the repository root enforces that the two
173
+ stay in step.
@@ -0,0 +1,87 @@
1
+ [project]
2
+ name = "roombapy-prime-tools"
3
+ version = "0.3.1"
4
+ description = "Diagnostic and field-test tooling for roombapy-prime (moves real robots -- read the safety notes)"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = "MIT"
8
+ classifiers = [
9
+ "Development Status :: 5 - Production/Stable",
10
+ "Intended Audience :: Developers",
11
+ "Programming Language :: Python :: 3",
12
+ "Topic :: Home Automation",
13
+ ]
14
+
15
+ # Pinned to an exact core version on purpose. These scripts reach deep
16
+ # into the library (shadow models, wire-format helpers, private-ish
17
+ # report plumbing), so a mismatched pair fails in confusing ways rather
18
+ # than cleanly. scripts/check_version_pin.py enforces that this pin and
19
+ # the core's own version stay in step.
20
+ dependencies = [
21
+ # A BARE PIN, not a git URL. PyPI rejects any distribution carrying
22
+ # a direct-URL dependency and rejects the whole upload with it, so
23
+ # the git pointer that was right while this lived only on GitHub
24
+ # made the package unpublishable.
25
+ "roombapy-prime==0.3.1",
26
+ ]
27
+
28
+ [project.optional-dependencies]
29
+ test = [
30
+ "pytest>=8.0",
31
+ "pytest-asyncio>=0.24",
32
+ "pytest-cov>=5.0",
33
+ ]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/johnnyh1975/roombapy-prime"
37
+ Issues = "https://github.com/johnnyh1975/roombapy-prime/issues"
38
+
39
+ # EVERY console script this project ships lives here, and nowhere else.
40
+ # The core distribution deliberately registers none at all -- several of
41
+ # these move a real robot, and they have no business on the PATH of a
42
+ # Home Assistant installation that merely consumes the library.
43
+ #
44
+ # roombapy-prime-validate points into the CORE package (its Report class
45
+ # is shared with the library), which is fine: entry points may reference
46
+ # any importable module, and installing this distribution installs the
47
+ # core as a dependency.
48
+ [project.scripts]
49
+ roombapy-prime-validate = "roombapy_prime.diagnostics:main"
50
+ roombapy-prime-verify-commands = "roombapy_prime_tools.verify_mission_commands:main"
51
+ roombapy-prime-verify-map-edit = "roombapy_prime_tools.verify_map_edit:main"
52
+ roombapy-prime-verify-mission-timeline = "roombapy_prime_tools.verify_mission_timeline:main"
53
+ roombapy-prime-verify-named-shadows = "roombapy_prime_tools.verify_named_shadows:main"
54
+ roombapy-prime-verify-region-commands = "roombapy_prime_tools.verify_region_commands:main"
55
+ roombapy-prime-name-clean-zone = "roombapy_prime_tools.name_clean_zone:main"
56
+ roombapy-prime-verify-local-channel = "roombapy_prime_tools.verify_local_channel:main"
57
+ roombapy-prime-verify-region-commands-session = "roombapy_prime_tools.verify_region_commands_session:main"
58
+ roombapy-prime-verify-schedule-write = "roombapy_prime_tools.verify_schedule_write:main"
59
+ roombapy-prime-verify-favorite-write = "roombapy_prime_tools.verify_favorite_write:main"
60
+ roombapy-prime-verify-virtual-wall-write = "roombapy_prime_tools.verify_virtual_wall_write:main"
61
+ roombapy-prime-verify-writes = "roombapy_prime_tools.verify_writes:main"
62
+ roombapy-prime-verify-settings-write = "roombapy_prime_tools.verify_settings_write:main"
63
+
64
+ [build-system]
65
+ requires = ["setuptools>=68"]
66
+ build-backend = "setuptools.build_meta"
67
+
68
+ [tool.setuptools.packages.find]
69
+ include = ["roombapy_prime_tools*"]
70
+
71
+ [tool.pytest.ini_options]
72
+ # A genuinely un-awaited coroutine in production code is a real bug that
73
+ # produces exactly this warning. Ten sloppy test mocks were emitting it
74
+ # routinely, which would have buried a real one in the noise -- the same
75
+ # way a silently swallowed exception went unnoticed for months. Promoted
76
+ # to an error so the noise cannot come back.
77
+ filterwarnings = [
78
+ "error::RuntimeWarning:.*never awaited.*",
79
+ ]
80
+ asyncio_default_fixture_loop_scope = "function"
81
+
82
+ [tool.ruff]
83
+ line-length = 120
84
+
85
+ [tool.ruff.lint]
86
+ select = ["E", "F", "W", "B", "C4", "UP"]
87
+ ignore = ["E501"]
@@ -0,0 +1,15 @@
1
+ """Diagnostic and field-test tooling for roombapy-prime.
2
+
3
+ DELIBERATE ONE-WAY BOUNDARY: everything in here may import from the
4
+ library core (roombapy_prime.auth, .prime_robot, .models, ...), but the
5
+ core must NEVER import from here. That direction was already respected
6
+ before this package existed -- moving these modules into their own
7
+ subpackage makes it structural rather than a matter of discipline, and
8
+ test_tools_boundary.py enforces it mechanically.
9
+
10
+ Why the separation matters beyond tidiness: these modules register 11
11
+ console scripts, several of which MOVE A REAL ROBOT. Keeping them
12
+ distinct from the library is what makes it possible to ship the library
13
+ to consumers (Home Assistant installations, via ha_roomba_plus) without
14
+ putting robot-moving commands on their PATH.
15
+ """