Repository navigation
CHORE: dev scripts for the mock UI and printer push - #180
Conversation
scripts/run-dev-ui.ps1 starts the backend and UI locally and falls back to mock mode when Moonraker is not reachable. scripts/push-to-printer.ps1 pushes the working tree to a printer for development: -WebOnly (default) syncs the web files and restarts only the web service, -Full runs the installer after the unit tests pass and the printer is idle, -Rollback restores the installer's extruder.py backup, -DryRun packs the tree without touching the printer. -PrinterHost is required. Remove the per-setup entries from .gitignore, including scripts/, which would hide these files. Local ignores belong in .git/info/exclude.
decay71
left a comment
There was a problem hiding this comment.
Thanks, I went through both scripts.
run-dev-ui.ps1: happy to take it, it makes the mock mode from #179 a one-liner. Two small things: .devdata/ is created by the script in every checkout, so please keep it in .gitignore. And since some users work on Linux, could you add a short run-dev-ui.sh with the same environment variables? The .ps1 needs PowerShell 7 there and builds its paths with backslashes.
push-to-printer.ps1: I would rather keep this one in your fork, the same way my own deploy script stays out of the repo. It is Windows only (cmd and the Windows tar), and -WebOnly copies to the installer's target paths by hand, so it breaks whenever the install layout changes. Two notes for your copy:
- With the next release the post-processor moves next to the backend (multiace_web/backend/), the backend loads that copy first, and the installer removes the config/tools copies. Copy post_process_virtual_toolheads.py into $WEB_DEST/backend/, or a web-only push will not update it.
- -Rollback only restores extruder.py. In multi and head mode filament_feed.py, filament_switch_sensor.py and kinematics/extruder.py are swapped as a set, and ace.py stays the pushed version, so pushing the last good commit with -Full is the real way back.
Could you drop push-to-printer.ps1 from this PR?
It is Windows only and copies to the installer's target paths by hand, so it stays out of the repository.
Same environment variables as run-dev-ui.ps1, for Linux and macOS. run-dev-ui creates .devdata/ in every checkout, so it stays in .gitignore.
As discussed in #179: two small scripts under
scripts/.run-dev-ui.ps1(PowerShell) andrun-dev-ui.sh(Linux and macOS) start the backend and UI locally and fall back to mock mode when Moonraker isn't reachable. They accept the same environment variables (MOONRAKER_URL,MULTIACE_MOCK_MODE,MULTIACE_MOCK_STATE_FILE,PORT) and keep a scratch config in.devdata/..devdata/stays in.gitignore, since the scripts create it in every checkout.push-to-printer.ps1was dropped from this PR; it stays in my fork.