Hubble Demo Script
This will enable you to flash a pre-determined set of boards and provision them with your credentials.
Testing
Run all commands from python/.
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest # smoke tests only; the e2e test is skipped
End-to-end test (hardware required)
tests/test_e2e.py flashes a connected board, BLE-scans + ingests
packets via pyhubblenetwork, then queries the backend by device ID. It
is gated behind the integration and ble markers so it never runs by
accident.
Set HUBBLE_ORG_ID and HUBBLE_API_TOKEN (in your shell, or copy
.env.example to .env in python/ or the repo root — loaded via
python-dotenv), pick a board ID from merge/md.json, plug it in,
then:
export HUBBLE_TEST_BOARD=nrf52dk
pytest -s -m integration tests/test_e2e.py -v
-s is required because TI generate-hex boards (lp_em_cc2340r5,
lp_em_cc2340r53, lp_em_cc2755p10) emit a .hex and the test pauses to ask you to flash
it manually before continuing.
Testing a locally-built ELF
To exercise an ELF you just built (instead of the prebuilt one in
merge/), point HUBBLE_TEST_ELF_FILE at it. The test forwards this
through to hubbledemo flash via the HUBBLE_DEMO_ELF_FILE override:
export HUBBLE_TEST_BOARD=nrf52dk
export HUBBLE_TEST_ELF_FILE=../firmware/zephyr/hubble-demo-app/build/zephyr/zephyr.elf
pytest -s -m integration tests/test_e2e.py -v
Tunables
| Env var | Default | Purpose |
|---|---|---|
HUBBLE_TEST_BOARD |
— | Board ID; test is skipped if unset |
HUBBLE_TEST_ELF_FILE |
— | Local ELF path; uses remote merge/<board>.elf if unset |
HUBBLE_TEST_SCAN_TIMEOUT |
90 |
Seconds to scan for BLE packets |
HUBBLE_TEST_SCAN_COUNT |
3 |
Stop scanning after N packets |
HUBBLE_TEST_INGEST_WAIT |
45 |
Seconds to wait for backend propagation before querying |
HUBBLE_TEST_DEVICE_NAME |
auto | --name for the registered device |
Releasing
Releases are triggered by pushing a vX.Y.Z tag. The
.github/workflows/release.yml workflow then runs lint + tests, builds
sdist + wheel, creates a GitHub Release using release-notes.md as the
body, and publishes to PyPI via OIDC trusted publishing.
One-time setup
- PyPI Trusted Publisher — at
https://pypi.org/manage/project/pyhubbledemo/settings/publishing/,
add a publisher with:
- Owner:
HubbleNetwork - Repository:
hubble-tldm - Workflow filename:
release.yml - Environment name:
pypi
- Owner:
- GitHub Environment — in repo Settings → Environments, create an
environment named
pypi. Optionally add a required-reviewer rule so each publish needs manual approval.
Cutting a release
Run all commands from the repo root.
- Bump the version in
python/pyproject.toml(project.version). The git tag must exactly match this string with avprefix. - Update
python/release-notes.md— prepend a new section under# Release Notes:## [X.Y.Z] - YYYY-MM-DD ### Added - feat(...): ... ### Fixed - fix(...): ...
The full file is dumped as the GitHub Release body, so keep it readable. - Commit and tag:
git add python/pyproject.toml python/release-notes.md git commit -m "chore: release X.Y.Z" git tag vX.Y.Z git push origin master git push origin vX.Y.Z
- Approve the publish step — if you enabled the reviewer gate on
the
pypienvironment, the workflow will pause before pushing to PyPI until you approve it in the Actions UI.
Watch progress at https://github.com/HubbleNetwork/hubble-tldm/actions.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhubbledemo-0.1.2.tar.gz.
File metadata
- Download URL: pyhubbledemo-0.1.2.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0c9bf5a79e0fdb3b0225a2b791aefaefcd746d3239f42b90b920cfdf8aa65a2
|
|
| MD5 |
62976e896d47b90e7dbd3931848dfff1
|
|
| BLAKE2b-256 |
aa7c56395ca090dc03a99af72cebcbc66fb60575b199b5c069c06ffa31dbdac7
|
Provenance
The following attestation bundles were made for pyhubbledemo-0.1.2.tar.gz:
Publisher:
release.yml on HubbleNetwork/hubble-tldm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyhubbledemo-0.1.2.tar.gz -
Subject digest:
b0c9bf5a79e0fdb3b0225a2b791aefaefcd746d3239f42b90b920cfdf8aa65a2 - Sigstore transparency entry: 2612377512
- Sigstore integration time:
-
Permalink:
HubbleNetwork/hubble-tldm@64c077f18ae3869067e4afc7160e1108674820d4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/HubbleNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@64c077f18ae3869067e4afc7160e1108674820d4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyhubbledemo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pyhubbledemo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f4a95746342b6eb7cfe5a95c70f52849414afa612c1c93520ebda1939f70d6
|
|
| MD5 |
d27d09ed5e24380b7533dff9aad8ae89
|
|
| BLAKE2b-256 |
57e980ae33c74193b7b24a891ad546a98bd0fbaf94df8d3191babb7a8d681c2a
|
Provenance
The following attestation bundles were made for pyhubbledemo-0.1.2-py3-none-any.whl:
Publisher:
release.yml on HubbleNetwork/hubble-tldm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyhubbledemo-0.1.2-py3-none-any.whl -
Subject digest:
d8f4a95746342b6eb7cfe5a95c70f52849414afa612c1c93520ebda1939f70d6 - Sigstore transparency entry: 2612377518
- Sigstore integration time:
-
Permalink:
HubbleNetwork/hubble-tldm@64c077f18ae3869067e4afc7160e1108674820d4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/HubbleNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@64c077f18ae3869067e4afc7160e1108674820d4 -
Trigger Event:
push
-
Statement type: