Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes path and ordering issues in the power board Arduino installation flow. Previously, the setup_power CLI command relied on a user-provided install_script path and a cd to change the working directory before invoking the script. The PR replaces this with hardcoded (but correct, via ~/resources symlink) paths to two separate scripts: one for installing arduino-cli and one for uploading the power board sketch — run in the correct order. The shell scripts are also updated: install-arduino-cli.sh removes its embedded interactive prompt for the power board install (since that's now handled by the Python CLI), and install-power-board.sh adds a cd to its own directory so it can locate the PowerBoard sketch reliably.
Changes:
setup_powerCLI command refactored to unconditionally run arduino-cli install then power board flash scripts from~/resources/arduino/install-arduino-cli.shremoves its interactive sub-invocation ofinstall-power-board.shand improves thecderror handlinginstall-power-board.shadds acdto its own directory so the relativePowerBoardsketch path is always correct
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/panoptes/pocs/utils/cli/power.py |
Replaces the optional install flow (with a user-supplied script path) with an unconditional two-step flow using hardcoded paths under ~/resources/arduino/ |
resources/arduino/install-arduino-cli.sh |
Removes the trailing interactive read prompt that offered to run install-power-board.sh, and improves cd error handling |
resources/arduino/install-power-board.sh |
Adds cd "$(dirname "${BASH_SOURCE[0]}")" so the sketch compile/upload commands can find the PowerBoard directory |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1406 +/- ##
===========================================
- Coverage 65.91% 65.82% -0.09%
===========================================
Files 105 105
Lines 9572 9587 +15
Branches 845 847 +2
===========================================
+ Hits 6309 6311 +2
- Misses 3116 3129 +13
Partials 147 147 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There are some errors with paths and the order that things were done to install the
arduino-cliand the the power board. This is cleaning up those items.