Migrate Qt6 GUI from easystitch to a new easystitch-qt repo #44
Labels
No labels
blocked:children
blocked:depends-101
blocked:depends-103
blocked:depends-104
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:preflight
bug
chore
feature-request
in-progress
lint-cleanup
needs-decompose
performance
quality
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/easystitch#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Move Qt6 GUI to its own repo (mark/easystitch-qt) and remove from easystitch
Context
src/intent_resolver/gui_qt6/(4 files, ~46 KB) is a PyQt6 desktopGUI for easyStitch. It is:
doesn't import it. Nothing else in
src/references it (verifiedby grep: only
main_pipeline.pyandphysical_optimizer.pyimportfrom
intent_resolver, and onlydom_resolver+stitch_intent,never
gui_qt6).import PyQt6is in the code butpyqt6is not inrequirements.txt. The GUI has been broken(un-runnable) on a clean install for some time.
exec_usagecalls (lines
dialogs.py:123, 129, 135, 147andmain_window.py:754).These are actually PyQt6's modal-dialog
msg.exec()/app.exec()calls, not Python's
exec()builtin — so the bandit warning is afalse positive, but having them in the service-deployment repo
creates a permanent security-debt line item.
main_window.pyis 23.6 KB, more than 10% ofthe embroidery pipeline core. New contributors see a "GUI" in the
README mental model that isn't real for the service path.
Goal
Move the GUI to its own repo (
mark/easystitch-qt) so:easystitchrepo deploys as a service cleanly, with no GUI.abandoned) on its own cadence.
exec_usagelines is closed by removal.Implementation steps
Step 1: Create
mark/easystitch-qtrepo on ForgejoUse the existing API:
Or via the web UI. Repo should be public to match
easystitch'svisibility.
Step 2: Copy the GUI files into a clean package layout
Source files (no code changes needed, just relocate):
src/intent_resolver/gui_qt6/__init__.py→easystitch_qt/__init__.py(rewrite the docstring + module name; keep the same exports)
src/intent_resolver/gui_qt6/canvas.py→easystitch_qt/canvas.pysrc/intent_resolver/gui_qt6/dialogs.py→easystitch_qt/dialogs.pysrc/intent_resolver/gui_qt6/main_window.py→easystitch_qt/main_window.pyThe GUI imports from
intent_resolver.stitch_intent(siblingpackage). In the new repo, that import needs to be replaced with
from easystitch_qt.stitch_intent import ...— butstitch_intentis a shared data model, not GUI-specific. The right move is for
easystitch-qtto depend oneasystitchas a pip package (or copythe small
stitch_intent.pydata classes over as a re-export). Pickone and document the choice in the new repo's README.
Step 3: Add a real
pyproject.tomlandrequirements.txtto the new repoThe new repo needs:
pyproject.tomlwith the package nameeasystitch-qt, declaringeasystitchas a runtime dependency (or pinning the version itwas extracted from).
requirements.txtaddingpyqt6(the missing dependency from theold location).
(
python -m easystitch_qt), and that it requires a workingeasystitchinstall.tests/test_import.py) that assertsfrom easystitch_qt import EasyStitchAppsucceeds — this is whatwould have caught the broken
requirements.txtsituation in theold location.
Step 4: Remove the GUI from
easystitchsrc/intent_resolver/gui_qt6/.src/still references it (the grep aboveshows it isn't, but re-check after deletion).
docs/module_structure.mdto remove the GUI module from thetree (covered by issue #39 P2 if it lands first; otherwise do it
inline here).
README.mdif it mentions the GUI (it currently doesn't, sono change needed).
src/and confirmexec_usagefindings are gone.Step 5: Update cross-references
easystitch-qtrepo linkingback to this ticket.
issue(s)") with a note that the
exec_usagefindings areaddressed by removal (the underlying calls were false positives
but the security debt is now closed regardless).
iterative development") — same idea, with a note that the directory
is now in its proper home.
Acceptance
mark/easystitch-qtexists on Forgejo with the 4 GUI files, apyproject.toml, requirements.txt, and README.
src/intent_resolver/gui_qt6/is deleted fromeasystitch.bandit -r src/reports zeroexec_usagefindings ineasystitch.gui_qt6ineasystitch/src/returns nothing.easystitch-qtrepo's smoke test passes in CI.Out of scope
repo, separate ticket) — possibly a "this is abandoned" close rather
than a revival.
revival work.
Qt6 GUI in src/intent_resolver/gui_qt6/ is dead code; contains unfixed HIGH security issuesto Migrate Qt6 GUI from easystitch to a new easystitch-qt repoDone — migration complete.
easystitchin commit12b6833(-1508 lines, +0)bandit -r src/now reports 0exec_usagefindings (was 5)tests/test_main.py)intent_resolver/is now justdom_resolver.py+stitch_intent.py(both still import fine and are used bymain_pipeline.py+physical_optimizer.py)The new repo has a
tests/test_import.pywith 4 smoke tests including a regression check (test_pyqt6_dependency_available) that asserts PyQt6 is installed. That's the test that would have caught the originalrequirements.txtgap.Cross-linked in the new repo's README under "Provenance" — anyone reading either repo can find the other.
What this closes:
requirements.txtwas never added (pyqt6) — moot nowWhat this does NOT close: