dotbot: README swarm-first rework + fetch defaults to latest#270
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #270 +/- ##
===========================================
- Coverage 83.35% 83.27% -0.08%
===========================================
Files 118 119 +1
Lines 10963 11120 +157
Branches 570 571 +1
===========================================
+ Hits 9138 9260 +122
- Misses 1822 1857 +35
Partials 3 3
🚀 New features to boost your workflow:
|
efded24 to
effa503
Compare
Contributor
Author
|
This is probably ready, but needs more testing with real hardware. |
5 tasks
AI-assisted: Claude Opus 4.8
The one-bot and LH2 quickstarts move into guides (doc/guides/one-bot.md and the existing LH2 guide), not removed - Going further links both, so the README leads straight into the swarm path. AI-assisted: Claude Opus 4.8
latest resolves via the GitHub /releases API (not /releases/latest, which skips prereleases like 0.8.0rcN). Resolution happens in the CLI layer before flash_role, so the concrete tag - not the literal "latest" - reaches resolve_fw_root and both the explicit fetch and the auto-fetch hook land in the same ./artifacts/<tag>/ dir. AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
Drives the first bot in a circle over plain HTTP. Adds `requests` as a dep: the demo (and the docs scripting example) talk to the controller with no async and no internal client, so it doubles as a copy-paste template; the internal httpx-based client stays for the richer examples. AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
The scripting example moved into the simulator guide (not removed); the page now leads with install, then the no-hardware simulator, then the "Deploy a real swarm" path. AI-assisted: Claude Opus 4.8
The cache moves to user-level ~/.dotbot/artifacts/ (shared across dirs; override DOTBOT_ARTIFACTS_DIR), as <source>-<version>/ dirs + a manifest, so swarmit and DotBot-firmware (independent version schemes) never collide. `fw fetch` pulls from both sources, downloading every .hex/.bin a release lists via the GitHub API (fixing the silent .bin 404s). `device flash <app>` searches the cache, preferring a local build over the newest release. AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
`dotbot fw fetch` with no args now resolves the pinned versions (swarmit from the installed package, dotbot-firmware from a declared constant) instead of the latest release; pass `-f latest` for the old behavior. AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
Aligns the no-`-f` default with `dotbot fw fetch` so both stage the same `swarmit-<version>/` cache dir; pass `-f latest` for the old behavior. AI-assisted: Claude Opus 4.8
The key was never read - $DOTBOT_ARTIFACTS_DIR is the cache-location override. A config that still sets it now fails (extra keys are forbidden). AI-assisted: Claude Opus 4.8
…s_dir AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
Pure move: flash.py keeps the device-flashing engine and imports fetch_assets/resolve_fw_root back from fetch.py for flash_role's auto-fetch (one-way dep, no cycle). No behavior change. AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
32c6e85 to
b6e1fc0
Compare
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
b6e1fc0 to
f93abc8
Compare
Contributor
Author
|
The README was validated by @RasdaCorentin, with improvements noted at #272. Nothing prevents merging this now, and improvements can land later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two onboarding improvements for the conference, on one branch (kept together by request).
README / docs: lead with the swarm path
The README now flows
## Usage->## Quickstart - a swarm->## Going further. The one-bot walkthrough moved into a newdoc/guides/one-bot.md; the LH2 quickstart already lived in the LH2 guide, so it's just removed from the README.## Going furtherlinks both guides and now includes theconfigcommand (previously dropped from the "four namespaces" line). Thedeviceand config-reference docs also gained the per-machine vs per-projectsegger_dir/firmware_reposplit.fw fetch / flash: default to the latest release
Bare
dotbot fw fetch(andflash-mari-gateway/flash-swarmit-sandboxwith no-f) resolve the latest swarmit release via the GitHub/releasesAPI - prereleases included, since the current newest is an rc - print the resolved tag, and cache under it.-f <tag>still pins;-f localis unchanged. The resolution happens in the CLI layer (beforeflash_role) so the concrete tag, not the literal "latest", drives the cache dir.Fetch output is now package-manager style: a "no version specified, fetching latest: " line, clean per-file names + sizes, a one-line optional-skip summary, and relative paths - instead of the raw
[GET]/[OK]/404 noise.Validation
Host-side: the resolver (live + mocked unit tests) and an end-to-end fetch, 79 tests green with no network calls in the suite, docs build clean under
-W. The role commands' on-bench flashing is unchanged logic (only the version now defaults to latest) - worth a quick bench confirm.A follow-up will add a second fetch source (DotBot-firmware bare apps for a no-SES one-bot path) once that repo's release CI publishes them.