Skip to content

chore: Docs and tests#97

Merged
JarbasAl merged 4 commits into
devfrom
docs_and_tests
Mar 23, 2026
Merged

chore: Docs and tests#97
JarbasAl merged 4 commits into
devfrom
docs_and_tests

Conversation

@JarbasAl
Copy link
Copy Markdown
Member

@JarbasAl JarbasAl commented Mar 23, 2026

Summary by CodeRabbit

  • Documentation

    • New client API guide covering WebSocket and HTTP client usage
    • New message types documentation explaining routing and type system
    • New serialization protocol documentation for binary message encoding
    • New binary handlers guide for TTS audio and file transfers
    • New CLI guide documenting tool commands and options
    • Documentation index updated with new guide links
  • Bug Fixes

    • Fixed route information preservation during message deserialization

JarbasAl and others added 3 commits March 23, 2026 11:43
- Add missing route= parameter in deserialize() so route survives
  serialization roundtrips
- Remove test_intercom_utils.py (imports non-existent module)
- Fix docs/index.md to link all new doc files
- Fix docs/binary_handlers.md to list only existing callback methods
- Fix docs/message_types.md to reference actual module functions
  instead of non-existent classes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Coverage improvements:
- decorators.py: 0% → 100%
- identity.py: 81% → 100%
- util.py: 62% → 91% (payload2dict, deprecated wrappers)
- message.py: 91% → 95% (payload setter, target_peers, hop data)
- client.py: 40% → 56% (callbacks, waiters, event routing, binary)
- serialization.py: 64% → 70% (mycroft2bitstring, version handling)

Bug fix: add missing Message import in serialization.py (mycroft2bitstring)

New test files:
- test_decorators.py — full coverage of listener classes and decorators
- test_client.py — BinaryDataCallbacks, waiters, client properties

Docs:
- docs/serialization.md — bitstring wire format reference for
  cross-language implementors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 23, 2026

Warning

Rate limit exceeded

@JarbasAl has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 6 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2be8082c-3afe-4703-80fa-6740e707dad2

📥 Commits

Reviewing files that changed from the base of the PR and between 6927120 and ce58147.

📒 Files selected for processing (3)
  • .gitignore
  • docs/api.md
  • docs/message_types.md
📝 Walkthrough

Walkthrough

This PR adds comprehensive documentation for the hivemind-websocket-client library including client API usage, message types, binary serialization protocol, CLI tool usage, and binary payload handlers. It also introduces extensive unit test coverage for client functionality, message handling, serialization roundtrips, decorators, and utilities. Two minor code changes propagate route data during message deserialization and add a module-level import for Message class.

Changes

Cohort / File(s) Summary
Documentation
docs/binary_handlers.md, docs/cli_guide.md, docs/client_api.md, docs/message_types.md, docs/serialization.md, docs/index.md
New documentation pages covering BinaryDataCallbacks, CLI commands, HiveMessageBusClient/HiveMindHTTPClient APIs, HiveMessage routing semantics, and binary serialization wire format. Updated index with links to new guides.
Code Fixes
hivemind_bus_client/message.py, hivemind_bus_client/serialization.py
Fixed route field propagation in HiveMessage.deserialize() to preserve incoming route data. Added module-level Message import for mycroft2bitstring() function.
Test Suite
test/unittests/test_client.py, test/unittests/test_decorators.py, test/unittests/test_identity.py, test/unittests/test_message.py, test/unittests/test_serialization.py, test/unittests/test_util.py
Comprehensive unit tests covering HiveMessageBusClient, BinaryDataCallbacks, HiveMessageWaiter, decorators, NodeIdentity, HiveMessage payload/routing behavior, bitstring serialization roundtrips, compression, binary payload handling, and utility functions including deprecated encryption wrappers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • chore: typing, Docs, tests #91 — Overlapping modifications to HiveMessage.deserialize() and serialization decoding logic in core modules.
  • feat:binary handlers #33 — Implementation of BinaryDataCallbacks and \_handle_binary() that is directly documented and tested in this PR.

Suggested labels

ignore-for-release

Poem

🐰 With bits aligned and tests pristine,
The docs now shine, a guide serene.
From hops to TTS, routes made clear,
Our fuzzy friend rejoices here! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.12% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'chore: Docs and tests' is vague and generic. While it accurately describes that the PR adds documentation and tests, it lacks specificity about what functionality or components are being documented and tested. Consider using a more specific title that highlights the primary change, such as 'chore: Add HiveMessage client API and serialization documentation with comprehensive test coverage' or similar to better convey the scope.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs_and_tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

Stand by... check results incoming! 📡

I've aggregated the results of the automated checks for this PR below.

🔍 Lint

The automated report has been generated. 🖨️

ruff: issues found — see job log

🔒 Security (pip-audit)

Looking for any weak links in the supply chain. ⛓️

✅ No known vulnerabilities found (61 packages scanned).

📊 Coverage

Is the code wearing its test-suit? Let's see. 👔

49.6% total coverage

Files below 80% coverage (12 files)
File Coverage Missing lines
hivemind_bus_client/encodings/__init__.py 0.0% 3
hivemind_bus_client/encodings/b91.py 0.0% 3
hivemind_bus_client/encodings/benchmark.py 0.0% 159
hivemind_bus_client/encodings/z85b.py 0.0% 3
hivemind_bus_client/encodings/z85p.py 0.0% 3
hivemind_bus_client/http_client.py 0.0% 308
hivemind_bus_client/scripts.py 0.0% 215
hivemind_bus_client/version.py 0.0% 5
hivemind_bus_client/z85b.py 0.0% 3
hivemind_bus_client/protocol.py 33.2% 139
hivemind_bus_client/client.py 56.3% 128
hivemind_bus_client/serialization.py 70.4% 32

Full report: download the coverage-report artifact.

📋 Repo Health

Scanning for any signs of 'dependency' parasites. 🐛

⚠️ Some required files are missing.

Latest Version: 0.5.0a4

hivemind_bus_client/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
setup.py — setup.py
CHANGELOG.md — Changelog
requirements.txt — Requirements
hivemind_bus_client/version.py has valid version block markers

🏷️ Release Preview

The release preview report is now officially ready. 📁

Current: 0.5.0a4Next: 0.5.0a5

Signal Value
Label ignore-for-release
PR title chore: Docs and tests
Bump alpha

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 0.5.0a5

Channel Status Note Current Constraint
Stable Not in channel -
Testing Compatible hivemind-bus-client>=0.4.4,<1.0.0
Alpha Compatible hivemind-bus-client>=0.4.6a2

⚖️ License Check

Checking the pedigree of your dependencies. 🐕

✅ No license violations found (43 packages).

License distribution: 12× MIT License, 6× Apache Software License, 6× MIT, 4× Apache-2.0, 3× BSD-3-Clause, 2× BSD License, 2× ISC License (ISCL), 2× PSF-2.0, +6 more

Full breakdown — 43 packages
Package Version License URL
bitarray 3.8.0 PSF-2.0 link
bitstring 4.4.0 MIT License link
build 1.4.0 MIT link
certifi 2026.2.25 Mozilla Public License 2.0 (MPL 2.0) link
cffi 2.0.0 MIT link
charset-normalizer 3.4.6 MIT link
click 8.3.1 BSD-3-Clause link
combo_lock 0.3.0 Apache Software License link
cryptography 46.0.5 Apache-2.0 OR BSD-3-Clause link
filelock 3.25.2 MIT link
hivemind_bus_client 0.5.0a4 Apache Software License link
idna 3.11 BSD-3-Clause link
json-database 0.10.1 MIT link
kthread 0.2.3 MIT License link
markdown-it-py 4.0.0 MIT License link
mdurl 0.1.2 MIT License link
memory-tempfile 2.2.3 MIT License link
ovos-config 2.1.1 Apache-2.0 link
ovos-utils 0.8.5 Apache-2.0 link
ovos_bus_client 1.5.0 Apache Software License link
packaging 26.0 Apache-2.0 OR BSD-2-Clause link
pexpect 4.9.0 ISC License (ISCL) link
poorman-handshake 1.0.1 Apache-2.0 link
ptyprocess 0.7.0 ISC License (ISCL) link
py-cpuinfo 9.0.0 MIT License link
pybase64 1.4.3 BSD License link
pycparser 3.0 BSD-3-Clause link
pycryptodomex 3.23.0 BSD License; Public Domain link
pyee 12.1.1 MIT License link
Pygments 2.19.2 BSD License link
pyproject_hooks 1.2.0 MIT License link
python-dateutil 2.9.0.post0 Apache Software License; BSD License link
PyYAML 6.0.3 MIT License link
requests 2.32.5 Apache Software License link
rich 13.9.4 MIT License link
rich-click 1.9.7 MIT License

Copyright (c) 2022 Phil Ewels

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
| link |
| six | 1.17.0 | MIT License | link |
| tibs | 0.5.7 | MIT License | link |
| typing_extensions | 4.15.0 | PSF-2.0 | link |
| urllib3 | 2.6.3 | MIT | link |
| watchdog | 6.0.0 | Apache Software License | link |
| websocket-client | 1.9.0 | Apache Software License | link |
| z85base91 | 0.0.5 | Apache-2.0 | link |

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

🔨 Build Tests

Checking the calibration of the build environment. ⚖️

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Always here to help you keep things stable. ⚓

@JarbasAl JarbasAl merged commit e1b7237 into dev Mar 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant