Skip to content

Fix power install#1406

Merged
wtgee merged 1 commit intodevelopfrom
fix-power-install
Mar 3, 2026
Merged

Fix power install#1406
wtgee merged 1 commit intodevelopfrom
fix-power-install

Conversation

@wtgee
Copy link
Member

@wtgee wtgee commented Mar 3, 2026

There are some errors with paths and the order that things were done to install the arduino-cli and the the power board. This is cleaning up those items.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_power CLI command refactored to unconditionally run arduino-cli install then power board flash scripts from ~/resources/arduino/
  • install-arduino-cli.sh removes its interactive sub-invocation of install-power-board.sh and improves the cd error handling
  • install-power-board.sh adds a cd to its own directory so the relative PowerBoard sketch 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
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 7.40741% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.82%. Comparing base (92634a4) to head (f79de8e).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/panoptes/pocs/utils/cli/power.py 7.40% 25 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wtgee wtgee force-pushed the fix-power-install branch from d102684 to 19fa997 Compare March 3, 2026 19:44
@wtgee wtgee force-pushed the fix-power-install branch from 13d4cb5 to f79de8e Compare March 3, 2026 20:52
@wtgee wtgee merged commit 8c378c0 into develop Mar 3, 2026
3 of 5 checks passed
@wtgee wtgee deleted the fix-power-install branch March 3, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants