spacr.qt.widgets.merge_tables_dialog

Shared table merging workflow for Graph Builder and Gate Editor.

Users can preview standard spaCR aggregation or explicitly configure external schemas. The custom editor works on a private copy, and applying requires both acknowledgment and a successful full-data validation.

Classes

CustomMergeDialog

Edit an isolated explicit key mapping; Cancel has no side effects.

MergeTablesDialog

Select tables, customize aggregation, preview, and create a derived table.

Module Contents

class spacr.qt.widgets.merge_tables_dialog.CustomMergeDialog(path, definition, parent=None)[source]

Bases: PySide6.QtWidgets.QDialog

Edit an isolated explicit key mapping; Cancel has no side effects.

Parameters:
  • path – Source database path.

  • definition – Initial merge configuration to copy.

  • parent – Owning merge popup.

Build isolated mapping controls.

Parameters:
  • path – Source SQLite database.

  • definition – Configuration copied before editing.

  • parent – Owning merge popup.

accept()[source]

Commit edited controls to the private copy after acknowledgment.

class spacr.qt.widgets.merge_tables_dialog.MergeTablesDialog(path, parent=None, *, selected=(), threaded=True, initial_definition=None)[source]

Bases: PySide6.QtWidgets.QDialog

Select tables, customize aggregation, preview, and create a derived table.

Parameters:
  • path – SQLite source database.

  • parent – Owning screen.

  • selected – Initially checked source tables.

  • threaded – Validate on a worker; false is intended for interaction tests.

  • initial_definition – Existing merge to reopen with its relationships preserved.

Build the shared merge workflow.

Parameters:
  • path – Source SQLite database.

  • parent – Owning screen.

  • selected – Initially checked source tables.

  • threaded – Run full validation on a worker when true.

  • initial_definition – Existing source-bound merge settings to reuse.

accept()[source]

Apply only a validated current configuration.

configuration()[source]

Read a reproducible configuration reflecting the current controls.

reject()[source]

Cancel outstanding work before dismissing the popup.

validate_preview()[source]

Calculate the full merged table in a background task.

Show its row counts and example rows after validation succeeds.