Skip to content

CHORE: dev scripts for the mock UI and printer push - #180

Merged
decay71 merged 3 commits into
mainfrom
chore/dev-scripts
Oct 20, 2026
Merged

decay71 merged 3 commits into
mainfrom
chore/dev-scripts

Conversation

@stefanodangelo

@stefanodangelo stefanodangelo commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

As discussed in #179: two small scripts under scripts/.

  • run-dev-ui.ps1 (PowerShell) and run-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.ps1 was dropped from this PR; it stays in my fork.

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 decay71 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.
@decay71
decay71 merged commit 6dde42f into main Oct 20, 2026
7 checks passed
@decay71
decay71 deleted the chore/dev-scripts branch October 20, 2026 14:42
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