Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move settings scripts into sqlite DB #148

Merged
merged 7 commits into from
Nov 15, 2022
Merged

Move settings scripts into sqlite DB #148

merged 7 commits into from
Nov 15, 2022

Conversation

smartin015
Copy link
Owner

@smartin015 smartin015 commented Nov 12, 2022

This is a backend refactor that is a prelude to other work in #126 - moving away from explicitly declared scripts in settings code and instead allowing users to attach a gcode script to any event that CPQ fires from the state machine.

This PR also tests (and fixes a couple inconsistencies) with api.py handlers - namely a new GETSTATE permission and actually using RMJOB perm.

  • Create new DB with Scripts and Events models
  • Unit test new DB and associated queries
  • Create & test migration script from octoprint settings --> new DB
  • Convert script_runner.py to use DB queries instead of pulling from settings
  • Fix script_runner.py unit tests
  • Hook up migration script to plugin.py
  • Convert driver.py to use new script_runner methods, fix unit tests
  • Refactor JS to accept creating/deleting/editing scripts from the settings page
  • Refactor JS to allow assigning/reordering/removing multiple scripts to events
  • Properly handle reloading/discarding scripts state upon exiting settings
  • Handle renaming settings script without adjusting event registration
  • Fix any remaining broken / skipped python tests
  • fix/implement tests for JS changes
  • Exploratory testing using virtual octoprint instance

…nt JS/HTML settings changes to allow dynamic script/event registration
@smartin015 smartin015 changed the base branch from master to rc November 14, 2022 01:19
@smartin015 smartin015 merged commit 4db9449 into rc Nov 15, 2022
@smartin015 smartin015 deleted the scripts_refactor branch November 15, 2022 14:36
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.

None yet

1 participant